diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2017-11-11 21:41:05 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2017-11-11 21:54:29 +0900 |
commit | 7a18854fe735ddccc1de2a53e531f306491e6567 (patch) | |
tree | ba93261c462e7b9be81e491181f001ea40706868 /test | |
parent | 3df90f24cc699e001063a27ff4c9a45376497e40 (diff) | |
download | systemd-7a18854fe735ddccc1de2a53e531f306491e6567.tar.gz systemd-7a18854fe735ddccc1de2a53e531f306491e6567.tar.bz2 systemd-7a18854fe735ddccc1de2a53e531f306491e6567.zip |
test-execute: update test for SystemCallErrorNumber=
Diffstat (limited to 'test')
-rw-r--r-- | test/meson.build | 3 | ||||
-rw-r--r-- | test/test-execute/exec-systemcallerrornumber-name.service (renamed from test/test-execute/exec-systemcallerrornumber.service) | 2 | ||||
-rw-r--r-- | test/test-execute/exec-systemcallerrornumber-number.service | 8 |
3 files changed, 11 insertions, 2 deletions
diff --git a/test/meson.build b/test/meson.build index 941878dea4..69d6c758b0 100644 --- a/test/meson.build +++ b/test/meson.build @@ -100,7 +100,8 @@ test_data_files = ''' test-execute/exec-supplementarygroups-single-group-user.service test-execute/exec-supplementarygroups-single-group.service test-execute/exec-supplementarygroups.service - test-execute/exec-systemcallerrornumber.service + test-execute/exec-systemcallerrornumber-name.service + test-execute/exec-systemcallerrornumber-number.service test-execute/exec-systemcallfilter-failing.service test-execute/exec-systemcallfilter-failing2.service test-execute/exec-systemcallfilter-not-failing.service diff --git a/test/test-execute/exec-systemcallerrornumber.service b/test/test-execute/exec-systemcallerrornumber-name.service index ff7da3c1a4..229b862794 100644 --- a/test/test-execute/exec-systemcallerrornumber.service +++ b/test/test-execute/exec-systemcallerrornumber-name.service @@ -2,7 +2,7 @@ Description=Test for SystemCallErrorNumber [Service] -ExecStart=/bin/sh -x -c 'uname -a' +ExecStart=/bin/python3 -c 'import os\ntry: os.uname()\nexcept Exception as e: exit(e.errno)' Type=oneshot SystemCallFilter=~uname SystemCallErrorNumber=EACCES diff --git a/test/test-execute/exec-systemcallerrornumber-number.service b/test/test-execute/exec-systemcallerrornumber-number.service new file mode 100644 index 0000000000..2e13f08bf5 --- /dev/null +++ b/test/test-execute/exec-systemcallerrornumber-number.service @@ -0,0 +1,8 @@ +[Unit] +Description=Test for SystemCallErrorNumber + +[Service] +ExecStart=/bin/python3 -c 'import os\ntry: os.uname()\nexcept Exception as e: exit(e.errno)' +Type=oneshot +SystemCallFilter=~uname +SystemCallErrorNumber=255 |