diff --git a/.github/workflows/test_asterinas.yml b/.github/workflows/test_asterinas.yml index 1a4d1f406..d633640d6 100644 --- a/.github/workflows/test_asterinas.yml +++ b/.github/workflows/test_asterinas.yml @@ -78,10 +78,18 @@ jobs: make run AUTO_TEST=syscall \ SYSCALL_TEST_DIR=/exfat EXTRA_BLOCKLISTS_DIRS=blocklists.exfat \ ENABLE_KVM=0 BOOT_PROTOCOL=multiboot2 RELEASE=1 + + - name: SMP Syscall Test (Multiboot2) + id: smp_syscall_test_mb2 + run: make run AUTO_TEST=syscall ENABLE_KVM=1 BOOT_PROTOCOL=multiboot2 RELEASE=1 SMP=4 - name: General Test (Linux EFI Handover Boot Protocol) id: test_linux run: make run AUTO_TEST=test ENABLE_KVM=1 BOOT_PROTOCOL=linux-efi-handover64 RELEASE=1 + + - name: SMP General Test (Multiboot2) + id: smp_test_mb2 + run: make run AUTO_TEST=test ENABLE_KVM=1 BOOT_PROTOCOL=multiboot2 RELEASE=1 SMP=4 integration-test-tdx: if: github.event_name == 'schedule' diff --git a/Makefile b/Makefile index 734be53f4..707db983a 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,9 @@ CARGO_OSDK_ARGS += --kcmd-args="SYSCALL_TEST_DIR=$(SYSCALL_TEST_DIR)" CARGO_OSDK_ARGS += --kcmd-args="EXTRA_BLOCKLISTS_DIRS=$(EXTRA_BLOCKLISTS_DIRS)" CARGO_OSDK_ARGS += --init-args="/opt/syscall_test/run_syscall_test.sh" else ifeq ($(AUTO_TEST), test) + ifneq ($(SMP), 1) + CARGO_OSDK_ARGS += --kcmd-args="BLOCK_UNSUPPORTED_SMP_TESTS=1" + endif CARGO_OSDK_ARGS += --init-args="/test/run_general_test.sh" else ifeq ($(AUTO_TEST), boot) CARGO_OSDK_ARGS += --init-args="/test/boot_hello.sh" diff --git a/test/apps/scripts/run_general_test.sh b/test/apps/scripts/run_general_test.sh index 29ae4fbbf..e6d996982 100755 --- a/test/apps/scripts/run_general_test.sh +++ b/test/apps/scripts/run_general_test.sh @@ -8,9 +8,13 @@ SCRIPT_DIR=/test cd ${SCRIPT_DIR} ./shell_cmd.sh -./fs.sh -./process.sh -./network.sh ./test_epoll_pwait.sh +# TODO: Support the following tests with SMP +if [ -z $BLOCK_UNSUPPORTED_SMP_TESTS ]; then + ./fs.sh # will hang + ./process.sh # will randomly hang + ./network.sh # will hang +fi + echo "All general tests passed."