diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-10-05 07:46:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-05 07:46:30 +0200 |
commit | e913b7988f5aec19a4bd38fda021de86f8f06aa5 (patch) | |
tree | fa091a3c6f399cb92b9fb117fffaf430b88dd92f /test | |
parent | dhcp6: don't include internal header "sparse-endian.h" in "sd-dhcp6-client.h" (diff) | |
download | systemd-e913b7988f5aec19a4bd38fda021de86f8f06aa5.tar.xz systemd-e913b7988f5aec19a4bd38fda021de86f8f06aa5.zip |
test-execute: add a test for systemcall filter (#10273)
This adds a test for issue #9939 which is fixed by
a5404992cc7724ebf7572a0aa89d9fdb26ce0b62 (#9942).
Diffstat (limited to 'test')
-rw-r--r-- | test/meson.build | 1 | ||||
-rw-r--r-- | test/test-execute/exec-systemcallfilter-with-errno-multi.service | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/test/meson.build b/test/meson.build index 37034fca96..7e8f2cfa90 100644 --- a/test/meson.build +++ b/test/meson.build @@ -134,6 +134,7 @@ test_data_files = ''' test-execute/exec-systemcallfilter-system-user-nfsnobody.service test-execute/exec-systemcallfilter-system-user-nobody.service test-execute/exec-systemcallfilter-system-user.service + test-execute/exec-systemcallfilter-with-errno-multi.service test-execute/exec-systemcallfilter-with-errno-name.service test-execute/exec-systemcallfilter-with-errno-number.service test-execute/exec-temporaryfilesystem-options.service diff --git a/test/test-execute/exec-systemcallfilter-with-errno-multi.service b/test/test-execute/exec-systemcallfilter-with-errno-multi.service new file mode 100644 index 0000000000..951e7ac36b --- /dev/null +++ b/test/test-execute/exec-systemcallfilter-with-errno-multi.service @@ -0,0 +1,9 @@ +[Unit] +Description=Test for SystemCallFilter updating errno +# test for issue #9939 which is fixed by a5404992cc7724ebf7572a0aa89d9fdb26ce0b62 (#9942) + +[Service] +ExecStart=/usr/bin/python3 -c 'import os\ntry: os.uname()\nexcept Exception as e: exit(e.errno)' +Type=oneshot +SystemCallFilter=~uname:ENOENT uname:EILSEQ +SystemCallErrorNumber=EACCES |