test-sd-device: log earlier which device is handled

To make debugging the test easier.
This commit is contained in:
Yu Watanabe
2022-04-05 14:29:41 +09:00
parent 2df5a7d3f1
commit 04d1fbd564
+3 -2
View 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) {