1*6a54128fSAndroid Build Coastguard WorkerThese images contain various forms of corrupted filesystem which 2*6a54128fSAndroid Build Coastguard Workere2fsck will correct. They are used as a regression test for e2fsck. 3*6a54128fSAndroid Build Coastguard Worker 4*6a54128fSAndroid Build Coastguard WorkerThe test_script program will automatically run e2fsck against the 5*6a54128fSAndroid Build Coastguard Workerfilesystem images. It will run them two times, and display the exit 6*6a54128fSAndroid Build Coastguard Workerstatus for each run. The meaning of the exit status codes are as 7*6a54128fSAndroid Build Coastguard Workerfollows: 8*6a54128fSAndroid Build Coastguard Worker 9*6a54128fSAndroid Build Coastguard Worker 0 No filesystem errors were detected 10*6a54128fSAndroid Build Coastguard Worker 1 Filesystem errors detected, but corrected 11*6a54128fSAndroid Build Coastguard Worker 2 System should be rebooted 12*6a54128fSAndroid Build Coastguard Worker 4 Filesystem errors left uncorrected 13*6a54128fSAndroid Build Coastguard Worker 8 Operational error (generally means internal error, 14*6a54128fSAndroid Build Coastguard Worker or filesystem error that the e2fsck was not 15*6a54128fSAndroid Build Coastguard Worker prepared to deal with) 16*6a54128fSAndroid Build Coastguard Worker 16 Usage or syntax error 17*6a54128fSAndroid Build Coastguard Worker 18*6a54128fSAndroid Build Coastguard WorkerDuring the regression test, the first exit code should be 1, and the 19*6a54128fSAndroid Build Coastguard Workersecond exit code should be 0. In other words, all (with one 20*6a54128fSAndroid Build Coastguard Workerexception) of the test filesystems in this directory have some sort of 21*6a54128fSAndroid Build Coastguard Workerfilesystem corruption, which e2fsck should fix on the first pass. 22*6a54128fSAndroid Build Coastguard WorkerAfter the first pass, e2fsck should leave a fully consistent 23*6a54128fSAndroid Build Coastguard Workerfilesystem with no detectable errors found in the second pass. The 24*6a54128fSAndroid Build Coastguard Workerexception is the okgroup.img filesystem, which contains no errors, and 25*6a54128fSAndroid Build Coastguard Workerso both exit codes should be 0. 26*6a54128fSAndroid Build Coastguard Worker 27*6a54128fSAndroid Build Coastguard WorkerNOTE: It appears that at least some versions of the original e2fsck do 28*6a54128fSAndroid Build Coastguard Workernot exit with an exit status code of 1 after correcting filesystem 29*6a54128fSAndroid Build Coastguard Workererrors. So if you modify the test_script to try running these 30*6a54128fSAndroid Build Coastguard Workerfilesystems against the original e2fsck, you will have to inspect the 31*6a54128fSAndroid Build Coastguard Workertest_script.log file manually. 32*6a54128fSAndroid Build Coastguard Worker 33*6a54128fSAndroid Build Coastguard Worker-------------------------------------------------------------- 34*6a54128fSAndroid Build Coastguard WorkerHere's a one-line descriptions of the various test images in this 35*6a54128fSAndroid Build Coastguard Workerdirectory: 36*6a54128fSAndroid Build Coastguard Worker 37*6a54128fSAndroid Build Coastguard Workerbaddir.img Filesystem with a corrupted directory 38*6a54128fSAndroid Build Coastguard Workerbadbblocks.img Filesystem with illegal blocks in the bad block inode. 39*6a54128fSAndroid Build Coastguard Workerbadinode.img Filesystem with various different corrupted inode 40*6a54128fSAndroid Build Coastguard Worker entries. 41*6a54128fSAndroid Build Coastguard Workerbadlkcnt.img Filesystem with deleted files with non-zero link count 42*6a54128fSAndroid Build Coastguard Workerbadroot.img Filesystem with a file for a root directory 43*6a54128fSAndroid Build Coastguard Workerbadtable.img Filesystem with blocks shared between the bitmaps and 44*6a54128fSAndroid Build Coastguard Worker inode table blocks and the bad block inode 45*6a54128fSAndroid Build Coastguard Workerbbfile.img Filesystem with files containing bad blocks 46*6a54128fSAndroid Build Coastguard Workerbitmaps.img Filesystem with corrupted inode and block bitmaps 47*6a54128fSAndroid Build Coastguard Workerdirlink.img Filesystem with a hard link to a directory 48*6a54128fSAndroid Build Coastguard Workerdup.img Filesystem with blocks claimed by two different files 49*6a54128fSAndroid Build Coastguard Workerdup2.img Filesystem with blocks claimed by three different files 50*6a54128fSAndroid Build Coastguard Workerdupfsblks.img Filesystem with blocks claimed by a file and 51*6a54128fSAndroid Build Coastguard Worker inode/block bitmaps and inode tables 52*6a54128fSAndroid Build Coastguard Workerdupsuper.img Filesystem with blocks claimed by a file and 53*6a54128fSAndroid Build Coastguard Worker the superblock / group descriptors 54*6a54128fSAndroid Build Coastguard Workerend-bitmap.img Filesystem with corruption at the end of the block 55*6a54128fSAndroid Build Coastguard Worker bitmap 56*6a54128fSAndroid Build Coastguard Workerexpand.img Tests e2fsck's ability to expand lost+found if 57*6a54128fSAndroid Build Coastguard Worker necessary 58*6a54128fSAndroid Build Coastguard Workerlpf.img Filesystem with disconnected files and no /lost+found 59*6a54128fSAndroid Build Coastguard Worker directory 60*6a54128fSAndroid Build Coastguard Workermke2fs2b.img Filesystem with corruption similar to that 61*6a54128fSAndroid Build Coastguard Worker created by mke2fs version 0.2b 62*6a54128fSAndroid Build Coastguard Workernoroot.img Filesystem with a deleted root directory 63*6a54128fSAndroid Build Coastguard Workerokgroup.img Filesystem that's exactly 8193 blocks long 64*6a54128fSAndroid Build Coastguard Worker (otherwise OK) 65*6a54128fSAndroid Build Coastguard Workeroverfsblks.img Filesystem with overlapping inode and block bitmaps 66*6a54128fSAndroid Build Coastguard Workersymlinks.img Filesystem with bad symlink sizes 67*6a54128fSAndroid Build Coastguard Worker 68*6a54128fSAndroid Build Coastguard Worker 69