1 2cd /data/tests/libc-test/src 3rm /data/tests/libc-test/REPORT 4rm /data/tests/libc-test/FileList.txt 5rm /data/tests/libc-test/SkipList.txt 6touch /data/tests/libc-test/REPORT 7touch /data/tests/libc-test/FileList.txt 8touch /data/tests/libc-test/SkipList.txt 9echo 'root:This.is.a.test:18997:0:99999:7:::'>/etc/shadow 10param set debug.hitrace.tags.enableflags 1 11 12ARCH=arm 13ABILIST=$(param get const.product.cpu.abilist) 14if [ $ABILIST == "arm64-v8a" ]; then 15 ARCH=aarch64 16fi 17 18function FileSuffix() { 19 local filename="$1" 20 if [ -n "$filename" ]; then 21 echo "${filename##*.}" 22 fi 23} 24 25#Test cases that need to be shielded 26ShieldedList=("trace_stresstest" "syslog" "vsyslog" "runtest" 27#Failed when running by shell, need to be run manually 28"tgkill_ext" "exittest02" "stat" "isatty" "ttyname" "a_stack_chk_fail" 29"ldso_randomization_manual" "ldso_randomization_test" 30"tcgetattr" "tcgetpgrp" "tcgetsid" "tcsendbreak" "tcsetattr" "tcsetpgrp" 31#These need run with special condiction 32"pthread_atfork-errno-clobber" "flockfile-list" 33#Symbol hidden 34"dlns_set_fun_test" "dlns_inherit_test" "dlns_separated_test" 35"unittest_ldso_ns_config" "unittest_ldso_dynlink" 36#Some math test cases need to skip. 37"acoshl" "asinhl" "erfcl" "fenv" "fma" "fmaf" "fmal" "lgammal" "nearbyint" "nearbyintf" 38"nearbyintl" "rint" "rintf" "rintl" "sqrt" "sqrtf" "sqrtl" "tgammal" 39#TODO-arm32 40"malloc-brk-fail" "pthread_cancel" "res_send" 41) 42 43#TODO-aarch64 44if [ $ARCH == "aarch64" ]; then 45 ShieldedList+=("faccessat" "signal" "unittest_hilog_vsnprint" "yn") 46fi 47 48for skiped in ${ShieldedList[*]};do 49 echo $skiped >> /data/tests/libc-test/SkipList.txt 50done 51 52function ShieldedCases() { 53 for filename in ${ShieldedList[*]} 54 do 55 if [ "$1" = "$filename" ]; 56 then 57 echo "ShieldedCases" 58 fi 59 done 60} 61 62for file in `ls *` 63do 64 if [ "$(FileSuffix ${file})" = "so" ] \ 65 || [ "$(ShieldedCases ${file})" = "ShieldedCases" ] \ 66 || [ -d $file ] 67 then 68 continue 69 elif [ -x $file ] && [ -s $file ] 70 then 71 echo $file >> /data/tests/libc-test/FileList.txt 72 if [ "$file" = "tgkill" ] 73 then 74 ./runtest -w '' $file 12345 34567 >> /data/tests/libc-test/REPORT 75 else 76 ./runtest -w '' -t 30 $file >> /data/tests/libc-test/REPORT 77 fi 78 fi 79done 80