mirror of
https://github.com/Jeffrey-Sardina/liberated-systemd.git
synced 2026-10-19 01:29:53 -05:00
tests: some minor CI fixes (#44097)
Some fixes for flakiness seen on CI
This commit is contained in:
2 files changed
+10
-2
No files matched your search
@@ -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));
|
||||
|
||||
@@ -8,7 +8,7 @@ set -o pipefail
|
||||
|
||||
# Coverage test for udevadm
|
||||
|
||||
# shellcheck disable=SC2317
|
||||
# shellcheck disable=SC2317,SC2329
|
||||
cleanup() {
|
||||
set +e
|
||||
|
||||
|
||||
Reference in new issue
Block a user