commit: 66417851bbfc2266513774e59aa32b36469a756b
Author: Mathias Krause <minipli <AT> grsecurity <DOT> net>
AuthorDate: Tue Jan 23 11:17:18 2024 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Jul 22 21:06:05 2024 +0000
URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=66417851
tests: add basic pspax test
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 <AT> grsecurity.net>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
meson.build | 1 +
tests/pspax/dotest | 12 ++++++++++++
tests/pspax/meson.build | 8 ++++++++
3 files changed, 21 insertions(+)
diff --git a/meson.build b/meson.build
index 319e3de..64fcc14 100644
--- a/meson.build
+++ b/meson.build
@@ -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
diff --git a/tests/pspax/dotest b/tests/pspax/dotest
new file mode 100755
index 0000000..f2ccc98
--- /dev/null
+++ b/tests/pspax/dotest
@@ -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}
diff --git a/tests/pspax/meson.build b/tests/pspax/meson.build
new file mode 100644
index 0000000..a00a96d
--- /dev/null
+++ b/tests/pspax/meson.build
@@ -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(),
+ }
+)