2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
7 # test mount of two FSes with identical UUID and mount with unknown option
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
15 status=1 # failure is the default!
16 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
18 # get standard environment, filters and checks
24 _test_xfs_db -r -c "uuid" | $AWK_PROG '/^UUID/ { print $3 }'
27 # real QA test starts here
31 _require_scratch_nocheck
34 uuid=`_get_existing_uuid`
36 # We can only change the UUID on a v4 filesystem. Revist this when/if UUIDs
37 # canbe changed on v5 filesystems.
39 if ! _scratch_mkfs_xfs -m crc=0 >$tmp.out 2>&1
42 echo "!!! failed to mkfs on $SCRATCH_DEV"
46 echo "*** mount fs with bad mount option (expect failure)"
47 if _try_scratch_mount -o foobar >$tmp.out 2>&1
50 echo "!!! mount succeeded (expecting failure)"
54 echo "*** duplicate uuid"
55 xfs_db -x -c "uuid $uuid" `_scratch_xfs_db_options` >/dev/null
57 echo "*** mount fs with duplicate uuid (expect failure)"
58 if _try_scratch_mount >$tmp.out 2>&1
61 echo "!!! mount succeeded (expecting failure)"