test/TEST-31-DEVICE-ENUMERATION: do not use -x to avoid grep loop
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 8 Oct 2019 09:11:49 +0000 (11:11 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 8 Oct 2019 09:11:49 +0000 (11:11 +0200)
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.

test/TEST-31-DEVICE-ENUMERATION/testsuite.sh

index aa94d59..047c1be 100755 (executable)
@@ -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