@@ -22,7 +22,7 @@ for f in "$@"; do
2222 [ " ${ec} " -eq 0 ] || exit " ${ec} "
2323done
2424
25- # Make sure all internal library functions have tests exercising them:
25+ echo Make sure all internal library functions have tests exercising them
2626grep ' ^/\* FUNCTION:' ../* /library/* | cut -f3 -d" " | sort -u > __functions
2727
2828# Some functions are not expected to have tests:
@@ -81,7 +81,7 @@ perl -p -i -e 's/^__vfprintf_chk\n//' __functions # vfprintf-01/__vfprintf_chk.d
8181
8282# Some functions are covered by tests in other folders:
8383perl -p -i -e ' s/^__spawned_thread\n//' __functions # any pthread_create tests
84- perl -p -i -e ' s/^__builtin_ffsl?l?\n//' __functions # cbmc/__builtin_ffs-01
84+ # perl -p -i -e 's/^__builtin_ffsl?l?\n//' __functions # cbmc/__builtin_ffs-01
8585perl -p -i -e ' s/^__builtin_[su]addl?l?_overflow\n//' __functions # cbmc/gcc_builtin_add_overflow
8686perl -p -i -e ' s/^__builtin_[su]mull?l?_overflow\n//' __functions # cbmc/gcc_builtin_mul_overflow
8787perl -p -i -e ' s/^__builtin_[su]subl?l?_overflow\n//' __functions # cbmc/gcc_builtin_sub_overflow
@@ -101,13 +101,14 @@ perl -p -i -e 's/^_mm_setr_epi(16|32)\n//' __functions # cbmc/SIMD1
101101perl -p -i -e ' s/^_mm_setr_pi16\n//' __functions # cbmc/SIMD1
102102perl -p -i -e ' s/^_mm_subs_ep[iu]16\n//' __functions # cbmc/SIMD1
103103
104- ls ../../regression/cbmc-library/ | grep -- - | cut -f1 -d- | sort -u > __tests
104+ ls ../../regression/cbmc-library/ | grep -- -0 | cut -f1 -d- | sort -u > __tests
105105diff -u __tests __functions
106106ec=" ${?} "
107- rm __functions __tests
108107if [ $ec != 0 ]; then
109108 echo " Tests and library functions don't match."
110109 echo " Lines prefixed with - are tests not matching any library function."
111110 echo " Lines prefixed with + are functions lacking a test."
111+ else
112+ rm __functions __tests
112113fi
113114exit " ${ec} "
0 commit comments