1*6a54128fSAndroid Build Coastguard Workerif ! test -x $DEBUGFS_EXE; then 2*6a54128fSAndroid Build Coastguard Worker echo "$test_name: $test_description: skipped (no debugfs)" 3*6a54128fSAndroid Build Coastguard Worker return 0 4*6a54128fSAndroid Build Coastguard Workerfi 5*6a54128fSAndroid Build Coastguard Worker 6*6a54128fSAndroid Build Coastguard WorkerSKIP_GUNZIP="true" 7*6a54128fSAndroid Build Coastguard WorkerTEST_DATA="$test_name.tmp" 8*6a54128fSAndroid Build Coastguard Worker 9*6a54128fSAndroid Build Coastguard Workerdd if=/dev/zero of=$TMPFILE bs=1k count=256 > /dev/null 2>&1 10*6a54128fSAndroid Build Coastguard Worker$MKE2FS -Ft ext4 -o Linux $TMPFILE > /dev/null 2>&1 11*6a54128fSAndroid Build Coastguard Worker$DEBUGFS -w $TMPFILE << EOF > /dev/null 2>&1 12*6a54128fSAndroid Build Coastguard Workerwrite /dev/null testfile 13*6a54128fSAndroid Build Coastguard Workersetb 100 15 14*6a54128fSAndroid Build Coastguard Workersetb 130 30 15*6a54128fSAndroid Build Coastguard Workersetb 200 30 16*6a54128fSAndroid Build Coastguard Workerextent_open testfile 17*6a54128fSAndroid Build Coastguard Worker insert_node 0 15 100 18*6a54128fSAndroid Build Coastguard Worker insert_node --after 15 15 115 19*6a54128fSAndroid Build Coastguard Worker insert_node --after 30 15 130 20*6a54128fSAndroid Build Coastguard Worker insert_node --after 45 15 145 21*6a54128fSAndroid Build Coastguard Worker split 22*6a54128fSAndroid Build Coastguard Worker down 23*6a54128fSAndroid Build Coastguard Worker split 24*6a54128fSAndroid Build Coastguard Worker root 25*6a54128fSAndroid Build Coastguard Worker down 26*6a54128fSAndroid Build Coastguard Worker next 27*6a54128fSAndroid Build Coastguard Worker replace_node 15 30 200 28*6a54128fSAndroid Build Coastguard Worker extent_close 29*6a54128fSAndroid Build Coastguard Workerset_inode_field testfile i_size 61400 30*6a54128fSAndroid Build Coastguard Workerset_inode_field testfile i_blocks 154 31*6a54128fSAndroid Build Coastguard Workerset_bg 0 free_blocks_count 156 32*6a54128fSAndroid Build Coastguard Workerset_bg 0 bg_checksum calc 33*6a54128fSAndroid Build Coastguard Workerset_super_value free_blocks_count 156 34*6a54128fSAndroid Build Coastguard Workerq 35*6a54128fSAndroid Build Coastguard WorkerEOF 36*6a54128fSAndroid Build Coastguard Worker 37*6a54128fSAndroid Build Coastguard Worker. $cmd_dir/run_e2fsck 38*6a54128fSAndroid Build Coastguard Worker 39*6a54128fSAndroid Build Coastguard Workerrm -f $TEST_DATA 40*6a54128fSAndroid Build Coastguard Worker 41*6a54128fSAndroid Build Coastguard Workerunset E2FSCK_TIME TEST_DATA 42