summaryrefslogtreecommitdiffstats
path: root/test/TEST-23-TYPE-EXEC
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-12-10 08:59:09 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-03-28 11:46:47 +0100
commitb49325d028803bacefcf3817a84206b31197826c (patch)
tree6d2b033929f3a554fe59cd42a85b5bd913fc6864 /test/TEST-23-TYPE-EXEC
parenttest: move TEST-22-TMPFILES setup to static files (diff)
downloadsystemd-b49325d028803bacefcf3817a84206b31197826c.tar.xz
systemd-b49325d028803bacefcf3817a84206b31197826c.zip
test: move TEST-23-TYPE-EXEC setup to static files
Diffstat (limited to 'test/TEST-23-TYPE-EXEC')
-rwxr-xr-xtest/TEST-23-TYPE-EXEC/test.sh15
-rwxr-xr-xtest/TEST-23-TYPE-EXEC/testsuite.sh34
2 files changed, 1 insertions, 48 deletions
diff --git a/test/TEST-23-TYPE-EXEC/test.sh b/test/TEST-23-TYPE-EXEC/test.sh
index ebc9fe4c85..bafbef0319 100755
--- a/test/TEST-23-TYPE-EXEC/test.sh
+++ b/test/TEST-23-TYPE-EXEC/test.sh
@@ -13,21 +13,8 @@ test_setup() {
setup_basic_environment
mask_supporting_services
-
- # setup the testsuite service
- cat >$initdir/etc/systemd/system/testsuite.service <<EOF
-[Unit]
-Description=Testsuite service
-
-[Service]
-ExecStart=/testsuite.sh
-Type=oneshot
-EOF
- cp testsuite.sh $initdir/
-
- setup_testsuite
)
setup_nspawn_root
}
-do_test "$@"
+do_test "$@" 23
diff --git a/test/TEST-23-TYPE-EXEC/testsuite.sh b/test/TEST-23-TYPE-EXEC/testsuite.sh
deleted file mode 100755
index 5e2966f848..0000000000
--- a/test/TEST-23-TYPE-EXEC/testsuite.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env bash
-set -ex
-set -o pipefail
-
-systemd-analyze log-level debug
-systemd-analyze log-target console
-
-# Create a binary for which execve() will fail
-touch /tmp/brokenbinary
-chmod +x /tmp/brokenbinary
-
-# These three commands should succeed.
-systemd-run --unit=one -p Type=simple /bin/sleep infinity
-systemd-run --unit=two -p Type=simple -p User=idontexist /bin/sleep infinity
-systemd-run --unit=three -p Type=simple /tmp/brokenbinary
-
-# And now, do the same with Type=exec, where the latter two should fail
-systemd-run --unit=four -p Type=exec /bin/sleep infinity
-! systemd-run --unit=five -p Type=exec -p User=idontexist /bin/sleep infinity
-! systemd-run --unit=six -p Type=exec /tmp/brokenbinary
-
-systemd-run --unit=seven -p KillSignal=SIGTERM -p RestartKillSignal=SIGINT -p Type=exec /bin/sleep infinity
-# Both TERM and SIGINT happen to have the same number on all architectures
-test $(systemctl show --value -p KillSignal seven.service) -eq 15
-test $(systemctl show --value -p RestartKillSignal seven.service) -eq 2
-
-systemctl restart seven.service
-systemctl stop seven.service
-
-systemd-analyze log-level info
-
-echo OK > /testok
-
-exit 0