Fix flaky stat.cc test.
This test flaked on my current CL. Linux makes no guarantee that two inodes will consecutive (overflows happen). https://github.com/avagin/linux-task-diag/blob/master/fs/inode.c#L880 PiperOrigin-RevId: 260608240
This commit is contained in:
parent
8e8b609611
commit
f0507e1db1
|
@ -539,9 +539,8 @@ TEST(SimpleStatTest, AnonDeviceAllocatesUniqueInodesAcrossSaveRestore) {
|
|||
ASSERT_THAT(fstat(fd1.get(), &st1), SyscallSucceeds());
|
||||
ASSERT_THAT(fstat(fd2.get(), &st2), SyscallSucceeds());
|
||||
|
||||
// The two fds should have different inode numbers. Specifically, since fd2
|
||||
// was created later, it should have a higher inode number.
|
||||
EXPECT_GT(st2.st_ino, st1.st_ino);
|
||||
// The two fds should have different inode numbers.
|
||||
EXPECT_NE(st2.st_ino, st1.st_ino);
|
||||
|
||||
// Verify again after another S/R cycle. The inode numbers should remain the
|
||||
// same.
|
||||
|
|
Loading…
Reference in New Issue