mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-18 12:06:43 +00:00
Refine the ext2 case in regression test
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
3b47143875
commit
2616335755
@ -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."
|
Reference in New Issue
Block a user