Refine the ext2 case in regression test

This commit is contained in:
LI Qing 2024-04-25 23:54:27 +08:00 committed by Tate, Hongliang Tian
parent 3b47143875
commit 2616335755
2 changed files with 12 additions and 6 deletions

View File

@ -80,6 +80,6 @@ jobs:
id: syscall_test_at_exfat_linux
run: make run AUTO_TEST=syscall SYSCALL_TEST_DIR=/exfat EXTRA_BLOCKLISTS_DIRS=blocklists.exfat ENABLE_KVM=0 BOOT_PROTOCOL=linux-efi-handover64 RELEASE_MODE=1
- name: Regression Test (MicroVM)
- name: Regression Test (Multiboot2)
id: regression_test_linux
run: make run AUTO_TEST=regression ENABLE_KVM=0 SCHEME=microvm RELEASE_MODE=1
run: make run AUTO_TEST=regression ENABLE_KVM=0 BOOT_PROTOCOL=multiboot2 RELEASE_MODE=1

View File

@ -3,6 +3,7 @@
# SPDX-License-Identifier: MPL-2.0
set -e
set -x
check_file_size() {
local file_name="$1"
@ -29,10 +30,15 @@ cd ${EXT2_DIR}
echo "Start ext2 fs test......"
# Test case for the big file feature
truncate -s 500M test_file.txt
check_file_size test_file.txt $((500 * 1024 * 1024))
truncate -s 2K test_file.txt
check_file_size test_file.txt $((2 * 1024))
for i in $(seq 1 10); do
truncate -s 500M test_file.txt
check_file_size test_file.txt $((500 * 1024 * 1024))
truncate -s 2K test_file.txt
check_file_size test_file.txt $((2 * 1024))
done
# Clean up
rm -f test_file.txt
sync
echo "All ext2 fs test passed."