Skip to content

clean up incompatible running mode checks in test script and ci #4342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions .github/workflows/compilation_on_android_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -618,49 +618,6 @@ jobs:
llvm_cache_key: ${{ needs.build_llvm_libraries_on_ubuntu_2204.outputs.cache_key }}
running_mode: aot
test_option: $WAMR_COMPILER_TEST_OPTIONS
exclude:
# incompatible modes and features
# classic-interp doesn't support simd
- running_mode: "classic-interp"
test_option: $SIMD_TEST_OPTIONS
# llvm jit doesn't support multi module
- running_mode: "jit"
test_option: $MULTI_MODULES_TEST_OPTIONS
# fast-jit doesn't support multi module, simd
- running_mode: "fast-jit"
test_option: $MULTI_MODULES_TEST_OPTIONS
- running_mode: "fast-jit"
test_option: $SIMD_TEST_OPTIONS
# multi-tier-jit doesn't support multi module, simd
- running_mode: "multi-tier-jit"
test_option: $MULTI_MODULES_TEST_OPTIONS
- running_mode: "multi-tier-jit"
test_option: $SIMD_TEST_OPTIONS
# fast-jit and multi-tier-jit don't support GC
- running_mode: "fast-jit"
test_option: $GC_TEST_OPTIONS
- running_mode: "multi-tier-jit"
test_option: $GC_TEST_OPTIONS
# fast-interp, fast-jit, llvm-jit, multi-tier-jit don't support Memory64
- running_mode: "fast-interp"
test_option: $MEMORY64_TEST_OPTIONS
- running_mode: "fast-jit"
test_option: $MEMORY64_TEST_OPTIONS
- running_mode: "jit"
test_option: $MEMORY64_TEST_OPTIONS
- running_mode: "multi-tier-jit"
test_option: $MEMORY64_TEST_OPTIONS
# aot, fast-interp, fast-jit, llvm-jit, multi-tier-jit don't support Multi Memory
- running_mode: "aot"
test_option: $MULTI_MEMORY_TEST_OPTIONS
- running_mode: "fast-interp"
test_option: $MULTI_MEMORY_TEST_OPTIONS
- running_mode: "fast-jit"
test_option: $MULTI_MEMORY_TEST_OPTIONS
- running_mode: "jit"
test_option: $MULTI_MEMORY_TEST_OPTIONS
- running_mode: "multi-tier-jit"
test_option: $MULTI_MEMORY_TEST_OPTIONS

steps:
- name: checkout
Expand Down
21 changes: 4 additions & 17 deletions .github/workflows/nightly_run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -617,24 +617,11 @@ jobs:
sanitizer: tsan
- running_mode: "multi-tier-jit"
sanitizer: tsan
# classic-interp and fast-interp don't support simd
- running_mode: "classic-interp"
test_option: $SIMD_TEST_OPTIONS
# simd128.h brings ubsan errors
# like: negation of XXXcannot be represented in type 'long int';
# cast to an unsigned type to negate this value to itself
- running_mode: "fast-interp"
test_option: $SIMD_TEST_OPTIONS
# llvm jit doesn't support multi module
- running_mode: "jit"
test_option: $MULTI_MODULES_TEST_OPTIONS
# fast-jit doesn't support multi module, simd
- running_mode: "fast-jit"
test_option: $MULTI_MODULES_TEST_OPTIONS
- running_mode: "fast-jit"
test_option: $SIMD_TEST_OPTIONS
# multi-tier-jit doesn't support multi module, simd
- running_mode: "multi-tier-jit"
test_option: $MULTI_MODULES_TEST_OPTIONS
- running_mode: "multi-tier-jit"
test_option: $SIMD_TEST_OPTIONS
sanitizer: ubsan
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down
65 changes: 42 additions & 23 deletions tests/wamr-test-suites/test_wamr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -478,9 +478,9 @@ function spec_test()
fi

# As of version 1.0.36, wabt is still unable to correctly handle the GC proposal.
#
#
# $ $ /opt/wabt-1.0.36/bin/wast2json --enable-all ../spec/test/core/br_if.wast
#
#
# ../spec/test/core/br_if.wast:670:26: error: unexpected token "null", expected a numeric index or a name (e.g. 12 or $foo).
# (func $f (param (ref null $t)) (result funcref) (local.get 0))
#
Expand Down Expand Up @@ -877,11 +877,23 @@ function do_execute_in_running_mode()
{
local RUNNING_MODE="$1"

if [[ ${ENABLE_MULTI_MEMORY} -eq 1 ]]; then
# filter out uncompatible running mode based on targeting proposal features
# keep alpha order

if [[ ${ENABLE_EH} -eq 1 ]]; then
if [[ "${RUNNING_MODE}" != "classic-interp" ]]; then
echo "support exception handling in classic-interp"
return 0;
fi
fi

if [[ ${ENABLE_GC} -eq 1 ]]; then
if [[ "${RUNNING_MODE}" != "classic-interp" \
&& "${RUNNING_MODE}" != "fast-interp" \
&& "${RUNNING_MODE}" != "jit" \
&& "${RUNNING_MODE}" != "aot" ]]; then
echo "support multi-memory in classic-interp mode and aot mode"
return 0
echo "support gc in both interp modes, llvm-jit mode and aot mode"
return 0;
fi
fi

Expand All @@ -893,6 +905,13 @@ function do_execute_in_running_mode()
fi
fi

if [[ ${ENABLE_MULTI_MEMORY} -eq 1 ]]; then
if [[ "${RUNNING_MODE}" != "classic-interp" ]]; then
echo "support multi-memory in classic-interp mode mode"
return 0
fi
fi

if [[ ${ENABLE_MULTI_MODULE} -eq 1 ]]; then
if [[ "${RUNNING_MODE}" != "classic-interp" \
&& "${RUNNING_MODE}" != "fast-interp" \
Expand All @@ -902,6 +921,14 @@ function do_execute_in_running_mode()
fi
fi

if [[ ${ENABLE_SIMD} -eq 1 ]]; then
if [[ "${RUNNING_MODE}" != "jit" && "${RUNNING_MODE}" != "aot" && "${RUNNING_MODE}" != "fast-interp" ]]; then
echo "support simd in llvm-jit, aot and fast-interp mode"
return 0;
fi
fi

# filter out uncompatible running mode based on SGX support
if [[ ${SGX_OPT} == "--sgx" ]]; then
if [[ "${RUNNING_MODE}" != "classic-interp" \
&& "${RUNNING_MODE}" != "fast-interp" \
Expand All @@ -912,33 +939,25 @@ function do_execute_in_running_mode()
fi
fi

if [[ ${ENABLE_SIMD} -eq 1 ]]; then
if [[ "${RUNNING_MODE}" != "jit" && "${RUNNING_MODE}" != "aot" && "${RUNNING_MODE}" != "fast-interp" ]]; then
echo "support simd in llvm-jit, aot and fast-interp mode"
# filter out uncompatible running mode based on architecture
if [[ ${TARGET} == "X86_32" ]]; then
if [[ "${RUNNING_MODE}" == "jit" || "${RUNNING_MODE}" == "fast-jit" || "${RUNNING_MODE}" == "multi-tier-jit" ]]; then
echo "both llvm-jit, fast-jit and multi-tier-jit mode do not support X86_32 target"
return 0;
fi
fi

if [[ ${TARGET} == "X86_32" ]]; then
if [[ "${RUNNING_MODE}" == "jit" || "${RUNNING_MODE}" == "fast-jit" ]]; then
echo "both llvm-jit mode and fast-jit mode do not support X86_32 target"
if [[ ${ENABLE_MEMORY64} -eq 1 ]]; then
echo "memory64 does not support X86_32 target"
return 0;
fi
fi

if [[ ${ENABLE_GC} -eq 1 ]]; then
if [[ "${RUNNING_MODE}" != "classic-interp" \
&& "${RUNNING_MODE}" != "fast-interp" \
&& "${RUNNING_MODE}" != "jit" \
&& "${RUNNING_MODE}" != "aot" ]]; then
echo "support gc in both interp modes, llvm-jit mode and aot mode"
if [[ ${ENABLE_MULTI_MEMORY} -eq 1 ]]; then
echo "multi-memory does not support X86_32 target"
return 0;
fi
fi

if [[ ${ENABLE_EH} -eq 1 ]]; then
if [[ "${RUNNING_MODE}" != "classic-interp" ]]; then
echo "support exception handling in classic-interp"
if [[ ${ENABLE_SIMD} -eq 1 ]]; then
echo "simd does not support X86_32 target"
return 0;
fi
fi
Expand Down
Loading