Loading fs_mgr/libdm/dm_test.cpp +12 −1 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <stdio.h> #include <stdio.h> #include <sys/ioctl.h> #include <sys/ioctl.h> #include <sys/types.h> #include <sys/types.h> #include <sys/utsname.h> #include <time.h> #include <time.h> #include <unistd.h> #include <unistd.h> Loading Loading @@ -692,7 +693,17 @@ TEST(libdm, CreateEmptyDevice) { } } TEST(libdm, UeventAfterLoadTable) { TEST(libdm, UeventAfterLoadTable) { static const char* kDeviceName = "libmd-test-uevent-load-table"; static const char* kDeviceName = "libdm-test-uevent-load-table"; struct utsname u; ASSERT_EQ(uname(&u), 0); unsigned int major, minor; ASSERT_EQ(sscanf(u.release, "%u.%u", &major, &minor), 2); if (major < 5 || (major == 5 && minor < 15)) { GTEST_SKIP() << "Skipping test on kernel < 5.15"; } DeviceMapper& dm = DeviceMapper::Instance(); DeviceMapper& dm = DeviceMapper::Instance(); ASSERT_TRUE(dm.CreateEmptyDevice(kDeviceName)); ASSERT_TRUE(dm.CreateEmptyDevice(kDeviceName)); Loading Loading
fs_mgr/libdm/dm_test.cpp +12 −1 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <stdio.h> #include <stdio.h> #include <sys/ioctl.h> #include <sys/ioctl.h> #include <sys/types.h> #include <sys/types.h> #include <sys/utsname.h> #include <time.h> #include <time.h> #include <unistd.h> #include <unistd.h> Loading Loading @@ -692,7 +693,17 @@ TEST(libdm, CreateEmptyDevice) { } } TEST(libdm, UeventAfterLoadTable) { TEST(libdm, UeventAfterLoadTable) { static const char* kDeviceName = "libmd-test-uevent-load-table"; static const char* kDeviceName = "libdm-test-uevent-load-table"; struct utsname u; ASSERT_EQ(uname(&u), 0); unsigned int major, minor; ASSERT_EQ(sscanf(u.release, "%u.%u", &major, &minor), 2); if (major < 5 || (major == 5 && minor < 15)) { GTEST_SKIP() << "Skipping test on kernel < 5.15"; } DeviceMapper& dm = DeviceMapper::Instance(); DeviceMapper& dm = DeviceMapper::Instance(); ASSERT_TRUE(dm.CreateEmptyDevice(kDeviceName)); ASSERT_TRUE(dm.CreateEmptyDevice(kDeviceName)); Loading