qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tests/tcg: Fix the /proc/self/mem probing in the PROT_NONE g


From: Richard Henderson
Subject: Re: [PATCH] tests/tcg: Fix the /proc/self/mem probing in the PROT_NONE gdbstub test
Date: Fri, 2 Feb 2024 14:20:28 +1000
User-agent: Mozilla Thunderbird

On 2/1/24 08:02, Ilya Leoshkevich wrote:
The `if not probe_proc_self_mem` check never passes, because
probe_proc_self_mem is a function object, which is a truthy value.
Add parentheses in order to perform a function call.

Fixes: dc84d50a7f9b ("tests/tcg: Add the PROT_NONE gdbstub test")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---
  tests/tcg/multiarch/gdbstub/prot-none.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/tcg/multiarch/gdbstub/prot-none.py 
b/tests/tcg/multiarch/gdbstub/prot-none.py
index e829d3ebc5f..7e264589cb8 100644
--- a/tests/tcg/multiarch/gdbstub/prot-none.py
+++ b/tests/tcg/multiarch/gdbstub/prot-none.py
@@ -20,7 +20,7 @@ def probe_proc_self_mem():
def run_test():
      """Run through the tests one by one"""
-    if not probe_proc_self_mem:
+    if not probe_proc_self_mem():
          print("SKIP: /proc/self/mem is not usable")
          exit(0)
      gdb.Breakpoint("break_here")

Ack.  Queued to tcg-next.

r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]