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 # NFS will optimize away the on-the-wire lookup before attempting to
19 # create a new file (since that means an extra round trip).
26 _scratch_mkfs > $seqres.full 2>&1 || _fail "Could not mkfs scratch device"
28 THIS_TEST_DIR=$SCRATCH_MNT/$seq.test
32 mknod $THIS_TEST_DIR/testnode c 1 3 2>&1 | _filter_mknod
33 mkdir $THIS_TEST_DIR/testdir
34 touch $THIS_TEST_DIR/testtarget
35 ln -s $THIS_TEST_DIR/testtarget $THIS_TEST_DIR/testlink 2>&1 | _filter_ln
41 mkdir $THIS_TEST_DIR || _fail "Could not create dir for test"
43 _create_files 2>&1 | _filter_scratch
44 _try_scratch_mount -o remount,ro || _fail "Could not remount scratch readonly"
45 _create_files 2>&1 | _filter_scratch