use strict;
use warnings;
-use Test::More tests => 2;
-BEGIN { use_ok('Linux::Seccomp') };
+use Test::More tests => 3;
+BEGIN { use_ok('Linux::Seccomp', ':all') };
my $fail = 0;
}
ok( $fail == 0 , 'Constants' );
+
+my $got_sigsys = 0;
+$SIG{SYS} = sub { $got_sigsys = 1 };
+
+my $ctx = Linux::Seccomp->new(SCMP_ACT_ALLOW);
+$ctx->rule_add(SCMP_ACT_TRAP, syscall_resolve_name('mkdir'));
+$ctx->load;
+
+mkdir 'testdir';
+ok $got_sigsys, 'filter with SCMP_ACT_TRAP on mkdir() works';