From 93b8e76133c4b00c9e074b30a04898cb74b582d9 Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Mon, 12 Sep 2022 23:11:54 +0200 Subject: [PATCH] Meta: Remove unused and outdated check-syscall-lists.sh lint This was apparently never used by anyone except me, and currently fails silently. The script originally allowed easy inspection of the difference between: 1. The list of declared syscalls according to Kernel/API/Syscall.h 2. The list of syscalls implemented by the UserspaceEmulator according to Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp 3. The list of syscalls documented in Base/usr/share/man/man2/. Here's how the script could have been updated: SYSCALLS_KERNEL="$(echo 'Kernel syscalls'; echo; \ grep -Eo '^ +S\(.*, NeedsBigProcessLock::' Kernel/API/Syscall.h | \ sed -Ee 's-^ +S\((.+), .*-\1-' | sort)" SYSCALLS_UE="$(echo 'Implemented in UserspaceEmulator'; echo; \ grep -Eo '^ +case SC_.*:$' \ Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp | \ sed -Ee 's,^ +case SC_(.*):$,\1,' | sort)" SYSCALLS_MAN2="$(echo 'Documented syscalls'; echo; \ find Base/usr/share/man/man2/ ! -type d -printf '%f\n' | \ sed -Ee 's,\.md,,' | sort)" diff --color=always \ <(echo "${SYSCALLS_KERNEL}") <(echo "${SYSCALLS_UE}") diff --color=always \ <(echo "${SYSCALLS_KERNEL}") <(echo "${SYSCALLS_MAN2}") A more readable version might be available at https://github.com/BenWiederhake/serenity/tree/historic/syscall-linting However, there seems to be no interest in the script, so it is better to remove it. --- Meta/check-syscall-lists.sh | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100755 Meta/check-syscall-lists.sh diff --git a/Meta/check-syscall-lists.sh b/Meta/check-syscall-lists.sh deleted file mode 100755 index 8dba593e4a..0000000000 --- a/Meta/check-syscall-lists.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -set -eo pipefail - -script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P) -cd "${script_path}/.." - -SYSCALLS_KERNEL="$(echo 'Kernel syscalls'; echo; grep -Eio '(?<=^ S\().*(?=\)( +\\)?$)' Kernel/API/Syscall.h | sort)" -SYSCALLS_UE="$(echo 'Implemented in UserspaceEmulator'; echo; grep -Eio '(?<=^ case SC_).*(?=:$)' Userland/DevTools/UserspaceEmulator/Emulator.cpp | sort)" -SYSCALLS_MAN2="$(echo 'Documented syscalls'; echo; find Base/usr/share/man/man2/ ! -type d -printf '%f\n' | sed -Ee 's,\.md,,' | sort)" - -set +e - -echo "ACTUAL versus UE" -diff --color=always -u <(echo "${SYSCALLS_KERNEL}") <(echo "${SYSCALLS_UE}") -echo -echo "ACTUAL versus UE" -diff --color=always -u <(echo "${SYSCALLS_KERNEL}") <(echo "${SYSCALLS_MAN2}") - -exit 0