2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2015 Red Hat Inc. All Rights Reserved.
7 # Commit bbe051c8 disallows ro->rw remount on norecovery mount
8 # This test makes sure the behavior is correct.
11 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
16 status=1 # failure is the default!
17 trap "_cleanup; exit \$status" 0 1 2 3 15
25 # get standard environment, filters and checks
30 # real QA test starts here
34 # norecovery mounts do not succeed with quotas eanbled, so shut them off
35 _qmount_option "defaults"
37 echo "Silence is golden"
38 _scratch_mkfs_sized $((512 * 1024 * 1024)) >$seqres.full
40 # first ro mount with norecovery
41 _try_scratch_mount "-o ro,norecovery" >>$seqres.full 2>&1 \
42 || _fail "First ro mount failed"
43 # make sure a following remount,rw fails
44 _try_scratch_mount "-o remount,rw" >>$seqres.full 2>&1 \
45 && _fail "Second rw remount succeeded"