Skip to content

Commit

Permalink
src: Make arch-syscall-check work in VPATH build
Browse files Browse the repository at this point in the history
The aim of arch-syscall-check test is to check for syscalls
missing implementation. It does so by comparing two files:

  1) src/syscalls.csv
  2) include/seccomp-syscalls.h

However, due to use of relative paths these files are not found
when doing a VPATH build. But, we can re-use an idea from GNU
coreutils and get an absolute path to the source dir. All that's
needed then is to prefix those two paths with the source dir
path.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
  • Loading branch information
zippy2 committed Nov 1, 2022
1 parent de44dc9 commit 0eb27b7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/arch-syscall-check
Expand Up @@ -22,8 +22,11 @@
# along with this library; if not, see <http://www.gnu.org/licenses>.
#

SYSCALL_CSV="./syscalls.csv"
SYSCALL_HDR="../include/seccomp-syscalls.h"
# Based on an idea from GNU coreutils
abs_topsrcdir="$(unset CDPATH; cd $(dirname $0)/.. && pwd)"

SYSCALL_CSV="$abs_topsrcdir/src/syscalls.csv"
SYSCALL_HDR="$abs_topsrcdir/include/seccomp-syscalls.h"

function check_snr() {
(export LC_ALL=C; diff \
Expand Down

0 comments on commit 0eb27b7

Please sign in to comment.