2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2012 Red Hat, Inc. All Rights Reserved.
7 # Tests for EEXIST (not EROFS) for inode creations, if
8 # we ask to create an already-existing entity on an RO filesystem
11 _begin_fstest auto quick
13 # Import common functions.
16 # real QA test starts here
18 # Modify as appropriate.
24 _scratch_mkfs > $seqres.full 2>&1 || _fail "Could not mkfs scratch device"
26 THIS_TEST_DIR=$SCRATCH_MNT/$seq.test
30 mknod $THIS_TEST_DIR/testnode c 1 3 2>&1 | _filter_mknod
31 mkdir $THIS_TEST_DIR/testdir
32 touch $THIS_TEST_DIR/testtarget
33 ln -s $THIS_TEST_DIR/testtarget $THIS_TEST_DIR/testlink 2>&1 | _filter_ln
39 mkdir $THIS_TEST_DIR || _fail "Could not create dir for test"
41 _create_files 2>&1 | _filter_scratch
42 _try_scratch_mount -o remount,ro || _fail "Could not remount scratch readonly"
43 _create_files 2>&1 | _filter_scratch