Changeset View
Changeset View
Standalone View
Standalone View
head/tests/sys/kern/coredump_phnum_test.sh
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | EOF | ||||
# These magic numbers don't have any real significance. They are just | # These magic numbers don't have any real significance. They are just | ||||
# the result of running the helper program and dumping core. The only | # the result of running the helper program and dumping core. The only | ||||
# important bit is that they're larger than 65535 (UINT16_MAX). | # important bit is that they're larger than 65535 (UINT16_MAX). | ||||
atf_check -o "match:65535 \(66[0-9]{3}\)" \ | atf_check -o "match:65535 \(66[0-9]{3}\)" \ | ||||
-x 'readelf -h coredump_phnum_helper.core | grep "Number of program headers:"' | -x 'readelf -h coredump_phnum_helper.core | grep "Number of program headers:"' | ||||
atf_check -o "match:There are 66[0-9]{3} program headers" \ | atf_check -o "match:There are 66[0-9]{3} program headers" \ | ||||
-x 'readelf -l coredump_phnum_helper.core | grep -1 "program headers"' | -x 'readelf -l coredump_phnum_helper.core | grep -1 "program headers"' | ||||
atf_check -o "match: 0000000000000001 .* 66[0-9]{3} " \ | atf_check -o "match: 00000(0000000000)?1 .* 66[0-9]{3} " \ | ||||
-x 'readelf -S coredump_phnum_helper.core | grep -A1 "^ \[ 0\] "' | -x 'readelf -S coredump_phnum_helper.core | grep -A1 "^ \[ 0\] "' | ||||
atf_check -o "match:66[0-9]{3}" \ | atf_check -o "match:66[0-9]{3}" \ | ||||
-x 'procstat -v coredump_phnum_helper.core | wc -l' | -x 'procstat -v coredump_phnum_helper.core | wc -l' | ||||
} | } | ||||
coredump_phnum_cleanup() | coredump_phnum_cleanup() | ||||
{ | { | ||||
rm -f coredump_phnum_helper.core | rm -f coredump_phnum_helper.core | ||||
Show All 10 Lines |