summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2022-06-20 12:27:39 +0200
committerFrantisek Sumsal <frantisek@sumsal.cz>2022-06-20 17:56:09 +0000
commit08970485003c25ce2c4adfaeea2d58558d311d42 (patch)
treeafbfea3494f283c9c3e929da046b22e556ac728b
parent653e4a153bc060ede7c9b7fe1fe2bca28d0385f6 (diff)
downloadsystemd-08970485003c25ce2c4adfaeea2d58558d311d42.tar.gz
test: use saved process PID instead of %%
As the `%%` specifier might fail if the current job (i.e. the last background job) already finished: ``` [ 61.692196] testsuite-04.sh[656]: ++ systemd-id128 new [ 61.705407] testsuite-04.sh[263]: + ID=912cb8f8ef304153a123f772bb0fe9e0 [ 61.706318] testsuite-04.sh[657]: + systemd-cat -t 912cb8f8ef304153a123f772bb0fe9e0 bash -c 'echo parent; (echo child) & wait' [ 61.720940] testsuite-04.sh[263]: + PID=657 [ 61.721126] testsuite-04.sh[263]: + wait %% [ 61.723014] testsuite-04.sh[263]: /usr/lib/systemd/tests/testdata/units/testsuite-04.sh: line 96: wait: %%: no such job ```
-rwxr-xr-xtest/units/testsuite-04.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/units/testsuite-04.sh b/test/units/testsuite-04.sh
index 7521a6d2e5..b5468cbea4 100755
--- a/test/units/testsuite-04.sh
+++ b/test/units/testsuite-04.sh
@@ -93,7 +93,7 @@ cmp /expected /output
ID=$(systemd-id128 new)
systemd-cat -t "$ID" bash -c 'echo parent; (echo child) & wait' &
PID=$!
-wait %%
+wait $PID
journalctl --sync
# We can drop this grep when https://github.com/systemd/systemd/issues/13937
# has a fix.