Skip to content

Commit

Permalink
tests: add basic pspax test
Browse files Browse the repository at this point in the history
Add a basic test that simply makes sure pspax executes just fine, i.e.
doesn't get killed by the seccomp policy.

Signed-off-by: Mathias Krause <minipli@grsecurity.net>
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
  • Loading branch information
minipli-oss authored and floppym committed Jul 22, 2024
1 parent a9440d0 commit 6641785
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ meson.add_dist_script('meson-build-dist-man.sh')
do_tests = get_option('tests')
if do_tests
subdir('tests/lddtree')
subdir('tests/pspax')
subdir('tests/scanelf')
subdir('tests/source')
endif
Expand Down
12 changes: 12 additions & 0 deletions tests/pspax/dotest
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

. "${0%/*}"/../lib.sh

#
# simple pspax execution check
#
${MESON_EXE_WRAPPER} sh -c "${builddir}/pspax" >/dev/null \
2> "${builddir}"/pspax.err
testit pspax.err

exit ${ret}
8 changes: 8 additions & 0 deletions tests/pspax/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
test('pspax-test', files('dotest'),
workdir : meson.current_source_dir(),
env : {
'builddir' : meson.project_build_root(),
'srcdir' : meson.project_source_root(),
'current_srcdir' : meson.current_source_dir(),
}
)

0 comments on commit 6641785

Please sign in to comment.