Skip to content

Commit

Permalink
Merge pull request systemd#30620 from mrc0mmand/more-test-tweaks
Browse files Browse the repository at this point in the history
test: a couple of fixes for failing tests
  • Loading branch information
yuwata authored Dec 24, 2023
2 parents 891e81e + b4a21d5 commit 902279f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/busctl/busctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1320,24 +1320,24 @@ static int monitor(int argc, char **argv, int (*dump)(sd_bus_message *m, FILE *f
if (r < 0)
return log_error_errno(r, "Failed to process bus: %m");

if (!is_monitor) {
const char *name;
if (m) {
if (!is_monitor) {
const char *name;

/* wait until we lose our unique name */
if (sd_bus_message_is_signal(m, "org.freedesktop.DBus", "NameLost") <= 0)
continue;
/* wait until we lose our unique name */
if (sd_bus_message_is_signal(m, "org.freedesktop.DBus", "NameLost") <= 0)
continue;

r = sd_bus_message_read(m, "s", &name);
if (r < 0)
return bus_log_parse_error(r);
r = sd_bus_message_read(m, "s", &name);
if (r < 0)
return bus_log_parse_error(r);

if (streq(name, unique_name))
is_monitor = true;
if (streq(name, unique_name))
is_monitor = true;

continue;
}
continue;
}

if (m) {
dump(m, stdout);
fflush(stdout);

Expand Down
1 change: 1 addition & 0 deletions test/units/testsuite-07.issue-30412.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ EOF
cat >/run/systemd/system/badbin_assert.socket <<EOF
[Socket]
ListenStream=@badbin_assert.socket
FlushPending=yes
EOF

systemctl daemon-reload
Expand Down

0 comments on commit 902279f

Please sign in to comment.