[Lldb-commits] [lldb] [lldb] Fixed the TestGdbRemotePlatformFile test running on a remote target (PR #93832)
via lldb-commits
lldb-commits at lists.llvm.org
Thu May 30 07:45:59 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Dmitry Vasilyev (slydiman)
<details>
<summary>Changes</summary>
Skip checking of few stat fields like st_dev (ID of device containing file) in case of a remote target.
---
Full diff: https://github.com/llvm/llvm-project/pull/93832.diff
1 Files Affected:
- (modified) lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py (+16-9)
``````````diff
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(
``````````
</details>
https://github.com/llvm/llvm-project/pull/93832
More information about the lldb-commits
mailing list