Files
rk35xx-android14/external/e2fsprogs/tests/m_devdir/script
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

33 lines
816 B
Plaintext

test_description="create fs image from /dev"
if ! test -x $DEBUGFS_EXE; then
echo "$test_name: $test_description: skipped (no debugfs)"
return 0
fi
MKFS_DIR=/dev
OUT=$test_name.log
$MKE2FS -q -F -o Linux -T ext4 -O metadata_csum,64bit -E lazy_itable_init=1 -b 1024 -d $MKFS_DIR $TMPFILE 16384 > $OUT 2>&1
mkfs_status=$?
$DUMPE2FS $TMPFILE >> $OUT 2>&1
$DEBUGFS -R 'ls /' $TMPFILE >> $OUT 2>&1
$FSCK -f -n $TMPFILE >> $OUT 2>&1
fsck_status=$?
sed -f $cmd_dir/filter.sed $OUT > $OUT.tmp
mv $OUT.tmp $OUT
if [ $mkfs_status -ne 0 ]; then
echo "$test_name: $test_description: skipped"
elif [ $mkfs_status -eq 0 ] && [ $fsck_status -eq 0 ]; then
echo "$test_name: $test_description: ok"
touch $test_name.ok
else
echo "$test_name: $test_description: failed"
fi
rm -f $TMPFILE.cmd
unset MKFS_DIR OUT EXP