summaryrefslogtreecommitdiffstats
path: root/tests/f_dup_de
diff options
context:
space:
mode:
Diffstat (limited to 'tests/f_dup_de')
-rw-r--r--tests/f_dup_de/expect-nohtree.131
-rw-r--r--tests/f_dup_de/expect-nohtree.27
-rw-r--r--tests/f_dup_de/expect.128
-rw-r--r--tests/f_dup_de/expect.27
-rw-r--r--tests/f_dup_de/image.gzbin0 -> 8970 bytes
-rw-r--r--tests/f_dup_de/name1
-rw-r--r--tests/f_dup_de/script15
7 files changed, 89 insertions, 0 deletions
diff --git a/tests/f_dup_de/expect-nohtree.1 b/tests/f_dup_de/expect-nohtree.1
new file mode 100644
index 0000000..64415cc
--- /dev/null
+++ b/tests/f_dup_de/expect-nohtree.1
@@ -0,0 +1,31 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has INDEX_FL flag set on filesystem without htree support.
+Clear HTree index? yes
+
+Pass 2: Checking directory structure
+Duplicate entry 'mailcap.dpkg-old' found.
+ Marking /etc (12) to be rebuilt.
+
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Duplicate entry 'fstab' in /etc (12) found. Clear? yes
+
+Duplicate entry 'localtime' in /etc (12) found. Clear? yes
+
+Duplicate entry 'mailcap.dpkg-old' in /etc (12) found. Clear? yes
+
+Duplicate entry 'modules.conf.old' in /etc (12) found. Clear? yes
+
+Entry 'modules.conf.old' in /etc (12) has a non-unique filename.
+Rename to modules.conf.o~0? yes
+
+Duplicate entry 'resolv.conf' in /etc (12) found. Clear? yes
+
+Duplicate entry 'usb.permissions' in /etc (12) found. Clear? yes
+
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 18/2048 files (5.6% non-contiguous), 324/330 blocks
+Exit status is 1
diff --git a/tests/f_dup_de/expect-nohtree.2 b/tests/f_dup_de/expect-nohtree.2
new file mode 100644
index 0000000..4d680af
--- /dev/null
+++ b/tests/f_dup_de/expect-nohtree.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 18/2048 files (5.6% non-contiguous), 324/330 blocks
+Exit status is 0
diff --git a/tests/f_dup_de/expect.1 b/tests/f_dup_de/expect.1
new file mode 100644
index 0000000..e421547
--- /dev/null
+++ b/tests/f_dup_de/expect.1
@@ -0,0 +1,28 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Duplicate entry 'mailcap.dpkg-old' found.
+ Marking /etc (12) to be rebuilt.
+
+Pass 3: Checking directory connectivity
+Pass 3A: Optimizing directories
+Duplicate entry 'fstab' in /etc (12) found. Clear? yes
+
+Duplicate entry 'localtime' in /etc (12) found. Clear? yes
+
+Duplicate entry 'mailcap.dpkg-old' in /etc (12) found. Clear? yes
+
+Duplicate entry 'modules.conf.old' in /etc (12) found. Clear? yes
+
+Entry 'modules.conf.old' in /etc (12) has a non-unique filename.
+Rename to modules.conf.o~0? yes
+
+Duplicate entry 'resolv.conf' in /etc (12) found. Clear? yes
+
+Duplicate entry 'usb.permissions' in /etc (12) found. Clear? yes
+
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 18/2048 files (5.6% non-contiguous), 324/330 blocks
+Exit status is 1
diff --git a/tests/f_dup_de/expect.2 b/tests/f_dup_de/expect.2
new file mode 100644
index 0000000..4d680af
--- /dev/null
+++ b/tests/f_dup_de/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 18/2048 files (5.6% non-contiguous), 324/330 blocks
+Exit status is 0
diff --git a/tests/f_dup_de/image.gz b/tests/f_dup_de/image.gz
new file mode 100644
index 0000000..8bdb12f
--- /dev/null
+++ b/tests/f_dup_de/image.gz
Binary files differ
diff --git a/tests/f_dup_de/name b/tests/f_dup_de/name
new file mode 100644
index 0000000..bd90734
--- /dev/null
+++ b/tests/f_dup_de/name
@@ -0,0 +1 @@
+duplicate directory entries
diff --git a/tests/f_dup_de/script b/tests/f_dup_de/script
new file mode 100644
index 0000000..dcda9d8
--- /dev/null
+++ b/tests/f_dup_de/script
@@ -0,0 +1,15 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+if test "$HTREE"x = x ; then
+ gunzip < $test_dir/image.gz > $TMPFILE
+ $DEBUGFS -w -R "feature ^dir_index" $TMPFILE >/dev/null 2>&1
+ gzip $TMPFILE
+ IMAGE="$TMPFILE".gz
+ EXP1=$test_dir/expect-nohtree.1
+ EXP2=$test_dir/expect-nohtree.2
+fi
+. $cmd_dir/run_e2fsck
+rm -f "$TMPFILE".gz