2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright 2020 Google LLC
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.
12 seqres=$RESULT_DIR/$seq
13 echo "QA output created by $seq"
17 status=1 # failure is the default!
18 trap "_cleanup; exit \$status" 0 1 2 3 15
22 $ACCTON_PROG off >> $seqres.full
26 # get standard environment, filters and checks
30 # remove previous $seqres.full before test
33 # real QA test starts here
35 _require_bsd_process_accounting
40 # To trigger the bug we must unmount a filesystem while BSD process accounting
41 # is enabled. The accounting file must also be located on a different
42 # filesystem and have the sync flag set.
44 accounting_file=$TEST_DIR/$seq
46 rm -f $accounting_file
47 touch $accounting_file
48 $CHATTR_PROG +S $accounting_file
50 _scratch_mkfs &>> $seqres.full
51 $ACCTON_PROG $accounting_file >> $seqres.full
54 $ACCTON_PROG off >> $seqres.full
56 echo "Silence is golden"