Merge pull request #27634 from mrc0mmand/TEST-13-shenanigans
test: clean up & extend the nspawn/machinectl test suite
This commit is contained in:
@@ -687,9 +687,7 @@ static int show_machine_properties(sd_bus *bus, const char *path, bool *new_line
|
||||
}
|
||||
|
||||
static int show_machine(int argc, char *argv[], void *userdata) {
|
||||
|
||||
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
|
||||
_cleanup_(sd_bus_message_unrefp) sd_bus_message *reply = NULL;
|
||||
bool properties, new_line = false;
|
||||
sd_bus *bus = ASSERT_PTR(userdata);
|
||||
int r = 0;
|
||||
@@ -708,6 +706,7 @@ static int show_machine(int argc, char *argv[], void *userdata) {
|
||||
}
|
||||
|
||||
for (int i = 1; i < argc; i++) {
|
||||
_cleanup_(sd_bus_message_unrefp) sd_bus_message *reply = NULL;
|
||||
const char *path = NULL;
|
||||
|
||||
r = bus_call_method(bus, bus_machine_mgr, "GetMachine", &error, &reply, "s", argv[i]);
|
||||
@@ -984,9 +983,7 @@ static int show_image_properties(sd_bus *bus, const char *path, bool *new_line)
|
||||
}
|
||||
|
||||
static int show_image(int argc, char *argv[], void *userdata) {
|
||||
|
||||
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
|
||||
_cleanup_(sd_bus_message_unrefp) sd_bus_message *reply = NULL;
|
||||
bool properties, new_line = false;
|
||||
sd_bus *bus = ASSERT_PTR(userdata);
|
||||
int r = 0;
|
||||
@@ -1009,6 +1006,7 @@ static int show_image(int argc, char *argv[], void *userdata) {
|
||||
}
|
||||
|
||||
for (int i = 1; i < argc; i++) {
|
||||
_cleanup_(sd_bus_message_unrefp) sd_bus_message *reply = NULL;
|
||||
const char *path = NULL;
|
||||
|
||||
r = bus_call_method(bus, bus_machine_mgr, "GetImage", &error, &reply, "s", argv[i]);
|
||||
|
||||
@@ -15,7 +15,7 @@ static int operation_done(sd_event_source *s, const siginfo_t *si, void *userdat
|
||||
|
||||
assert(si);
|
||||
|
||||
log_debug("Operating " PID_FMT " is now complete with code=%s status=%i",
|
||||
log_debug("Operation " PID_FMT " is now complete with code=%s status=%i",
|
||||
o->pid,
|
||||
sigchld_code_to_string(si->si_code), si->si_status);
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ static int operation_done(sd_event_source *s, const siginfo_t *si, void *userdat
|
||||
|
||||
assert(si);
|
||||
|
||||
log_debug("Operating " PID_FMT " is now complete with code=%s status=%i",
|
||||
log_debug("Operation " PID_FMT " is now complete with code=%s status=%i",
|
||||
o->pid,
|
||||
sigchld_code_to_string(si->si_code), si->si_status);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user