From: Yu Watanabe Date: Fri, 10 Jun 2022 06:36:17 +0000 (+0900) Subject: test: always exclude devices named loop* X-Git-Tag: v252-rc1~827^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9e090b16db7356ed95e16467128401b89b82abe;p=thirdparty%2Fsystemd.git test: always exclude devices named loop* Not only block subsystem, but also misc has device named "loop*", and the test always said that the following device is newly found: --- /* test_sd_device_enumerator_filter_subsystem */ New device found: subsystem:misc syspath:/sys/devices/virtual/misc/loop-control 1 new devices are found in re-scan --- --- diff --git a/src/libsystemd/sd-device/test-sd-device.c b/src/libsystemd/sd-device/test-sd-device.c index 5e3536be40b..62e10ad6512 100644 --- a/src/libsystemd/sd-device/test-sd-device.c +++ b/src/libsystemd/sd-device/test-sd-device.c @@ -215,8 +215,7 @@ static void test_sd_device_enumerator_filter_subsystem_one( assert_se(sd_device_enumerator_new(&e) >= 0); assert_se(sd_device_enumerator_add_match_subsystem(e, subsystem, true) >= 0); - if (streq(subsystem, "block")) - assert_se(sd_device_enumerator_add_nomatch_sysname(e, "loop*") >= 0); + assert_se(sd_device_enumerator_add_nomatch_sysname(e, "loop*") >= 0); FOREACH_DEVICE(e, d) { const char *syspath;