proot/test/test-carehwcp.sh
Yichao Yu dd57b59200
Allow the value of AT_HWCAP to be empty (#305)
On ARM the glibc decodes the hwcap into strings similar to that from /proc/cpuinfo.
This means that an value of zero prints an empty string.
2021-11-05 18:21:19 -04:00

15 lines
459 B
Bash

if [ ! -x /bin/true ] || [ -z `which grep` ] || [ -z `which env` ] || [ -z `which mcookie`] || [ -z `which rm` ]; then
exit 125;
fi
if [ ! -e $CARE ]; then
exit 125;
fi
TMP=/tmp/$(mcookie)
${CARE} -o ${TMP}/ env LD_SHOW_AUXV=1 true | grep '^AT_HWCAP:[[:space:]]*0\?$'
${TMP}/re-execute.sh | grep '^AT_HWCAP:[[:space:]]*0\?$'
${TMP}/re-execute.sh env LD_SHOW_AUXV=1 true | grep '^AT_HWCAP:[[:space:]]*0\?$'
rm -fr ${TMP}