summaryrefslogtreecommitdiffstats
path: root/tests/f_bigalloc_orphan_list/script
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:49:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:49:25 +0000
commit464df1d5e5ab1322e2dd0a7796939fff1aeefa9a (patch)
tree6a403684e0978f0287d7f0ec0e5aab1fd31a59e1 /tests/f_bigalloc_orphan_list/script
parentInitial commit. (diff)
downloade2fsprogs-464df1d5e5ab1322e2dd0a7796939fff1aeefa9a.tar.xz
e2fsprogs-464df1d5e5ab1322e2dd0a7796939fff1aeefa9a.zip
Adding upstream version 1.47.0.upstream/1.47.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/f_bigalloc_orphan_list/script')
-rw-r--r--tests/f_bigalloc_orphan_list/script28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/f_bigalloc_orphan_list/script b/tests/f_bigalloc_orphan_list/script
new file mode 100644
index 0000000..8a062dc
--- /dev/null
+++ b/tests/f_bigalloc_orphan_list/script
@@ -0,0 +1,28 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+SKIP_GUNZIP="true"
+TEST_DATA="$test_name.tmp"
+
+dd if=$TEST_BITS of=$TEST_DATA bs=28k count=1 > /dev/null 2>&1
+
+touch $TMPFILE
+$MKE2FS -Fq -t ext4 -o Linux -O bigalloc $TMPFILE 1M > /dev/null 2>&1
+$DEBUGFS -w $TMPFILE << EOF > /dev/null 2>&1
+write $TEST_DATA testfile
+set_inode_field testfile links_count 0
+set_inode_field testfile mode 0100644
+set_inode_field testfile bmap[0] 0
+set_inode_field testfile bmap[2] 0
+set_super_value last_orphan 12
+unlink testfile
+quit
+EOF
+
+. $cmd_dir/run_e2fsck
+
+rm -f $TEST_DATA
+
+unset E2FSCK_TIME TEST_DATA