]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-sd-device: log earlier which device is handled
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 4 Apr 2022 09:42:29 +0000 (18:42 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 5 Apr 2022 05:29:41 +0000 (14:29 +0900)
To make debugging the test easier.

src/libsystemd/sd-device/test-sd-device.c

index 8d7cb792d6835584d1128b5159c2f5eaaf5a197f..f47df7974327ebc7f0f710adfc877bcbe729a670 100644 (file)
@@ -25,6 +25,9 @@ static void test_sd_device_one(sd_device *d) {
 
         assert_se(sd_device_get_syspath(d, &syspath) >= 0);
         assert_se(path_startswith(syspath, "/sys"));
+
+        log_info("%s(%s)", __func__, syspath);
+
         assert_se(sd_device_new_from_syspath(&dev, syspath) >= 0);
         assert_se(sd_device_get_syspath(dev, &val) >= 0);
         assert_se(streq(syspath, val));
@@ -145,8 +148,6 @@ static void test_sd_device_one(sd_device *d) {
         assert_se(sd_device_new_from_device_id(&dev, id) >= 0);
         assert_se(sd_device_get_syspath(dev, &val) >= 0);
         assert_se(streq(syspath, val));
-
-        log_info("syspath:%s subsystem:%s id:%s initialized:%s", syspath, strna(subsystem), id, yes_no(i));
 }
 
 TEST(sd_device_enumerator_devices) {