[Lldb-commits] [lldb] [lldb][Windows] Fixed the test gdb_remote_client/TestGDBRemotePlatformFile (PR #92088)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue May 14 09:57:15 PDT 2024


labath wrote:

> The problem is that fstat() is fake on Windows. File::GetPermissions() returns 0 always. The test got 'File permissions of /some/file.txt (remote): 0o0000' So any permissions manipulations are useles on Windows and these tests cannot be adapted.

But who is calling File::GetPermissions? The way I see it, this test is checking that `platform get-permissions /some/file.txt` generates the correct gdb-remote packet. It does that by having the test talk to a simulated/mock gdb server and hardcoding the responses (see line 156, 0x1a4 == 0o664). In theory that should work as there are no real files involved (and for all lldb cares, the remote platform does actually have a functional permission implementation).

https://github.com/llvm/llvm-project/pull/92088


More information about the lldb-commits mailing list