A few tests need to know the generic architecture name rather than
the specific variant. This patch factors out the code into
testsuite/lib/systemtap.exp and add entries for the arm architecture
variants.
}
}
+proc normalize_arch { arch } {
+ if {$arch == "ppc64"} then {return "powerpc"}
+ if {$arch == "s390x"} then {return "s390"}
+ if {$arch == "i686"} then {return "i386"}
+ if {$arch == "armv5tel"} then {return "arm"}
+ if {$arch == "armv7l"} then {return "arm"}
+ if {$arch == "armv7lh"} then {return "arm"}
+ return $arch
+}
+
proc get_system_info {} {
global Host Snapshot Distro GCC_Version env
set uname [exec uname -i]
# normalize arch
-if {$uname == "ppc64"} then {set uname powerpc}
-if {$uname == "s390x"} then {set uname s390}
-if {$uname == "i686"} then {set uname i386}
+set uname [normalize_arch $uname]
spawn sh -c "stap -m do_not_cache_me -a $uname -p4 -e 'probe begin {exit()}'"
# the \r below is meant to match the "kernelrelease" output, as distinct from
set arch [exec uname -i]
# normalize arch; PR4186
-if {$arch == "ppc64"} then {set arch powerpc}
-if {$arch == "s390x"} then {set arch s390}
-if {$arch == "i686"} then {set arch i386}
+set arch [normalize_arch $arch]
set ar "?[string range $arch 1 end-1]?"
set arx {?noSuchArch?}