Merge branch main into dev/wasi-libc-windows

This commit is contained in:
Wenyong Huang
2023-11-09 10:13:59 +08:00
48 changed files with 900 additions and 512 deletions

View File

@ -7,6 +7,7 @@
;; any problems. See: https://github.com/bytecodealliance/wasm-micro-runtime/pull/2619
(module
(memory (export "memory") 1 1)
(func $assert_eq (param i32 i32)
(i32.ne (local.get 0) (local.get 1))
if
@ -23,7 +24,7 @@
(func $i32_shr_s
(call $assert_eq
(i32.shr_u (i32.const 32) (i32.const -30))
(i32.shr_s (i32.const 32) (i32.const -30))
(i32.const 8)
)
)
@ -35,9 +36,43 @@
)
)
(func $const_ret (result i32)
i32.const -5
)
;; *_func_call tests validate the potential LLVM optimizations
;; where the right parameter of the shift operation is an
;; indirect constant value.
(func $i32_shr_u_func_call
(call $assert_eq
(i32.shr_u (i32.const -1) (call $const_ret))
(i32.const 31)
)
)
(func $i32_shr_s_func_call
(call $assert_eq
(i32.shr_s
(i32.const 1073741824) ;; 2^30
(call $const_ret)
)
(i32.const 8)
)
)
(func $i32_shl_func_call
(call $assert_eq
(i32.shl (i32.const -1) (call $const_ret))
(i32.const -134217728)
)
)
(func (export "_start")
call $i32_shr_u
call $i32_shr_s
call $i32_shl
call $i32_shr_u_func_call
call $i32_shr_s_func_call
call $i32_shl_func_call
)
)

View File

@ -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=""
@ -65,7 +66,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
@ -171,9 +172,14 @@ do
echo "test platform " ${OPTARG}
PLATFORM=${OPTARG}
;;
T)
echo "sanitizer is " ${OPTARG}
WAMR_BUILD_SANITIZER=${OPTARG}
;;
?)
help
exit 1;;
exit 1
;;
esac
done
@ -395,7 +401,7 @@ function spec_test()
git apply ../../spec-test-script/simd_ignore_cases.patch
fi
if [[ ${ENABLE_MULTI_MODULE} == 1 && $1 == 'aot' ]]; then
git apply ../../spec-test-script/muti_module_aot_ignore_cases.patch
git apply ../../spec-test-script/multi_module_aot_ignore_cases.patch
fi
# udpate thread cases
@ -566,7 +572,7 @@ function wasi_certification_test()
cd wasi-testsuite
git reset --hard ${WASI_TESTSUITE_COMMIT}
bash ../../wasi-test-script/run_wasi_tests.sh $1 $TARGET $WASI_TEST_FILTER \
TSAN_OPTIONS=${TSAN_OPTIONS} bash ../../wasi-test-script/run_wasi_tests.sh $1 $TARGET $WASI_TEST_FILTER \
| tee -a ${REPORT_DIR}/wasi_test_report.txt
ret=${PIPESTATUS[0]}

View File

@ -0,0 +1,11 @@
# Proposing to accept this risk for now. It might be wasi-libc related.
# https://github.com/bytecodealliance/wasm-micro-runtime/pull/1963#issuecomment-1455342931
race:STORE_U32
# https://github.com/bytecodealliance/wasm-micro-runtime/issues/2680
race:execute_post_instantiate_functions
# Suppressing signal-unsafe inside of a signal for AOT mode
# see https://github.com/bytecodealliance/wasm-micro-runtime/issues/2248#issuecomment-1630189656
signal:*

View File

@ -108,11 +108,11 @@ if [[ $MODE != "aot" ]];then
TEST_OPTIONS="${TEST_OPTIONS} --exclude-filter ${TEST_FILTER}"
fi
$PYTHON_EXE ${THIS_DIR}/pipe.py | $PYTHON_EXE test-runner/wasi_test_runner.py $TEST_OPTIONS
$PYTHON_EXE ${THIS_DIR}/pipe.py | TSAN_OPTIONS=${TSAN_OPTIONS} $PYTHON_EXE test-runner/wasi_test_runner.py $TEST_OPTIONS
ret=${PIPESTATUS[1]}
TEST_RUNTIME_EXE="${IWASM_CMD_STRESS}" $PYTHON_EXE test-runner/wasi_test_runner.py \
TEST_RUNTIME_EXE="${IWASM_CMD_STRESS}" TSAN_OPTIONS=${TSAN_OPTIONS} $PYTHON_EXE test-runner/wasi_test_runner.py \
-r adapters/wasm-micro-runtime.py \
-t \
${THREAD_STRESS_TESTS}
@ -120,9 +120,9 @@ if [[ $MODE != "aot" ]];then
if [ "${ret}" -eq 0 ]; then
ret=${PIPESTATUS[0]}
fi
exit_code=${ret}
deactivate
else
target_option=""