mirror of
https://github.com/systemd/systemd
synced 2024-10-15 04:24:19 +00:00
Merge pull request #30200 from mrc0mmand/test-tweaks
A couple of assorted fixes
This commit is contained in:
commit
54f3b3d2a4
|
@ -120,7 +120,7 @@ static void raw_export_report_progress(RawExport *e) {
|
|||
if (!ratelimit_below(&e->progress_ratelimit))
|
||||
return;
|
||||
|
||||
sd_notifyf(false, "X_IMPORT_PROGRESS=%u", percent);
|
||||
sd_notifyf(false, "X_IMPORT_PROGRESS=%u%%", percent);
|
||||
log_info("Exported %u%%.", percent);
|
||||
|
||||
e->last_percent = percent;
|
||||
|
|
|
@ -131,7 +131,7 @@ static void tar_export_report_progress(TarExport *e) {
|
|||
if (!ratelimit_below(&e->progress_ratelimit))
|
||||
return;
|
||||
|
||||
sd_notifyf(false, "X_IMPORT_PROGRESS=%u", percent);
|
||||
sd_notifyf(false, "X_IMPORT_PROGRESS=%u%%", percent);
|
||||
log_info("Exported %u%%.", percent);
|
||||
|
||||
e->last_percent = percent;
|
||||
|
|
|
@ -147,7 +147,7 @@ static void raw_import_report_progress(RawImport *i) {
|
|||
if (!ratelimit_below(&i->progress_ratelimit))
|
||||
return;
|
||||
|
||||
sd_notifyf(false, "X_IMPORT_PROGRESS=%u", percent);
|
||||
sd_notifyf(false, "X_IMPORT_PROGRESS=%u%%", percent);
|
||||
log_info("Imported %u%%.", percent);
|
||||
|
||||
i->last_percent = percent;
|
||||
|
|
|
@ -148,7 +148,7 @@ static void tar_import_report_progress(TarImport *i) {
|
|||
if (!ratelimit_below(&i->progress_ratelimit))
|
||||
return;
|
||||
|
||||
sd_notifyf(false, "X_IMPORT_PROGRESS=%u", percent);
|
||||
sd_notifyf(false, "X_IMPORT_PROGRESS=%u%%", percent);
|
||||
log_info("Imported %u%%.", percent);
|
||||
|
||||
i->last_percent = percent;
|
||||
|
|
|
@ -598,7 +598,7 @@ static int manager_on_notify(sd_event_source *s, int fd, uint32_t revents, void
|
|||
|
||||
r = parse_percent(p);
|
||||
if (r < 0) {
|
||||
log_warning("Got invalid percent value, ignoring.");
|
||||
log_warning("Got invalid percent value '%s', ignoring.", p);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -232,7 +232,7 @@ static void raw_pull_report_progress(RawPull *i, RawProgress p) {
|
|||
assert_not_reached();
|
||||
}
|
||||
|
||||
sd_notifyf(false, "X_IMPORT_PROGRESS=%u", percent);
|
||||
sd_notifyf(false, "X_IMPORT_PROGRESS=%u%%", percent);
|
||||
log_debug("Combined progress %u%%", percent);
|
||||
}
|
||||
|
||||
|
|
|
@ -192,7 +192,7 @@ static void tar_pull_report_progress(TarPull *i, TarProgress p) {
|
|||
assert_not_reached();
|
||||
}
|
||||
|
||||
sd_notifyf(false, "X_IMPORT_PROGRESS=%u", percent);
|
||||
sd_notifyf(false, "X_IMPORT_PROGRESS=%u%%", percent);
|
||||
log_debug("Combined progress %u%%", percent);
|
||||
}
|
||||
|
||||
|
|
|
@ -1996,6 +1996,7 @@ static int show_one(
|
|||
bool *ellipsized) {
|
||||
|
||||
static const struct bus_properties_map property_map[] = {
|
||||
{ "Id", "s", NULL, offsetof(UnitStatusInfo, id) },
|
||||
{ "LoadState", "s", NULL, offsetof(UnitStatusInfo, load_state) },
|
||||
{ "ActiveState", "s", NULL, offsetof(UnitStatusInfo, active_state) },
|
||||
{ "FreezerState", "s", NULL, offsetof(UnitStatusInfo, freezer_state) },
|
||||
|
|
|
@ -472,6 +472,8 @@ run_qemu() {
|
|||
|
||||
local CONSOLE=ttyS0
|
||||
|
||||
# Reset the boot counter, if present
|
||||
rm -f "${initdir:?}/var/tmp/.systemd_reboot_count"
|
||||
rm -f "$initdir"/{testok,failed,skipped}
|
||||
# make sure the initdir is not mounted to avoid concurrent access
|
||||
cleanup_initdir
|
||||
|
@ -645,6 +647,8 @@ run_qemu() {
|
|||
# success), or 1 if nspawn is not available.
|
||||
run_nspawn() {
|
||||
[[ -d /run/systemd/system ]] || return 1
|
||||
# Reset the boot counter, if present
|
||||
rm -f "${initdir:?}/var/tmp/.systemd_reboot_count"
|
||||
rm -f "${initdir:?}"/{testok,failed,skipped}
|
||||
|
||||
local nspawn_cmd=()
|
||||
|
@ -3356,9 +3360,6 @@ test_run() {
|
|||
local test_id="${1:?}"
|
||||
mount_initdir
|
||||
|
||||
# Reset the boot counter, if present
|
||||
rm -f "${initdir:?}/var/tmp/.systemd_reboot_count"
|
||||
|
||||
if ! get_bool "${TEST_NO_QEMU:=}"; then
|
||||
if run_qemu "$test_id"; then
|
||||
check_result_qemu || { echo "qemu test failed"; return 1; }
|
||||
|
|
|
@ -10,4 +10,3 @@ After=systemd-journald@foobar.socket systemd-journald-varlink@foobar.socket
|
|||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
Type=oneshot
|
||||
LogTarget=foobar
|
||||
|
|
|
@ -756,7 +756,7 @@ EOF
|
|||
udevadm wait --settle --timeout=30 "/dev/disk/by-uuid/deadbeef-dead-dead-beef-11111111111$i" "/dev/disk/by-label/encdisk$i"
|
||||
# Add the device into /etc/crypttab, reload systemd, and then activate
|
||||
# the device so we can create a filesystem on it later
|
||||
echo "encbtrfs$i UUID=deadbeef-dead-dead-beef-11111111111$i /etc/btrfs_keyfile luks,noearly" >>/etc/crypttab
|
||||
echo "encbtrfs$i UUID=deadbeef-dead-dead-beef-11111111111$i /etc/btrfs_keyfile luks" >>/etc/crypttab
|
||||
systemctl daemon-reload
|
||||
systemctl start "systemd-cryptsetup@encbtrfs$i"
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue