]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: ignore `busctl tree` fails
authorFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 9 Mar 2023 10:34:14 +0000 (11:34 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 9 Mar 2023 10:34:14 +0000 (11:34 +0100)
As the test runs during machine bootup where jobs run in parallel,
busctl might attempt to introspect a job that already finished and fail.
Since in this case we're more interested in crashes/leaks, let's ignore
the exit code.

Follow-up to 16600a8661.

test/units/testsuite-74.busctl.sh

index 44d8032d8bcd8b98106464208129e8ede9cdf3c6..6e905a025a260f06b439a30598ef95cb9d30bbea 100755 (executable)
@@ -19,7 +19,10 @@ busctl status
 busctl status --machine=.host --augment-creds=no
 busctl status --user --machine=testuser@.host
 busctl status org.freedesktop.systemd1
-busctl tree
+# Ignore the exit code here, since this runs during machine bootup, so busctl
+# might attempt to introspect a job that already finished and fail, i.e.:
+# Failed to introspect object /org/freedesktop/systemd1/job/335 of service org.freedesktop.systemd1: Unknown object '/org/freedesktop/systemd1/job/335'.
+busctl tree || :
 busctl tree org.freedesktop.login1
 busctl tree --list org.freedesktop.login1
 busctl introspect org.freedesktop.systemd1 /org/freedesktop/systemd1