Skip to contentSkip to conversation

tests/tcg: Skip syscall catchpoint test if pipe2() syscall not available

RFC In review Philippe Mathieu-Daudé 3 participants 4 messages Dec 3, 2025 – Dec 9, 2025

lore
Share & tools
lore
#0 lore raw

RFC v2 1/1 tests/tcg: Skip syscall catchpoint test if pipe2() syscall not available

Avoid the following errors testing i386 and ppc64:

  $ make check-tcg
  ...
    TEST    hitting a syscall catchpoint on i386
  warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
  Traceback (most recent call last):
    File "tests/tcg/multiarch/gdbstub/catch-syscalls.py", line 53, in <module>
      main(run_test)
    File "tests/guest-debug/test_gdbstub.py", line 53, in main
      test()
    File "tests/tcg/multiarch/gdbstub/catch-syscalls.py", line 22, in run_test
      gdb.execute("catch syscall pipe2 read")
  gdb.error: Unknown syscall name 'pipe2'.
  qemu-i386: QEMU: Terminated via GDBstub
  ...
    TEST    hitting a syscall catchpoint on ppc64
  warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
  Traceback (most recent call last):
    File "tests/tcg/multiarch/gdbstub/catch-syscalls.py", line 53, in <module>
      main(run_test)
    File "tests/guest-debug/test_gdbstub.py", line 53, in main
      test()
    File "tests/tcg/multiarch/gdbstub/catch-syscalls.py", line 22, in run_test
      gdb.execute("catch syscall pipe2 read")
  gdb.error: Unknown syscall name 'pipe2'.
  qemu-ppc64: QEMU: Terminated via GDBstub
  ...
    TEST    hitting a syscall catchpoint on ppc64le
  warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
  Traceback (most recent call last):
    File "tests/tcg/multiarch/gdbstub/catch-syscalls.py", line 53, in <module>
      main(run_test)
    File "tests/guest-debug/test_gdbstub.py", line 53, in main
      test()
    File "tests/tcg/multiarch/gdbstub/catch-syscalls.py", line 22, in run_test
      gdb.execute("catch syscall pipe2 read")
  gdb.error: Unknown syscall name 'pipe2'.
  qemu-ppc64le: QEMU: Terminated via GDBstub
  make: Target 'check-tcg' not remade because of errors.

---
RFC because I have no clue whether SYS_pipe2 should be present
on these targets, I just want the CI to pass full green.

v2: Drop extraneous 'if'

---
 tests/tcg/multiarch/gdbstub/catch-syscalls.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/tcg/multiarch/gdbstub/catch-syscalls.py +2 -1
index ccce35902fb..79c8d532d1f 100644
@@ -22,7 +22,8 @@ def run_test():
         gdb.execute("catch syscall pipe2 read")
     except gdb.error as exc:
         exc_str = str(exc)
-        if "not supported on this architecture" in exc_str:
+        if "not supported on this architecture" in exc_str \
+                or "Unknown syscall name 'pipe2'" in exc_str:
             print("SKIP: {}".format(exc_str))
             return
         raise
Signature · 1 line
2.51.0
#1 lore raw

ping?

Quoted 65 lines · Philippe Mathieu-Daudé

Avoid the following errors testing i386 and ppc64:

   $ make check-tcg
   ...
     TEST    hitting a syscall catchpoint on i386
   warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
   Traceback (most recent call last):
     File "tests/tcg/multiarch/gdbstub/catch-syscalls.py", line 53, in <module>
       main(run_test)
     File "tests/guest-debug/test_gdbstub.py", line 53, in main
       test()
     File "tests/tcg/multiarch/gdbstub/catch-syscalls.py", line 22, in run_test
       gdb.execute("catch syscall pipe2 read")
   gdb.error: Unknown syscall name 'pipe2'.
   qemu-i386: QEMU: Terminated via GDBstub
   ...
     TEST    hitting a syscall catchpoint on ppc64
   warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
   Traceback (most recent call last):
     File "tests/tcg/multiarch/gdbstub/catch-syscalls.py", line 53, in <module>
       main(run_test)
     File "tests/guest-debug/test_gdbstub.py", line 53, in main
       test()
     File "tests/tcg/multiarch/gdbstub/catch-syscalls.py", line 22, in run_test
       gdb.execute("catch syscall pipe2 read")
   gdb.error: Unknown syscall name 'pipe2'.
   qemu-ppc64: QEMU: Terminated via GDBstub
   ...
     TEST    hitting a syscall catchpoint on ppc64le
   warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
   Traceback (most recent call last):
     File "tests/tcg/multiarch/gdbstub/catch-syscalls.py", line 53, in <module>
       main(run_test)
     File "tests/guest-debug/test_gdbstub.py", line 53, in main
       test()
     File "tests/tcg/multiarch/gdbstub/catch-syscalls.py", line 22, in run_test
       gdb.execute("catch syscall pipe2 read")
   gdb.error: Unknown syscall name 'pipe2'.
   qemu-ppc64le: QEMU: Terminated via GDBstub
   make: Target 'check-tcg' not remade because of errors.

---
RFC because I have no clue whether SYS_pipe2 should be present
on these targets, I just want the CI to pass full green.

v2: Drop extraneous 'if'

---
  tests/tcg/multiarch/gdbstub/catch-syscalls.py | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
tests/tcg/multiarch/gdbstub/catch-syscalls.py +2 -1
index ccce35902fb..79c8d532d1f 100644
@@ -22,7 +22,8 @@ def run_test():
          gdb.execute("catch syscall pipe2 read")
      except gdb.error as exc:
          exc_str = str(exc)
-        if "not supported on this architecture" in exc_str:
+        if "not supported on this architecture" in exc_str \
+                or "Unknown syscall name 'pipe2'" in exc_str:
              print("SKIP: {}".format(exc_str))
              return
          raise
#2 lore raw
Quoted 54 lines · Philippe Mathieu-Daudé

ping?

Quoted 51 lines · Philippe Mathieu-Daudé

Avoid the following errors testing i386 and ppc64:

   $ make check-tcg
   ...
     TEST    hitting a syscall catchpoint on i386
   warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
   Traceback (most recent call last):
     File "tests/tcg/multiarch/gdbstub/catch-syscalls.py", line 53, in <module>
       main(run_test)
     File "tests/guest-debug/test_gdbstub.py", line 53, in main
       test()
     File "tests/tcg/multiarch/gdbstub/catch-syscalls.py", line 22, in run_test
       gdb.execute("catch syscall pipe2 read")
   gdb.error: Unknown syscall name 'pipe2'.
   qemu-i386: QEMU: Terminated via GDBstub
   ...
     TEST    hitting a syscall catchpoint on ppc64
   warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
   Traceback (most recent call last):
     File "tests/tcg/multiarch/gdbstub/catch-syscalls.py", line 53, in <module>
       main(run_test)
     File "tests/guest-debug/test_gdbstub.py", line 53, in main
       test()
     File "tests/tcg/multiarch/gdbstub/catch-syscalls.py", line 22, in run_test
       gdb.execute("catch syscall pipe2 read")
   gdb.error: Unknown syscall name 'pipe2'.
   qemu-ppc64: QEMU: Terminated via GDBstub
   ...
     TEST    hitting a syscall catchpoint on ppc64le
   warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
   Traceback (most recent call last):
     File "tests/tcg/multiarch/gdbstub/catch-syscalls.py", line 53, in <module>
       main(run_test)
     File "tests/guest-debug/test_gdbstub.py", line 53, in main
       test()
     File "tests/tcg/multiarch/gdbstub/catch-syscalls.py", line 22, in run_test
       gdb.execute("catch syscall pipe2 read")
   gdb.error: Unknown syscall name 'pipe2'.
   qemu-ppc64le: QEMU: Terminated via GDBstub
   make: Target 'check-tcg' not remade because of errors.

---
RFC because I have no clue whether SYS_pipe2 should be present on these targets, I just want the CI to pass full green.

v2: Drop extraneous 'if'
---
  tests/tcg/multiarch/gdbstub/catch-syscalls.py | 3 ++-

  1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 16 lines
Quoted 6 lines
tests/tcg/multiarch/gdbstub/catch-syscalls.py +0 -0
index ccce35902fb..79c8d532d1f 100644
@@ -22,7 +22,8 @@ def run_test():
           gdb.execute("catch syscall pipe2 read")
Quoted 8 lines

      except gdb.error as exc:
          exc_str = str(exc)
-        if "not supported on this architecture" in exc_str:
+        if "not supported on this architecture" in exc_str \
+                or "Unknown syscall name 'pipe2'" in exc_str:
              print("SKIP: {}".format(exc_str)) return
          raise

Seems reasonable.

r~
s

#3 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 3 lines · Philippe Mathieu-Daudé

Avoid the following errors testing i386 and ppc64:

  $ make check-tcg

what are you running on that this fails?

Signature · 2 lines
Alex Bennée
Virtualisation Tech Lead @ Linaro