[Lldb-commits] [lldb] b62ba7f - [lldb] Fixed the TestGdbRemotePlatformFile test running on a remote target (#93832)
via lldb-commits
lldb-commits at lists.llvm.org
Thu May 30 08:57:20 PDT 2024
Author: Dmitry Vasilyev
Date: 2024-05-30T19:57:16+04:00
New Revision: b62ba7f5b1caf99a3cbbe06d0e1c788c2dc85416
URL: https://github.com/llvm/llvm-project/commit/b62ba7f5b1caf99a3cbbe06d0e1c788c2dc85416
DIFF: https://github.com/llvm/llvm-project/commit/b62ba7f5b1caf99a3cbbe06d0e1c788c2dc85416.diff
LOG: [lldb] Fixed the TestGdbRemotePlatformFile test running on a remote target (#93832)
Skip checking of few stat fields like st_dev (ID of device containing
file) in case of a remote target.
Added:
Modified:
lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py
Removed:
################################################################################
diff --git a/lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py b/lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py
index 2e1c72ee56d7a..76b0b204123dd 100644
--- a/lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py
+++ b/lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py
@@ -308,19 +308,26 @@ def test_platform_file_fstat(self):
)
sys_stat = os.fstat(temp_file.fileno())
- self.assertEqual(gdb_stat.st_dev, uint32_or_zero(sys_stat.st_dev))
- self.assertEqual(gdb_stat.st_ino, uint32_or_zero(sys_stat.st_ino))
self.assertEqual(gdb_stat.st_mode, uint32_trunc(sys_stat.st_mode))
self.assertEqual(gdb_stat.st_nlink, uint32_or_max(sys_stat.st_nlink))
- self.assertEqual(gdb_stat.st_uid, uint32_or_zero(sys_stat.st_uid))
- self.assertEqual(gdb_stat.st_gid, uint32_or_zero(sys_stat.st_gid))
self.assertEqual(gdb_stat.st_rdev, uint32_or_zero(sys_stat.st_rdev))
self.assertEqual(gdb_stat.st_size, sys_stat.st_size)
- self.assertEqual(gdb_stat.st_blksize, sys_stat.st_blksize)
- self.assertEqual(gdb_stat.st_blocks, sys_stat.st_blocks)
- self.assertEqual(gdb_stat.st_atime, uint32_or_zero(int(sys_stat.st_atime)))
- self.assertEqual(gdb_stat.st_mtime, uint32_or_zero(int(sys_stat.st_mtime)))
- self.assertEqual(gdb_stat.st_ctime, uint32_or_zero(int(sys_stat.st_ctime)))
+ if not lldb.remote_platform:
+ self.assertEqual(gdb_stat.st_dev, uint32_or_zero(sys_stat.st_dev))
+ self.assertEqual(gdb_stat.st_ino, uint32_or_zero(sys_stat.st_ino))
+ self.assertEqual(gdb_stat.st_uid, uint32_or_zero(sys_stat.st_uid))
+ self.assertEqual(gdb_stat.st_gid, uint32_or_zero(sys_stat.st_gid))
+ self.assertEqual(gdb_stat.st_blksize, sys_stat.st_blksize)
+ self.assertEqual(gdb_stat.st_blocks, sys_stat.st_blocks)
+ self.assertEqual(
+ gdb_stat.st_atime, uint32_or_zero(int(sys_stat.st_atime))
+ )
+ self.assertEqual(
+ gdb_stat.st_mtime, uint32_or_zero(int(sys_stat.st_mtime))
+ )
+ self.assertEqual(
+ gdb_stat.st_ctime, uint32_or_zero(int(sys_stat.st_ctime))
+ )
self.reset_test_sequence()
self.test_sequence.add_log_lines(
More information about the lldb-commits
mailing list