Page MenuHomeFreeBSD

D59033.diff
No OneTemporary

D59033.diff

diff --git a/tests/sys/fs/tarfs/tarfs_test.sh b/tests/sys/fs/tarfs/tarfs_test.sh
--- a/tests/sys/fs/tarfs/tarfs_test.sh
+++ b/tests/sys/fs/tarfs/tarfs_test.sh
@@ -396,30 +396,30 @@
tarfs_cleanup
}
-atf_test_case tarfs_large cleanup
-tarfs_large_head() {
- atf_set "descr" "Test support for large files"
- atf_set "require.user" "root"
- atf_set "require.kmods" "tarfs"
- atf_set "timeout" "2400"
-}
-tarfs_large_body() {
- tarfs_setup
- local tarball="${PWD}/tarfs_test.tar.zst"
- local exp off
- for exp in 31 32 33 34 35 36 ; do
- for off in 1 0 ; do
- local size=$(((1<<exp)-off))
- atf_check truncate -s ${size} file
- atf_check bsdtar -cf "${tarball}" --no-read-sparse --zstd file
- atf_check mount -rt tarfs "${tarball}" "${mnt}"
- atf_check -o inline:"${size}\n" stat -f%z "${mnt}"/file
- atf_check umount "${mnt}"
- done
- done
-}
-tarfs_large_cleanup() {
- tarfs_cleanup
+tarfs_large_test()
+{
+ local size="${1}"; shift
+ local name="tarfs_large_${size}"
+ local tarball="tarfs_test.tar.zst"
+ atf_test_case "${name}" cleanup
+ eval "${name}_head() { \
+ atf_set descr 'Test support for large files of size ${size}' ; \
+ atf_set require.user root ; \
+ atf_set require.kmods tarfs ; \
+ atf_set timeout 1000 ; \
+ }"
+ eval "${name}_body() { \
+ tarfs_setup
+ atf_check truncate -s ${size} file ; \
+ atf_check bsdtar -cf ${tarball} --no-read-sparse --zstd file ; \
+ atf_check mount -rt tarfs ${tarball} ${mnt} ; \
+ atf_check -o inline:\"${size}\\n\" stat -f%z ${mnt}/file ; \
+ atf_check umount ${mnt} ; \
+ }"
+ eval "${name}_cleanup() { \
+ tarfs_cleanup ; \
+ }"
+ atf_add_test_case "${name}"
}
atf_init_test_cases() {
@@ -440,5 +440,11 @@
atf_add_test_case tarfs_long_names
atf_add_test_case tarfs_long_paths
atf_add_test_case tarfs_git_archive
- atf_add_test_case tarfs_large
+
+ local exp off
+ for exp in 31 32 33 34 35 36 ; do
+ for off in 1 0 ; do
+ tarfs_large_test $(((1<<exp)-off))
+ done
+ done
}

File Metadata

Mime Type
text/plain
Expires
Fri, Aug 28, 9:51 PM (12 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37024578
Default Alt Text
D59033.diff (1 KB)

Event Timeline