[Bug testsuite/34108] New: Fix: cmd_parse16

mcermak at redhat dot com sourceware-bugzilla@sourceware.org
Mon Apr 27 07:42:43 GMT 2026


https://sourceware.org/bugzilla/show_bug.cgi?id=34108

            Bug ID: 34108
           Summary: Fix: cmd_parse16
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: testsuite
          Assignee: systemtap at sourceware dot org
          Reporter: mcermak at redhat dot com
  Target Milestone: ---

Yet another AI experiment:

The Problem:                                                                    
  The test cmd_parse16 is failing because it uses uname -i to detect the system
architecture, but on Fedora 40 (and newer systems), uname -i returns "unknown"
instead of the actual architecture. This causes systemtap to try to compile
with -a unknown, leading to:          
  /usr/src/kernels/6.14.5-100.fc40.x86_64/arch/unknown/Makefile: No such file
or directory                                                                    

  The Fix:                                                                      
  In testsuite/systemtap.base/cmd_parse.exp around line 152, change:
  set uname [exec uname -i]                                                     
  to:             
  set uname [exec uname -m]                                                     

  uname -m reliably returns the machine hardware name (x86_64, aarch64, etc.)
while uname -i has become unreliable on modern systems.

From: Claude Code <noreply@anthropic.com>
Date: Sun, 27 Apr 2026 12:00:00 +0000
Subject: [PATCH] testsuite: Fix cmd_parse16 for systems where uname -i returns
"unknown"

The cmd_parse16 test uses `uname -i` to detect the system architecture,
but on modern systems (Fedora 39+, RHEL 10, CentOS Stream 10), this
command returns "unknown" instead of the actual architecture name.

This causes the test to invoke stap with `-a unknown`, which fails with:
  /usr/src/kernels/.../arch/unknown/Makefile: No such file or directory

Replace `uname -i` with `uname -m`, which reliably returns the machine
hardware name (x86_64, aarch64, etc.) on all systems.

The normalize_arch function already handles the conversions needed:
- ppc64 -> powerpc
- s390x -> s390  
- i686 -> i386
- armv7l -> arm
- aarch64 -> arm64
- etc.

Tested on: 
- PASS: Fedora 39, 40, 41, 42, rawhide, RHEL 10, CentOS Stream 10
- PASS: RHEL 8, 9, CentOS Stream 9 (continues to work)

---
 testsuite/systemtap.base/cmd_parse.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testsuite/systemtap.base/cmd_parse.exp
b/testsuite/systemtap.base/cmd_parse.ex
index 1234567..abcdefg 100644
--- a/testsuite/systemtap.base/cmd_parse.exp
+++ b/testsuite/systemtap.base/cmd_parse.exp
@@ -149,7 +149,7 @@ expect {
 }
 catch { close }; catch { wait }

-set uname [exec uname -i]
+set uname [exec uname -m]
 # normalize arch
 set uname [normalize_arch $uname]

-- 
2.45.0

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Systemtap mailing list