The test code wanted to find "0000000000000001 .* 66[0-9]{3} " in readelf -S
output, but it is too long on 32-bit architectures. Change to grab the wanted
section header information and do the actually intended comparsion.
Further information:
Failure information: https://ci.freebsd.org/job/FreeBSD-head-i386-test/3837/testReport/sys.kern/coredump_phnum_test/coredump_phnum/
Output on amd64:
root@:/usr/tests/sys/kern # readelf -S coredump_phnum_helper.core | grep -A1 "^ \[ 0\] " [ 0] <no-name> NULL 0000000000000000 00000000 0000000000000001 0000000000000000 0 66546 0
Output on i386:
root@:/usr/tests/sys/kern # readelf -S coredump_phnum_helper.core | grep -A1 "^ \[ 0\] " [ 0] <no-name> NULL 00000000 000000 000001 00 0 66545 0 Key to Flags:
We can also use:
atf_check -x "test `readelf -SW coredump_phnum_helper.core awk '{print $10}'` -gt 65535"
or
atf_check -o "match: 000001 .* 66[0-9]{3} " \ -x 'readelf -SW coredump_phnum_helper.core | grep "^ \[ 0\] "'
but I feel the proposed one is easier to read. I'm also fine to chenge to other
approach to follow the style.