tests: some minor CI fixes (#44097)

Some fixes for flakiness seen on CI
This commit is contained in:
Lennart Poettering authored and GitHub committed 2026-10-09 18:17:25 +02:00
commit 5ad26e0080
2 files changed
+10 -2

No files matched your search

+9 -1
View File
@@ -110,7 +110,15 @@ static void test_sd_device_one(sd_device *d) {
log_info("%s(%s)", __func__, syspath);
ASSERT_OK(sd_device_new_from_syspath(&dev, syspath));
r = sd_device_new_from_syspath(&dev, syspath);
if (ERRNO_IS_DEVICE_ABSENT(r)) {
/* Devices may be hot-unplugged while we are running, e.g. on Azure the accelerated
* networking PCI VF behind a Hyper-V vmbus PCI bridge may be removed and re-added
* during host servicing. Don't fail the test if a device vanished since enumeration. */
log_device_notice_errno(d, r, "Device disappeared while running the test, skipping: %m");
return;
}
ASSERT_OK(r);
ASSERT_OK(sd_device_get_syspath(dev, &val));
ASSERT_STREQ(syspath, val);
ASSERT_NULL(dev = sd_device_unref(dev));
+1 -1
View File
@@ -8,7 +8,7 @@ set -o pipefail
# Coverage test for udevadm
# shellcheck disable=SC2317
# shellcheck disable=SC2317,SC2329
cleanup() {
set +e