4 # Test mount a needs_recovery partition with noload option.
5 # ext4 used to Oops until part of this commit:
7 # 744692d ext4: use ext4_get_block_write in buffer write
11 #-----------------------------------------------------------------------
12 # Copyright (c) 2015 Red Hat Inc. All Rights Reserved.
14 # This program is free software; you can redistribute it and/or
15 # modify it under the terms of the GNU General Public License as
16 # published by the Free Software Foundation.
18 # This program is distributed in the hope that it would be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU General Public License for more details.
23 # You should have received a copy of the GNU General Public License
24 # along with this program; if not, write the Free Software Foundation,
25 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 #-----------------------------------------------------------------------
30 seqres=$RESULT_DIR/$seq
31 echo "QA output created by $seq"
35 status=1 # failure is the default!
36 trap "_cleanup; exit \$status" 0 1 2 3 15
44 # get standard environment, filters and checks
48 # real QA test starts here
49 _supported_fs ext2 ext3 ext4
52 # nofsck as we modify sb via debugfs
53 _require_scratch_nocheck
55 # remove previous $seqres.full before test
57 echo "Silence is golden"
59 _scratch_mkfs >>$seqres.full 2>&1
61 # set needs_recovery feature bit
62 debugfs -w -R "feature +needs_recovery" $SCRATCH_DEV \
65 # mount with noload option
66 _try_scratch_mount "-o noload" >>$seqres.full 2>&1