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 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
29 # real QA test starts here
31 # Modify as appropriate.
39 _scratch_mkfs > $seqres.full 2>&1 || _fail "Could not mkfs scratch device"
41 THIS_TEST_DIR=$SCRATCH_MNT/$seq.test
45 mknod $THIS_TEST_DIR/testnode c 1 3 2>&1 | _filter_mknod
46 mkdir $THIS_TEST_DIR/testdir
47 touch $THIS_TEST_DIR/testtarget
48 ln -s $THIS_TEST_DIR/testtarget $THIS_TEST_DIR/testlink 2>&1 | _filter_ln
54 mkdir $THIS_TEST_DIR || _fail "Could not create dir for test"
56 _create_files 2>&1 | _filter_scratch
57 _try_scratch_mount -o remount,ro || _fail "Could not remount scratch readonly"
58 _create_files 2>&1 | _filter_scratch