* [PATCH] tests/tcg: Fix the /proc/self/mem probing in the PROT_NONE gdbstub test
@ 2024-01-31 22:02 Ilya Leoshkevich
2024-02-02 4:20 ` Richard Henderson
2024-02-03 20:48 ` Michael Tokarev
0 siblings, 2 replies; 4+ messages in thread
From: Ilya Leoshkevich @ 2024-01-31 22:02 UTC (permalink / raw)
To: Alex Bennée
Cc: Philippe Mathieu-Daudé, qemu-devel, Ilya Leoshkevich
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")
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] tests/tcg: Fix the /proc/self/mem probing in the PROT_NONE gdbstub test
2024-01-31 22:02 [PATCH] tests/tcg: Fix the /proc/self/mem probing in the PROT_NONE gdbstub test Ilya Leoshkevich
@ 2024-02-02 4:20 ` Richard Henderson
2024-02-03 20:48 ` Michael Tokarev
1 sibling, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2024-02-02 4:20 UTC (permalink / raw)
To: Ilya Leoshkevich, Alex Bennée
Cc: Philippe Mathieu-Daudé, qemu-devel
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~
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tests/tcg: Fix the /proc/self/mem probing in the PROT_NONE gdbstub test
2024-01-31 22:02 [PATCH] tests/tcg: Fix the /proc/self/mem probing in the PROT_NONE gdbstub test Ilya Leoshkevich
2024-02-02 4:20 ` Richard Henderson
@ 2024-02-03 20:48 ` Michael Tokarev
2024-02-05 9:58 ` Ilya Leoshkevich
1 sibling, 1 reply; 4+ messages in thread
From: Michael Tokarev @ 2024-02-03 20:48 UTC (permalink / raw)
To: Ilya Leoshkevich, Alex Bennée
Cc: Philippe Mathieu-Daudé, qemu-devel
01.02.2024 01: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")
FWIW (it's too late already and this commit has landed in master),
commit "tests/tcg: Add the PROT_NONE gdbstub test" is 82607a73f8
not dc84d50a7f9b.
/mjt
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Re: [PATCH] tests/tcg: Fix the /proc/self/mem probing in the PROT_NONE gdbstub test
2024-02-03 20:48 ` Michael Tokarev
@ 2024-02-05 9:58 ` Ilya Leoshkevich
0 siblings, 0 replies; 4+ messages in thread
From: Ilya Leoshkevich @ 2024-02-05 9:58 UTC (permalink / raw)
To: Michael Tokarev, Alex Bennée; +Cc: Philippe Mathieu-Daudé, qemu-devel
On Sat, Feb 03, 2024 at 11:48:44PM +0300, Michael Tokarev wrote:
> 01.02.2024 01: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")
>
> FWIW (it's too late already and this commit has landed in master),
> commit "tests/tcg: Add the PROT_NONE gdbstub test" is 82607a73f8
> not dc84d50a7f9b.
>
> /mjt
Sorry about that; I thought that checkpatch catches such issues and
didn't double check - but apparently this is a relatively new addition
to the kernel checkpatch, which did not find its way into the qemu
checkpatch yet.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-02-05 9:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-31 22:02 [PATCH] tests/tcg: Fix the /proc/self/mem probing in the PROT_NONE gdbstub test Ilya Leoshkevich
2024-02-02 4:20 ` Richard Henderson
2024-02-03 20:48 ` Michael Tokarev
2024-02-05 9:58 ` Ilya Leoshkevich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).