]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/TEST-23-TYPE-EXEC/testsuite.sh
test-network: change default sleep time of start_networkd()
[thirdparty/systemd.git] / test / TEST-23-TYPE-EXEC / testsuite.sh
CommitLineData
0e1f1756 1#!/bin/bash
0e1f1756
LP
2set -ex
3set -o pipefail
4
6c34ed51
ZJS
5systemd-analyze log-level debug
6systemd-analyze log-target console
0e1f1756
LP
7
8# Create a binary for which execve() will fail
9touch /tmp/brokenbinary
10chmod +x /tmp/brokenbinary
11
12# These three commands should succeed.
13systemd-run --unit=one -p Type=simple /bin/sleep infinity
14systemd-run --unit=two -p Type=simple -p User=idontexist /bin/sleep infinity
15systemd-run --unit=three -p Type=simple /tmp/brokenbinary
16
17# And now, do the same with Type=exec, where the latter two should fail
18systemd-run --unit=four -p Type=exec /bin/sleep infinity
19! systemd-run --unit=five -p Type=exec -p User=idontexist /bin/sleep infinity
20! systemd-run --unit=six -p Type=exec /tmp/brokenbinary
21
6c34ed51 22systemd-analyze log-level info
0e1f1756
LP
23
24echo OK > /testok
25
26exit 0