generic: test PF_MEMALLOC interfering with accounting file write
[xfstests-dev.git] / common / rc
index 3265c793160c95856f668141ef67a26e49530e2d..24a8f145b8ad15c93be52294aa86fe8e6f63eb3a 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -4184,6 +4184,18 @@ _require_negative_timestamps() {
        esac
 }
 
+# Require the 'accton' userspace tool and CONFIG_BSD_PROCESS_ACCT=y.
+_require_bsd_process_accounting()
+{
+       _require_command "$ACCTON_PROG" accton
+       $ACCTON_PROG on &> $tmp.test_accton
+       cat $tmp.test_accton >> $seqres.full
+       if grep 'Function not implemented' $tmp.test_accton; then
+               _notrun "BSD process accounting support unavailable"
+       fi
+       $ACCTON_PROG off >> $seqres.full
+}
+
 init_rc
 
 ################################################################################