From accf82dced2ad18ece2503376d0f927f6340191d Mon Sep 17 00:00:00 2001 From: Paul Moore Date: Thu, 5 Sep 2024 13:05:35 -0400 Subject: [PATCH] all: fix the "Old style watch rules are slower" warning Signed-off-by: Paul Moore --- tests/fanotify/test | 2 +- tests/file_create/test | 2 +- tests/file_rename/test | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/fanotify/test b/tests/fanotify/test index e4154da..a0f5d22 100755 --- a/tests/fanotify/test +++ b/tests/fanotify/test @@ -37,7 +37,7 @@ system("auditctl -D >& /dev/null"); # Create test rule. my $key = key_gen(); my $testfile = "/tmp/$key"; -system("auditctl -w $testfile -k $key"); +system("auditctl -a always,exit-F path=$testfile -k $key"); # Start fanotify watcher in the background. my $fanotify_pid = open3( undef, undef, undef, "$basedir/fanotify /tmp" ); diff --git a/tests/file_create/test b/tests/file_create/test index 65d14fc..04c20c2 100755 --- a/tests/file_create/test +++ b/tests/file_create/test @@ -41,7 +41,7 @@ my $dir = tempdir( TEMPLATE => '/tmp/audit-testsuite-XXXX', CLEANUP => 1 ); # set the directory watch my $key = key_gen(); -system("auditctl -w $dir -k $key"); +system("auditctl -a always,exit -F path=$dir -k $key"); # create a new file in the watched directory ( my $fh, my $filename ) = diff --git a/tests/file_rename/test b/tests/file_rename/test index 651aa3a..9349fc6 100755 --- a/tests/file_rename/test +++ b/tests/file_rename/test @@ -63,7 +63,7 @@ my $gid_fmt = getgrgid($uid); # set the directory watch my $key = key_gen(); -system("auditctl -w $dir -k $key"); +system("auditctl -a always,exit -F path=$dir -k $key"); # move/rename the file rename( $filename, $filename . "-new" );