From 0444e15b3426994266db743c33e011728e3333dd Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Wed, 10 Nov 1999 13:17:24 +0000 Subject: [PATCH] ChangeLog, run_e2fsck, expect.1, expect.2, image.gz, name, script: f_imagic: New test case which tests handling of imagic inodes in an non-imagic-enabled filessystem. f_imagic_fs: New test case which tests handling of imagic inodes in an imagic-enabled filesystem. f_filetype: New test case which tests setting filetype information in a filesystem. Also tests handling of immutable special files (device/fifo). run_e2fsck: Add support for PREP_CMD, which allows a test case to specify some commands which will be run (via eval) after the image is compressed and before running e2fsck. --- tests/ChangeLog | 16 ++++++++++++++++ tests/f_filetype/expect.1 | 37 ++++++++++++++++++++++++++++++++++++ tests/f_filetype/expect.2 | 7 +++++++ tests/f_filetype/image.gz | Bin 0 -> 646 bytes tests/f_filetype/name | 1 + tests/f_imagic/expect.1 | 38 +++++++++++++++++++++++++++++++++++++ tests/f_imagic/expect.2 | 7 +++++++ tests/f_imagic/image.gz | Bin 0 -> 1143 bytes tests/f_imagic/name | 1 + tests/f_imagic_fs/expect.1 | 22 +++++++++++++++++++++ tests/f_imagic_fs/expect.2 | 7 +++++++ tests/f_imagic_fs/name | 1 + tests/f_imagic_fs/script | 3 +++ tests/run_e2fsck | 4 +++- 14 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 tests/f_filetype/expect.1 create mode 100644 tests/f_filetype/expect.2 create mode 100644 tests/f_filetype/image.gz create mode 100644 tests/f_filetype/name create mode 100644 tests/f_imagic/expect.1 create mode 100644 tests/f_imagic/expect.2 create mode 100644 tests/f_imagic/image.gz create mode 100644 tests/f_imagic/name create mode 100644 tests/f_imagic_fs/expect.1 create mode 100644 tests/f_imagic_fs/expect.2 create mode 100644 tests/f_imagic_fs/name create mode 100644 tests/f_imagic_fs/script diff --git a/tests/ChangeLog b/tests/ChangeLog index c1a423f0..fc801cce 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,19 @@ +1999-11-10 + + * f_imagic: New test case which tests handling of imagic inodes in + an non-imagic-enabled filessystem. + + * f_imagic_fs: New test case which tests handling of imagic inodes + in an imagic-enabled filesystem. + + * f_filetype: New test case which tests setting filetype + information in a filesystem. Also tests handling of + immutable special files (device/fifo). + + * run_e2fsck: Add support for PREP_CMD, which allows a test case + to specify some commands which will be run (via eval) + after the image is compressed and before running e2fsck. + 1999-10-26 * Release of E2fsprogs 1.17 diff --git a/tests/f_filetype/expect.1 b/tests/f_filetype/expect.1 new file mode 100644 index 00000000..e65fdb2c --- /dev/null +++ b/tests/f_filetype/expect.1 @@ -0,0 +1,37 @@ +Pass 1: Checking inodes, blocks, and sizes +Special (device/socket/fifo) inode 14 has immutable flag set. Clear? yes + +Special (device/socket/fifo) inode 15 has immutable flag set. Clear? yes + +Special (device/socket/fifo) inode 16 has immutable flag set. Clear? yes + +Pass 2: Checking directory structure +Setting filetype for entry '.' in / (2) to 2. +Setting filetype for entry '..' in / (2) to 2. +Setting filetype for entry 'lost+found' in / (2) to 2. +Setting filetype for entry 'file' in / (2) to 1. +Setting filetype for entry 'dir' in / (2) to 2. +Setting filetype for entry 'fifo' in / (2) to 5. +Setting filetype for entry 'block' in / (2) to 4. +Setting filetype for entry 'char' in / (2) to 3. +Setting filetype for entry 'symlink' in / (2) to 7. +Inode 18 (/badchar) is an illegal character device. +Clear? yes + +Inode 19 (/badblock) is an illegal block device. +Clear? yes + +Inode 20 (/badfifo) is an illegal FIFO. +Clear? yes + +Setting filetype for entry '.' in /lost+found (11) to 2. +Setting filetype for entry '..' in /lost+found (11) to 2. +Setting filetype for entry '.' in /dir (13) to 2. +Setting filetype for entry '..' in /dir (13) to 2. +Pass 3: Checking directory connectivity +Pass 4: Checking reference counts +Pass 5: Checking group summary information + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 17/64 files (0.0% non-contiguous), 27/100 blocks +Exit status is 1 diff --git a/tests/f_filetype/expect.2 b/tests/f_filetype/expect.2 new file mode 100644 index 00000000..a8681aa8 --- /dev/null +++ b/tests/f_filetype/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: 17/64 files (0.0% non-contiguous), 27/100 blocks +Exit status is 0 diff --git a/tests/f_filetype/image.gz b/tests/f_filetype/image.gz new file mode 100644 index 0000000000000000000000000000000000000000..ad0b2ec72892dfa96f38e1054d39a5d39bcb3462 GIT binary patch literal 646 zcmb2|=HRf*)wEz@&dg0rPi1&}+df-3QHK44dVSZWsNC$eQR1@A7r68yr|f$9=n?mY zZJ8TQau0+ZJiAY1;d`f;yDSGoT`ssT*%4CEeZF|QcA#-YrjqG={+g4q@AUS^O}hWI z$X|-dV2xOkl%cX=dD63Fue;hY=O$mPHjZ9>e}Bm8b_3aWwYsUV@A`Z$|Gp`-`|Yu$ zd8Nxv&;1==SMfXL)v-gry2FjF=jX-W|9Ix`{_xI~a$o+}nDO(pm+h{-@ag{T0|l1B zGVBeC!8PCZ_uYTn&GYF`^82uVtWToX?7r{0Z^^7!YmFZ3Q08BSe|BDb{Ue-DeAhK= z*~#aos3oZ-FH1VtR-$UsQfz2!_&oWNnK*x7{q|zjFR^Q)RZ3!g=UOz?>ij+U@q6u> z=p{G)7lr@5X?OMh+%x(1$9B20?fk#H`{&!|5!*f1|5_R}|5g0UJ$xJUCOTfrw?DuB z|J(oHe*P~0`*!Nuw{=&}9}~ZH!)bGv{-xD*JC8SS+5PFd+!OQoq`OMYYwv3s>hG@wlw7MtEl2s zo7wAHj@??ElcTf0e(Ti!iM=gL)3PgVpIl#mdDGMO?tZn+KZO%tzjQ0kEw+_*_WtbM z-Mhs?+J82O`sJE!l~U2!A)B7QT(~!);K;GMm;e8I-TQxF!ip*`hyTpKgQw!lEMqycL%OEpN4v zBqq?d+EU}T3E9>mV*bYx{$Dgp{m0k^3qzGSjjLEa!ix^JXB_VB&9YZ+L|Sv`*N`0b znQSEu<8NGay}WIWS1@01njAk{Rhc<~vy~fZ%diiu<>|#CDQ_t1 zIE6o3B9joN#?X*gG*V_c*T`I&H)|jAfhc z4gOqV)K}j^uANNy%rA!AxXr$t%Nv7n2j2@1UeqjKy=0nJkz^Y?#e0wurHW`EU=IQ~ zQ_c}7*hsI`UdnmM04-?165_w!{FZ$9)}~M5b@)oUMWr>xN@$K_Y1& z0yke6vu9l$EBYkRYrCgaJ}#15LgW-Y^(5)Xc{4|K4zb1sl)?GXM4g8f|KM{WVt5(B z?=iYL);QMFvM%`15kR<`rY4YBbVUZ%tMJ3W^9)=lo|=0~zGzSRjBJd4`8U2CaU2+y z;lUG%!xC1?bgm=rEyfoOcWF09c}wEguz7>pL}swmWOV?Z?`lCoxDy`P{M7Vmt#@r5 z+1;kVNR?kVb8;);fcdIP@X1o`#V@Zj!dmk2)<}A)E-<7o*ILV|C+^POG=B)cjm;ed*za{dez$d@;wgO7z0RI9M5iCIf literal 0 HcmV?d00001 diff --git a/tests/f_imagic/name b/tests/f_imagic/name new file mode 100644 index 00000000..db940088 --- /dev/null +++ b/tests/f_imagic/name @@ -0,0 +1 @@ +non-imagic filesystem with imagic inodes diff --git a/tests/f_imagic_fs/expect.1 b/tests/f_imagic_fs/expect.1 new file mode 100644 index 00000000..cf540999 --- /dev/null +++ b/tests/f_imagic_fs/expect.1 @@ -0,0 +1,22 @@ +Pass 1: Checking inodes, blocks, and sizes +Pass 2: Checking directory structure +Pass 3: Checking directory connectivity +/lost+found not found. Create? yes + +Pass 4: Checking reference counts +Inode 2 ref count is 4, should be 3. Fix? yes + +Pass 5: Checking group summary information +Block bitmap differences: -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 +Fix? yes + +Free blocks count wrong for group #0 (76, counted=87). +Fix? yes + +Free blocks count wrong (76, counted=87). +Fix? yes + + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 14/16 files (0.0% non-contiguous), 13/100 blocks +Exit status is 1 diff --git a/tests/f_imagic_fs/expect.2 b/tests/f_imagic_fs/expect.2 new file mode 100644 index 00000000..1f411c0c --- /dev/null +++ b/tests/f_imagic_fs/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: 14/16 files (0.0% non-contiguous), 13/100 blocks +Exit status is 0 diff --git a/tests/f_imagic_fs/name b/tests/f_imagic_fs/name new file mode 100644 index 00000000..a0369766 --- /dev/null +++ b/tests/f_imagic_fs/name @@ -0,0 +1 @@ +imagic filesystem with imagic inodes diff --git a/tests/f_imagic_fs/script b/tests/f_imagic_fs/script new file mode 100644 index 00000000..572ace15 --- /dev/null +++ b/tests/f_imagic_fs/script @@ -0,0 +1,3 @@ +IMAGE=$test_dir/../f_imagic/image.gz +PREP_CMD='$DEBUGFS -w -R "feature imagic_inodes" $TMPFILE > /dev/null 2>&1' +. $cmd_dir/run_e2fsck diff --git a/tests/run_e2fsck b/tests/run_e2fsck index 91277e19..cd302903 100644 --- a/tests/run_e2fsck +++ b/tests/run_e2fsck @@ -28,6 +28,8 @@ fi gunzip < $IMAGE > $TMPFILE +eval $PREP_CMD + $FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT1.new 2>&1 status=$? echo Exit status is $status >> $OUT1.new @@ -68,6 +70,6 @@ if [ "$SKIP_VERIFY" != "true" ] ; then fi if [ "$SKIP_CLEANUP" != "true" ] ; then - unset IMAGE FSCK_OPT SECOND_FSCK_OPT OUT1 OUT2 EXP1 EXP2 ONE_PASS_ONLY + unset IMAGE FSCK_OPT SECOND_FSCK_OPT OUT1 OUT2 EXP1 EXP2 ONE_PASS_ONLY PREP_CMD fi