1test_description="mke2fs /dev/mapper/bad_disk should fail" 2 3OUT=$test_name.log 4 5dmsetup create -v bad_disk --table '0 1148681097 error' > $OUT 2>&1 6status=$? 7if [ "$status" != 0 ]; then 8 echo "$test_name: $test_description: skip" 9 touch $test_name.ok 10else 11 echo mke2fs /dev/mapper/bad_disk >> $OUT 12 $MKE2FS /dev/mapper/bad_disk >> $OUT 2>&1 13 status=$? 14 sleep 1 15 dmsetup remove --retry bad_disk >> $OUT 2>&1 16 17 if [ "$status" = 0 ] ; then 18 ln -f $test_name.log $test_name.failed 19 echo "$test_name: $test_description: failed" 20 else 21 echo "$test_name: $test_description: ok" 22 touch $test_name.ok 23 fi 24fi 25