diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 09:25:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 09:25:10 +0000 |
commit | 5dced3d1b3deca80e01415a2e35dc7972dcbfae7 (patch) | |
tree | 6a403684e0978f0287d7f0ec0e5aab1fd31a59e1 /tests/m_devdir | |
parent | Initial commit. (diff) | |
download | e2fsprogs-5dced3d1b3deca80e01415a2e35dc7972dcbfae7.tar.xz e2fsprogs-5dced3d1b3deca80e01415a2e35dc7972dcbfae7.zip |
Adding upstream version 1.47.0.upstream/1.47.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/m_devdir')
-rw-r--r-- | tests/m_devdir/script | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/m_devdir/script b/tests/m_devdir/script new file mode 100644 index 0000000..dfc55c7 --- /dev/null +++ b/tests/m_devdir/script @@ -0,0 +1,32 @@ +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 |