summaryrefslogtreecommitdiffstats
path: root/tests/d_inline_dump
diff options
context:
space:
mode:
Diffstat (limited to 'tests/d_inline_dump')
-rw-r--r--tests/d_inline_dump/expect95
-rw-r--r--tests/d_inline_dump/image.gzbin0 -> 2988 bytes
-rw-r--r--tests/d_inline_dump/name1
-rw-r--r--tests/d_inline_dump/script43
4 files changed, 139 insertions, 0 deletions
diff --git a/tests/d_inline_dump/expect b/tests/d_inline_dump/expect
new file mode 100644
index 0000000..db9d522
--- /dev/null
+++ b/tests/d_inline_dump/expect
@@ -0,0 +1,95 @@
+*** long file
+Inode: 13 Type: regular Mode: 0644 Flags: 0x10000000
+Generation: 3289262644 Version: 0x00000000:00000001
+User: 0 Group: 0 Size: 80
+File ACL: 0
+Links: 1 Blockcount: 0
+Fragment: Address: 0 Number: 0 Size: 0
+ ctime: 0x53cec6b4:c72e3c00 -- Tue Jul 22 20:16:52 2014
+ atime: 0x53cec3c8:4a3fd000 -- Tue Jul 22 20:04:24 2014
+ mtime: 0x53cec3c8:4c281800 -- Tue Jul 22 20:04:24 2014
+crtime: 0x53cec3c8:4a3fd000 -- Tue Jul 22 20:04:24 2014
+Size of extra inode fields: 28
+Extended attributes:
+ system.data (20)
+ user.a (1) = "b"
+Size of inline data: 80
+*** short file
+Inode: 18 Type: regular Mode: 0644 Flags: 0x10000000
+Generation: 3842229473 Version: 0x00000000:00000001
+User: 0 Group: 0 Size: 20
+File ACL: 0
+Links: 1 Blockcount: 0
+Fragment: Address: 0 Number: 0 Size: 0
+ ctime: 0x53cec6b4:cafecc00 -- Tue Jul 22 20:16:52 2014
+ atime: 0x53cec443:bda4d400 -- Tue Jul 22 20:06:27 2014
+ mtime: 0x53cec443:bf8d1c00 -- Tue Jul 22 20:06:27 2014
+crtime: 0x53cec443:bda4d400 -- Tue Jul 22 20:06:27 2014
+Size of extra inode fields: 28
+Extended attributes:
+ system.data (0)
+ user.a (1) = "b"
+Size of inline data: 60
+
+*** long dir
+Inode: 16 Type: directory Mode: 0755 Flags: 0x10000000
+Generation: 3842229469 Version: 0x00000000:00000004
+User: 0 Group: 0 Size: 132
+File ACL: 7
+Links: 2 Blockcount: 8
+Fragment: Address: 0 Number: 0 Size: 0
+ ctime: 0x53cec6e3:27eac000 -- Tue Jul 22 20:17:39 2014
+ atime: 0x53cec410:ed53dc00 -- Tue Jul 22 20:05:36 2014
+ mtime: 0x53cec42b:241a3000 -- Tue Jul 22 20:06:03 2014
+crtime: 0x53cec3fe:c8226000 -- Tue Jul 22 20:05:18 2014
+Size of extra inode fields: 28
+Extended attributes:
+ system.data (72)
+ user.a (1) = "b"
+Size of inline data: 132
+*** short dir
+Inode: 20 Type: directory Mode: 0755 Flags: 0x10000000
+Generation: 3710818931 Version: 0x00000000:00000001
+User: 0 Group: 0 Size: 60
+File ACL: 0
+Links: 2 Blockcount: 0
+Fragment: Address: 0 Number: 0 Size: 0
+ ctime: 0x53cec6b4:ca0aa800 -- Tue Jul 22 20:16:52 2014
+ atime: 0x53cec477:9a5ba000 -- Tue Jul 22 20:07:19 2014
+ mtime: 0x53cec477:9a5ba000 -- Tue Jul 22 20:07:19 2014
+crtime: 0x53cec477:9a5ba000 -- Tue Jul 22 20:07:19 2014
+Size of extra inode fields: 28
+Extended attributes:
+ system.data (0)
+ user.a (1) = "b"
+Size of inline data: 60
+
+*** long link
+Inode: 12 Type: symlink Mode: 0777 Flags: 0x10000000
+Generation: 3289262643 Version: 0x00000000:00000001
+User: 0 Group: 0 Size: 80
+File ACL: 0
+Links: 1 Blockcount: 0
+Fragment: Address: 0 Number: 0 Size: 0
+ ctime: 0x53cec47f:724db800 -- Tue Jul 22 20:07:27 2014
+ atime: 0x53cec665:27eac000 -- Tue Jul 22 20:15:33 2014
+ mtime: 0x53cec3b6:82841c00 -- Tue Jul 22 20:04:06 2014
+crtime: 0x53cec3b6:82841c00 -- Tue Jul 22 20:04:06 2014
+Size of extra inode fields: 28
+Extended attributes:
+ system.data (20)
+Fast link dest: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+*** short link
+Inode: 19 Type: symlink Mode: 0777 Flags: 0x0
+Generation: 3842229474 Version: 0x00000000:00000001
+User: 0 Group: 0 Size: 20
+File ACL: 0
+Links: 1 Blockcount: 0
+Fragment: Address: 0 Number: 0 Size: 0
+ ctime: 0x53cec44c:a1fcc000 -- Tue Jul 22 20:06:36 2014
+ atime: 0x53cec44d:11fb8400 -- Tue Jul 22 20:06:37 2014
+ mtime: 0x53cec44c:a1fcc000 -- Tue Jul 22 20:06:36 2014
+crtime: 0x53cec44c:a1fcc000 -- Tue Jul 22 20:06:36 2014
+Size of extra inode fields: 28
+Fast link dest: "xxxxxxxxxxxxxxxxxxxx"
+*** end test
diff --git a/tests/d_inline_dump/image.gz b/tests/d_inline_dump/image.gz
new file mode 100644
index 0000000..598a495
--- /dev/null
+++ b/tests/d_inline_dump/image.gz
Binary files differ
diff --git a/tests/d_inline_dump/name b/tests/d_inline_dump/name
new file mode 100644
index 0000000..dfc1a9c
--- /dev/null
+++ b/tests/d_inline_dump/name
@@ -0,0 +1 @@
+debugfs dump inline data test
diff --git a/tests/d_inline_dump/script b/tests/d_inline_dump/script
new file mode 100644
index 0000000..3193f78
--- /dev/null
+++ b/tests/d_inline_dump/script
@@ -0,0 +1,43 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+OUT=$test_name.log
+EXP=$test_dir/expect
+VERIFY_FSCK_OPT=-yf
+
+ZIMAGE=$test_dir/image.gz
+gzip -d < $ZIMAGE > $TMPFILE
+
+echo "*** long file" > $OUT
+$DEBUGFS -R 'stat /file' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
+echo "*** short file" >> $OUT
+$DEBUGFS -R 'stat /shortfile' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
+echo >> $OUT
+
+echo "*** long dir" >> $OUT
+$DEBUGFS -R 'stat /dir' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
+echo "*** short dir" >> $OUT
+$DEBUGFS -R 'stat /shortdir' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
+echo >> $OUT
+
+echo "*** long link" >> $OUT
+$DEBUGFS -R 'stat /link' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
+echo "*** short link" >> $OUT
+$DEBUGFS -R 'stat /shortlink' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
+
+echo "*** end test" >> $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset VERIFY_FSCK_OPT NATIVE_FSCK_OPT OUT EXP TEST_DATA VERIFY_DATA ZIMAGE