This revision was automatically updated to reflect the committed changes.
Closed by commit rGd3292c4ba0ce: [lldb] [test] Fix test_platform_file_fstat to 
account for negative ints (authored by mgorny).
Herald added a project: LLDB.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128042/new/

https://reviews.llvm.org/D128042

Files:
  lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py


Index: lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py
===================================================================
--- lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py
+++ lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py
@@ -32,11 +32,11 @@
 
 
 def uint32_or_zero(x):
-    return x if x < 2**32 else 0
+    return x if x < 2**32 and x >= 0 else 0
 
 
 def uint32_or_max(x):
-    return x if x < 2**32 else 2**32 - 1
+    return x if x < 2**32 and x >= 0 else 2**32 - 1
 
 
 def uint32_trunc(x):


Index: lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py
===================================================================
--- lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py
+++ lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py
@@ -32,11 +32,11 @@
 
 
 def uint32_or_zero(x):
-    return x if x < 2**32 else 0
+    return x if x < 2**32 and x >= 0 else 0
 
 
 def uint32_or_max(x):
-    return x if x < 2**32 else 2**32 - 1
+    return x if x < 2**32 and x >= 0 else 2**32 - 1
 
 
 def uint32_trunc(x):
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
  • [Lldb-commits] [PATCH] D12... Michał Górny via Phabricator via lldb-commits
    • [Lldb-commits] [PATCH... Michał Górny via Phabricator via lldb-commits

Reply via email to