test: don't expand the subshell expression prematurely
authorFrantisek Sumsal <frantisek@sumsal.cz>
Sat, 25 Mar 2023 11:02:15 +0000 (12:02 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Sat, 25 Mar 2023 11:10:58 +0000 (12:10 +0100)
commit0b189ac84c432a085a1f10139260cec6b5032523
treef2efc86ad7b59de8622cd046407d5ebda8155f92
parentaadbd81f7ffbc313d0541c15455211dddeedbfde
test: don't expand the subshell expression prematurely

We need to expand the subshell expression during the `bash -c`
invocation, not before, to take the desired effect, as now it expands to:

timeout 30 bash -c 'while [[ 0 -eq 0 ]]; do sleep 1; done'

instead of the expected:

timeout 30 bash -c 'while [[ $(coredumpctl list -q --no-legend 770 | wc -l) -eq 0 ]]; do sleep 1; done'

Follow-up to aadbd81f7f.
test/units/testsuite-74.coredump.sh