Merge pull request #27634 from mrc0mmand/TEST-13-shenanigans

test: clean up & extend the nspawn/machinectl test suite
This commit is contained in:
Luca Boccassi
2023-05-13 10:23:14 +01:00
committed by GitHub
12 changed files with 626 additions and 331 deletions
+2 -4
View File
@@ -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]);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);