summaryrefslogtreecommitdiff
path: root/tests/btrfs/262
blob: f50e5d237bbb2f7127799309fc9abca03d84a3c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#! /bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2022 Sidong Yang.  All Rights Reserved.
#
# FS QA Test 262
#
# Test that running qgroup enable, create, destroy, and disable commands in
# parallel doesn't result in a deadlock, a crash or any filesystem
# inconsistency.
#
. ./common/preamble
_begin_fstest auto quick qgroup

. ./common/filter

_supported_fs btrfs

_require_scratch

_scratch_mkfs > /dev/null 2>&1
_scratch_mount

for ((i = 0; i < 200; i++)); do
	$BTRFS_UTIL_PROG quota enable $SCRATCH_MNT 2>> $seqres.full &
	$BTRFS_UTIL_PROG qgroup create 1/0 $SCRATCH_MNT 2>> $seqres.full &
	$BTRFS_UTIL_PROG qgroup destroy 1/0 $SCRATCH_MNT 2>> $seqres.full &
	$BTRFS_UTIL_PROG quota disable $SCRATCH_MNT 2>> $seqres.full &
done

wait

# success, all done
echo "Silence is golden"
status=0
exit