diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-12-08 02:41:49 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-12-11 07:12:42 +0100 |
commit | 9d51ab78300364c71a0e1f138e1d2cbc65771b93 (patch) | |
tree | 9999a93daffaaf3891c89982f60b9928acf1f6c0 /test | |
parent | analyze: also find template unit when a template instance is specified (diff) | |
download | systemd-9d51ab78300364c71a0e1f138e1d2cbc65771b93.tar.xz systemd-9d51ab78300364c71a0e1f138e1d2cbc65771b93.zip |
test: add test cases for issue #30357
Diffstat (limited to 'test')
-rwxr-xr-x | test/units/testsuite-65.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test/units/testsuite-65.sh b/test/units/testsuite-65.sh index 265a07f01d..6c819dfe4a 100755 --- a/test/units/testsuite-65.sh +++ b/test/units/testsuite-65.sh @@ -296,6 +296,44 @@ EOF # Verifies that the --offline= option works with --root= systemd-analyze security --threshold=90 --offline=true --root=/tmp/img/ testfile.service +cat <<EOF >/tmp/foo@.service +[Service] +ExecStart=ls +EOF + +cat <<EOF >/tmp/hoge@test.service +[Service] +ExecStart=ls +EOF + +# issue #30357 +pushd /tmp +systemd-analyze verify foo@bar.service +systemd-analyze verify foo@.service +systemd-analyze verify hoge@test.service +(! systemd-analyze verify hoge@nonexist.service) +(! systemd-analyze verify hoge@.service) +popd +pushd / +systemd-analyze verify tmp/foo@bar.service +systemd-analyze verify tmp/foo@.service +systemd-analyze verify tmp/hoge@test.service +(! systemd-analyze verify tmp/hoge@nonexist.service) +(! systemd-analyze verify tmp/hoge@.service) +popd +pushd /usr +systemd-analyze verify ../tmp/foo@bar.service +systemd-analyze verify ../tmp/foo@.service +systemd-analyze verify ../tmp/hoge@test.service +(! systemd-analyze verify ../tmp/hoge@nonexist.service) +(! systemd-analyze verify ../tmp/hoge@.service) +popd +systemd-analyze verify /tmp/foo@bar.service +systemd-analyze verify /tmp/foo@.service +systemd-analyze verify /tmp/hoge@test.service +(! systemd-analyze verify /tmp/hoge@nonexist.service) +(! systemd-analyze verify /tmp/hoge@.service) + # Added an additional "INVALID_ID" id to the .json to verify that nothing breaks when input is malformed # The PrivateNetwork id description and weight was changed to verify that 'security' is actually reading in # values from the .json file when required. The default weight for "PrivateNetwork" is 2500, and the new weight |