tests: adapt to seccomp crate changes
@@ -145,10 +145,10 @@ fn main() {
.unwrap();
// Adds rule to allow the harmless demo Firecracker.
- context.add_rule(
+ context.add_rules(
libc::SYS_write,
None,
- seccomp::SeccompRule::new(
+ vec![seccomp::SeccompRule::new(
vec![
seccomp::SeccompCondition::new(
0,
@@ -158,8 +158,8 @@ fn main() {
seccomp::SeccompCondition::new(2, seccomp::SeccompCmpOp::Eq, 14).unwrap(),
],
seccomp::SeccompAction::Allow,
- ),
- );
+ )],
+ ).unwrap();
// Loads filters generated by the context.
seccomp::setup_seccomp(seccomp::SeccompLevel::Advanced(context)).unwrap();
