From 695349e306141225ed596329e84c3544e596ee3c Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Sun, 4 Dec 2016 03:50:57 +0000 Subject: [PATCH] coredump_phnum_test: Make expected pheader count more flexible Note: this test still requires binutils readelf (from ports) to pass, until a few issues are resolved in elftoolchain. PR: 215019 Reported by: ngie@ Sponsored by: Dell EMC Isilon --- tests/sys/kern/coredump_phnum_test.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/sys/kern/coredump_phnum_test.sh b/tests/sys/kern/coredump_phnum_test.sh index d411f83a09d0..cb38ff0ca929 100755 --- a/tests/sys/kern/coredump_phnum_test.sh +++ b/tests/sys/kern/coredump_phnum_test.sh @@ -39,7 +39,7 @@ coredump_phnum_head() } coredump_phnum_body() { - atf_expect_fail "the value parsed doesn't always match the value obtained on the running system; bug # 215019" + atf_expect_fail "elftoolchain (base) readelf doesn't handle extended program header numbers; bug # 215019" # Set up core dumping cat > coredump_phnum_restore_state.sh <<-EOF @@ -65,17 +65,17 @@ EOF # the result of running the helper program and dumping core. The only # important bit is that they're larger than 65535 (UINT16_MAX). readelf -h coredump_phnum_helper.core | \ - atf_check -o "match:65535 \(66169\)" \ + atf_check -o "match:65535 \(66[0-9]{3}\)" \ grep "Number of program headers:" readelf -l coredump_phnum_helper.core | \ - atf_check -o "match:There are 66169 program headers" \ + atf_check -o "match:There are 66[0-9]{3} program headers" \ grep -1 "program headers" readelf -S coredump_phnum_helper.core | \ - atf_check -o "match: 0000000000000001 .* 66169 " \ + atf_check -o "match: 0000000000000001 .* 66[0-9]{3} " \ grep -A1 "^ \[ 0\] " procstat -v coredump_phnum_helper.core | \ - atf_check -o "match:66545" wc -l + atf_check -o "match:66[0-9]{3}" wc -l } coredump_phnum_cleanup() {