Use uname -m instead of uname -i

-i (and -p) just say "unknown", since Fedora 38. See [1] and [2] for
the original commit and more details. Kudos to awilliam@redhat.com for
fixing this in Fedora tests first.

* [1] https://src.fedoraproject.org/rpms/binutils/c/78d9a63f8ba7e445010ac35ef6620676c33fc645?branch=rawhide
* [2] https://bugzilla.redhat.com/show_bug.cgi?id=2203350
This commit is contained in:
Miloš Prchlík 2023-09-20 10:53:52 +02:00 committed by mprchlik
commit 184f864b87

View file

@ -122,7 +122,7 @@ rlJournalStart
./popcnt > a
rlRun "$ADDR2LINE -e popcnt $(cat a) > r"
# We know that main is at line 4. But on PPC we get ??:0...
if test ! $(uname -i) = "ppc64"; then
if test ! $(uname -m) = "ppc64"; then
rlAssertGrep "popcnt.c:4" r
fi
rm -vf [ra]
@ -205,7 +205,7 @@ fi
fi
# Try -P --size-sort.
rlRun "nm -P --size-sort localplt > p"
if test $(uname -i) = "ppc64" -a $(rlGetDistroRelease) -gt 5; then
if test $(uname -m) = "ppc64" -a $(rlGetDistroRelease) -gt 5; then
rlAssertGrep "__libc_csu_init D" p
rlAssertGrep "main D" p
else