[gparted] Accept reading shorter UUIDs from FAT16/32 file systems (!49)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Accept reading shorter UUIDs from FAT16/32 file systems (!49)
- Date: Sat, 9 Nov 2019 17:43:27 +0000 (UTC)
commit c60f2e43a307196c1e4e5de26436ce8e1a2a1cc2
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Mon Aug 5 16:31:02 2019 +0100
Accept reading shorter UUIDs from FAT16/32 file systems (!49)
The tests were failing like this:
$ ./test_SupportedFileSystems --gtest_filter='*CreateAndReadUUID/fat16'
....
[ RUN ] My/SupportedFileSystemsTest.CreateAndReadUUID/fat16
test_SupportedFileSystems.cc:552: Failure
Expected equality of these values:
m_partition.uuid.size()
Which is: 9
36U
Which is: 36
[ FAILED ] My/SupportedFileSystemsTest.CreateAndReadUUID/fat16, where GetParam() = 13 (45 ms)
This is because the test was expecting a full 36 character UUID as used
by Linux file systems. Also accept shorter 9 character "UUID"s as used
by FAT16/32 file systems.
Closes !49 - Add file system interface tests
tests/test_SupportedFileSystems.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/tests/test_SupportedFileSystems.cc b/tests/test_SupportedFileSystems.cc
index 1eb05815..99c59fad 100644
--- a/tests/test_SupportedFileSystems.cc
+++ b/tests/test_SupportedFileSystems.cc
@@ -549,7 +549,7 @@ TEST_P(SupportedFileSystemsTest, CreateAndReadUUID)
// Test reading the UUID is successful.
reload_partition();
m_fs_object->read_uuid(m_partition);
- EXPECT_EQ(m_partition.uuid.size(), 36U);
+ EXPECT_GE(m_partition.uuid.size(), 9U);
// Test messages from read operation are empty or print them.
EXPECT_TRUE(m_partition.get_messages().empty()) << m_partition;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]