Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F1418349
gd_csum_test.sh
fsu (Fedor Uporov)
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
fsu
Jun 15 2017, 8:19 AM
2017-06-15 08:19:04 (UTC+0)
Size
2 KB
Referenced Files
None
Subscribers
None
gd_csum_test.sh
View Options
#!/bin/sh
TEST_DEV
=
"/dev/md0"
TEST_MP
=
"/mnt"
MY_PATH
=
${
PWD
}
run_fstorture
()
# ${1} => TEST_DIR_PATH
{
if
[
!
-f
./fstorture
]
;
then
echo
"Can not find test binary in
${
PWD
}
"
exit
1
fi
mkdir
${
1
}
/root0
${
1
}
/root1
cd
${
1
}
&&
./fstorture
root0
root1
4
-c
1000
}
echo
" =========== Test notmal case without gd_csum to avoid regression..."
mkfs.ext3
-F
${
TEST_DEV
}
mount
-t
ext2fs
${
TEST_DEV
}
${
TEST_MP
}
cp
./fstorture
${
TEST_MP
}
/fstorture
run_fstorture
${
TEST_MP
}
cd
${
MY_PATH
}
sleep
2
umount
${
TEST_DEV
}
if
[
"
$?
"
-ne
"0"
]
then
echo
"Can not unmount..."
exit
1
fi
e2fsck
-f
-n
${
TEST_DEV
}
if
[
"
$?
"
-ne
"0"
]
then
echo
"e2fsck fail"
exit
1
fi
echo
" =========== Test feature in normal block size..."
mkfs.ext3
-F
-O
uninit_bg
${
TEST_DEV
}
mount
-t
ext2fs
${
TEST_DEV
}
${
TEST_MP
}
cp
./fstorture
${
TEST_MP
}
/fstorture
run_fstorture
${
TEST_MP
}
cd
${
MY_PATH
}
sleep
2
umount
${
TEST_DEV
}
if
[
"
$?
"
-ne
"0"
]
then
echo
"Can not unmount..."
exit
1
fi
e2fsck
-f
-n
${
TEST_DEV
}
if
[
"
$?
"
-ne
"0"
]
then
echo
"e2fsck fail"
exit
1
fi
echo
" =========== Test feature in block size 1K..."
mkfs.ext3
-F
-O
uninit_bg
-b
1k
${
TEST_DEV
}
mount
-t
ext2fs
${
TEST_DEV
}
${
TEST_MP
}
cp
./fstorture
${
TEST_MP
}
/fstorture
run_fstorture
${
TEST_MP
}
cd
${
MY_PATH
}
sleep
2
umount
${
TEST_DEV
}
if
[
"
$?
"
-ne
"0"
]
then
echo
"Can not unmount..."
exit
1
fi
e2fsck
-f
-n
${
TEST_DEV
}
if
[
"
$?
"
-ne
"0"
]
then
echo
"e2fsck fail"
exit
1
fi
echo
" =========== Test feature in block size 2K..."
mkfs.ext3
-F
-O
uninit_bg
-b
2k
${
TEST_DEV
}
mount
-t
ext2fs
${
TEST_DEV
}
${
TEST_MP
}
cp
./fstorture
${
TEST_MP
}
/fstorture
run_fstorture
${
TEST_MP
}
cd
${
MY_PATH
}
sleep
2
umount
${
TEST_DEV
}
if
[
"
$?
"
-ne
"0"
]
then
echo
"Can not unmount..."
exit
1
fi
e2fsck
-f
-n
${
TEST_DEV
}
if
[
"
$?
"
-ne
"0"
]
then
echo
"e2fsck fail"
exit
1
fi
echo
" =========== Test feature in block size 64K..."
mkfs.ext3
-F
-O
uninit_bg
-b
64k
${
TEST_DEV
}
mount
-t
ext2fs
${
TEST_DEV
}
${
TEST_MP
}
cp
./fstorture
${
TEST_MP
}
/fstorture
run_fstorture
${
TEST_MP
}
cd
${
MY_PATH
}
sleep
2
umount
${
TEST_DEV
}
if
[
"
$?
"
-ne
"0"
]
then
echo
"Can not unmount..."
exit
1
fi
e2fsck
-f
-n
${
TEST_DEV
}
if
[
"
$?
"
-ne
"0"
]
then
echo
"e2fsck fail"
exit
1
fi
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
942953
Default Alt Text
gd_csum_test.sh (2 KB)
Attached To
Mode
D11211: ext2fs: Add uninit_bg feature support.
Attached
Detach File
Event Timeline
Log In to Comment