fstests: move test group info to test files
[xfstests-dev.git] / tests / generic / 596
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright 2020 Google LLC
4 #
5 # FS QA Test No. 596
6 #
7 # Regression test for the bug fixed by commit 10a98cb16d80 ("xfs: clear
8 # PF_MEMALLOC before exiting xfsaild thread").  If the bug exists, a kernel
9 # WARNING should be triggered.  See the commit message for details.
10 #
11 . ./common/preamble
12 _begin_fstest auto quick
13
14 # Override the default cleanup function.
15 _cleanup()
16 {
17         $ACCTON_PROG off >> $seqres.full
18         rm -f $tmp.*
19 }
20
21 # Import common functions.
22 . ./common/filter
23
24 # real QA test starts here
25 _supported_fs generic
26 _require_bsd_process_accounting
27 _require_chattr S
28 _require_test
29 _require_scratch
30
31 # To trigger the bug we must unmount a filesystem while BSD process accounting
32 # is enabled.  The accounting file must also be located on a different
33 # filesystem and have the sync flag set.
34
35 accounting_file=$TEST_DIR/$seq
36
37 rm -f $accounting_file
38 touch $accounting_file
39 $CHATTR_PROG +S $accounting_file
40
41 _scratch_mkfs &>> $seqres.full
42 $ACCTON_PROG $accounting_file >> $seqres.full
43 _scratch_mount
44 _scratch_unmount
45 $ACCTON_PROG off >> $seqres.full
46
47 echo "Silence is golden"
48
49 status=0
50 exit