Add tsan for fast interp and aot (#2679)
To run it locally: ```bash export TSAN_OPTIONS=suppressions=<path_to_tsan_suppressions.txt> ./test_wamr.sh <your flags> -T tsan ``` An example for wasi-threads would look like: ```bash export TSAN_OPTIONS=suppressions=<path_to_tsan_suppressions.txt> ./test_wamr.sh -w -s wasi_certification -t fast-interp -T tsan ```
This commit is contained in:
@ -32,6 +32,7 @@ function help()
|
||||
echo "-F set the firmware path used by qemu"
|
||||
echo "-C enable code coverage collect"
|
||||
echo "-j set the platform to test"
|
||||
echo "-T set sanitizer to use in tests(ubsan|tsan|asan)"
|
||||
}
|
||||
|
||||
OPT_PARSED=""
|
||||
@ -59,7 +60,7 @@ QEMU_FIRMWARE=""
|
||||
# prod/testsuite-all branch
|
||||
WASI_TESTSUITE_COMMIT="ee807fc551978490bf1c277059aabfa1e589a6c2"
|
||||
|
||||
while getopts ":s:cabgvt:m:MCpSXxwPGQF:j:" opt
|
||||
while getopts ":s:cabgvt:m:MCpSXxwPGQF:j:T:" opt
|
||||
do
|
||||
OPT_PARSED="TRUE"
|
||||
case $opt in
|
||||
@ -165,9 +166,14 @@ do
|
||||
echo "test platform " ${OPTARG}
|
||||
PLATFORM=${OPTARG}
|
||||
;;
|
||||
T)
|
||||
echo "sanitizer is " ${OPTARG}
|
||||
WAMR_BUILD_SANITIZER=${OPTARG}
|
||||
;;
|
||||
?)
|
||||
help
|
||||
exit 1;;
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
@ -553,7 +559,7 @@ function wasi_certification_test()
|
||||
cd wasi-testsuite
|
||||
git reset --hard ${WASI_TESTSUITE_COMMIT}
|
||||
|
||||
bash ../../wasi-test-script/run_wasi_tests.sh $1 $TARGET \
|
||||
TSAN_OPTIONS=${TSAN_OPTIONS} bash ../../wasi-test-script/run_wasi_tests.sh $1 $TARGET \
|
||||
| tee -a ${REPORT_DIR}/wasi_test_report.txt
|
||||
ret=${PIPESTATUS[0]}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user