More RHEL-10 test cases

This commit is contained in:
Miloš Prchlík 2024-06-28 15:28:52 +02:00
commit 32bdc99ae0
3 changed files with 106 additions and 28 deletions

View file

@ -0,0 +1,102 @@
#!/bin/bash
function verify_test () {
local pattern="$1"
local log="$2"
local subject="$3"
local issue="$4"
rlRun "grep -E '^PASS: $pattern' $log.tests" 0 "$subject ($issue)"
}
function verify_interesting_cases () {
local tool="$1"
local tool_label="$2"
local tool_log="$3"
local arch="$(rlGetPrimaryArch)"
rlPhaseStartTest "$tool_label / Verify interesting test cases"
#
# RHEL-10.0
#
if rlIsRHEL ">=10"; then
if [ "$tool" = "ld" ]; then
[ "$arch" == "aarch64" ] && verify_test "ld-aarch64/relr-align" \
"$tool_log" \
"Please support DT_RELR/pack-relative-relocs in RHEL10 on aarch64" \
"https://issues.redhat.com/browse/RHEL-31846"
[ "$arch" == "aarch64" ] && verify_test "ld-aarch64/relr-data-pie" \
"$tool_log" \
"Please support DT_RELR/pack-relative-relocs in RHEL10 on aarch64" \
"https://issues.redhat.com/browse/RHEL-31846"
[ "$arch" == "aarch64" ] && verify_test "ld-aarch64/relr-data-shared" \
"$tool_log" \
"Please support DT_RELR/pack-relative-relocs in RHEL10 on aarch64" \
"https://issues.redhat.com/browse/RHEL-31846"
[ "$arch" == "aarch64" ] && verify_test "ld-aarch64/relr-got-pie" \
"$tool_log" \
"Please support DT_RELR/pack-relative-relocs in RHEL10 on aarch64" \
"https://issues.redhat.com/browse/RHEL-31846"
[ "$arch" == "aarch64" ] && verify_test "ld-aarch64/relr-got-shared" \
"$tool_log" \
"Please support DT_RELR/pack-relative-relocs in RHEL10 on aarch64" \
"https://issues.redhat.com/browse/RHEL-31846"
[ "$arch" == "aarch64" ] && verify_test "ld-aarch64/relr-text-pie" \
"$tool_log" \
"Please support DT_RELR/pack-relative-relocs in RHEL10 on aarch64" \
"https://issues.redhat.com/browse/RHEL-31846"
[ "$arch" == "aarch64" ] && verify_test "ld-aarch64/relr-text-shared" \
"$tool_log" \
"Please support DT_RELR/pack-relative-relocs in RHEL10 on aarch64" \
"https://issues.redhat.com/browse/RHEL-31846"
[ "$arch" == "aarch64" ] && verify_test "ld-aarch64/relr-discard-pie" \
"$tool_log" \
"Please support DT_RELR/pack-relative-relocs in RHEL10 on aarch64" \
"https://issues.redhat.com/browse/RHEL-31846"
[ "$arch" == "aarch64" ] && verify_test "ld-aarch64/relr-discard-shared" \
"$tool_log" \
"Please support DT_RELR/pack-relative-relocs in RHEL10 on aarch64" \
"https://issues.redhat.com/browse/RHEL-31846"
else
rlLogInfo "No tests for $tool and RHEL-10"
fi
#
# RHEL-9.5.0
#
elif rlIsRHEL ">=9.5" "<10"; then
if [ "$tool" = "binutils" ]; then
verify_test "Check if efi app format is recognized" \
"$tool_log" \
"\"Check if efi app format is recognized\" upstream test case fails for aarch64 binutils builds" \
"https://issues.redhat.com/browse/RHEL-39953"
elif [ "$tool" = "ld" ]; then
verify_test "ld-elf/pr27590a" \
"$tool_log" \
"Perf tools compilation '.gnu.debuglto_.debug_macro' referenced in section '.gnu.debuglto_.debug_macro' of X defined in discarded section '.gnu.debuglto_.debug_macro[wm4.0.c5f57b9d27e9e0df712a778cc74f572d]' of X" \
"https://issues.redhat.com/browse/RHEL-43758"
verify_test "ld-elf/pr27590b" \
"$tool_log" \
"Perf tools compilation '.gnu.debuglto_.debug_macro' referenced in section '.gnu.debuglto_.debug_macro' of X defined in discarded section '.gnu.debuglto_.debug_macro[wm4.0.c5f57b9d27e9e0df712a778cc74f572d]' of X" \
"https://issues.redhat.com/browse/RHEL-43758"
else
rlLogInfo "No tests for $tool and RHEL-9.5.0"
fi
fi
rlPhaseEnd
}

View file

@ -31,6 +31,7 @@
. /usr/share/beakerlib/beakerlib.sh || exit 1
. "$TMT_TREE/tests/lib.sh" || exit 1
. ./interesting-cases.sh || exit 1
rlJournalStart
rlPhaseStartSetup
@ -102,20 +103,7 @@ rlJournalStart
rlLogInfo "All tests:\n$(grep -E '^[A-Z]+:' "$tool_log.tests" | sort)"
rlPhaseEnd
rlPhaseStartTest "$tool_label / Verify interesting test cases"
if rlIsRHEL ">=9.5"; then
if [ "$TOOL" = "binutils" ]; then
rlRun "grep -E '^PASS: Check if efi app format is recognized' $tool_log.tests" 0 \
"\"Check if efi app format is recognized\" upstream test case fails for aarch64 binutils builds (https://issues.redhat.com/browse/RHEL-39953)"
else
rlLogInfo "No tests for binutils and >=RHEL-9.5.0"
fi
else
rlLogInfo "No tests for >=RHEL-9.5.0"
fi
rlPhaseEnd
verify_interesting_cases "$TOOL" "$tool_label" "$tool_log"
done
done

View file

@ -31,6 +31,7 @@
. /usr/share/beakerlib/beakerlib.sh || exit 1
. "$TMT_TREE/tests/lib.sh" || exit 1
. ./interesting-cases.sh || exit 1
rlJournalStart
rlPhaseStartSetup
@ -76,20 +77,7 @@ rlJournalStart
rlLogInfo "All tests:\n$(grep -E '^[A-Z]+:' "$tool_log.tests" | sort)"
rlPhaseEnd
rlPhaseStartTest "$tool_label / Verify interesting test cases"
if rlIsRHEL ">=9.5"; then
if [ "$TOOL" = "binutils" ]; then
rlRun "grep -E '^PASS: Check if efi app format is recognized' $tool_log.tests" \
"\"Check if efi app format is recognized\" upstream test case fails for aarch64 binutils builds (https://issues.redhat.com/browse/RHEL-39953)"
else
rlLogInfo "No tests for binutils and >=RHEL-9.5.0"
fi
else
rlLogInfo "No tests for >=RHEL-9.5.0"
fi
rlPhaseEnd
verify_interesting_cases "$TOOL" "$tool_label" "$tool_log"
done
rlPhaseStartCleanup