Skip to content

Commit 6f8c12d

Browse files
committed
all: fix the "Old style watch rules are slower" warning
Signed-off-by: Paul Moore <paul@paul-moore.com>
1 parent 8e13f9c commit 6f8c12d

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

tests/fanotify/test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ system("auditctl -D >& /dev/null");
3737
# Create test rule.
3838
my $key = key_gen();
3939
my $testfile = "/tmp/$key";
40-
system("auditctl -w $testfile -k $key");
40+
system("auditctl -a always,exit -F path=$testfile -k $key");
4141

4242
# Start fanotify watcher in the background.
4343
my $fanotify_pid = open3( undef, undef, undef, "$basedir/fanotify /tmp" );

tests/file_create/test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ my $dir = tempdir( TEMPLATE => '/tmp/audit-testsuite-XXXX', CLEANUP => 1 );
4141

4242
# set the directory watch
4343
my $key = key_gen();
44-
system("auditctl -w $dir -k $key");
44+
system("auditctl -a always,exit -F path=$dir -k $key");
4545

4646
# create a new file in the watched directory
4747
( my $fh, my $filename ) =

tests/file_delete/test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ my $gid_fmt = getgrgid($uid);
6363

6464
# set the directory watch
6565
my $key = key_gen();
66-
system("auditctl -w $dir -k $key");
66+
system("auditctl -a always,exit -F path=$dir -k $key");
6767

6868
# delete file
6969
unlink($filename);

tests/file_rename/test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ my $gid_fmt = getgrgid($uid);
6363

6464
# set the directory watch
6565
my $key = key_gen();
66-
system("auditctl -w $dir -k $key");
66+
system("auditctl -a always,exit -F path=$dir -k $key");
6767

6868
# move/rename the file
6969
rename( $filename, $filename . "-new" );

0 commit comments

Comments
 (0)