test: make test-sd-device stricter
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 9 Oct 2018 13:53:13 +0000 (22:53 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 13 Oct 2018 12:45:50 +0000 (21:45 +0900)
src/libsystemd/sd-device/test-sd-device.c

index 6f4f2e1..e2701e0 100644 (file)
@@ -113,13 +113,7 @@ static void test_sd_device_enumerator_filter_subsystem(void) {
                         assert_se(hashmap_put(subsystems, str, h) >= 0);
                 }
 
-                r = hashmap_put(h, syspath, d);
-                assert_se(r >= 0 || r == -EEXIST);
-                if (r < 0) {
-                        log_info("Duplicated subsystem:%s syspath:%s", subsystem, syspath);
-                        continue;
-                }
-
+                assert_se(hashmap_put(h, syspath, d) >= 0);
                 assert_se(sd_device_ref(d));
 
                 log_debug("Added subsystem:%s syspath:%s", subsystem, syspath);