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 _begin_fstest auto quick
14 # Override the default cleanup function.
17 $ACCTON_PROG off >> $seqres.full
21 # Import common functions.
24 # real QA test starts here
26 _require_bsd_process_accounting
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.
35 accounting_file=$TEST_DIR/$seq
37 rm -f $accounting_file
38 touch $accounting_file
39 $CHATTR_PROG +S $accounting_file
41 _scratch_mkfs &>> $seqres.full
42 $ACCTON_PROG $accounting_file >> $seqres.full
45 $ACCTON_PROG off >> $seqres.full
47 echo "Silence is golden"