test/TEST-31-DEVICE-ENUMERATION: do not use -x to avoid grep loop

https://github.com/systemd/systemd/pull/13746#issuecomment-539410752:
> [grep] now matches the grep command itself, as it's logged into journal as well, thanks to set -x.

Also, use journalctl --grep and -t to make things a bit quicker.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2019-10-08 11:11:49 +02:00
parent 51fa85913c
commit fd3561bae0
1 changed files with 2 additions and 2 deletions

View File

@ -1,8 +1,8 @@
#!/bin/bash
set -ex
set -e
set -o pipefail
if journalctl -b | grep -e '\.device: Changed plugged -> dead'; then
if journalctl -b -t systemd --grep '\.device: Changed plugged -> dead'; then
exit 1
fi