Skip to content

Commit ef0fdeb

Browse files
alindimaandreeaflorescu
authored andcommitted
Add json integration tests
Signed-off-by: alindima <[email protected]>
1 parent 16eed50 commit ef0fdeb

File tree

2 files changed

+408
-0
lines changed

2 files changed

+408
-0
lines changed

tests/integration_tests.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,14 @@ fn test_empty_filter() {
9999

100100
// This should allow any system calls.
101101
let pid = thread::spawn(move || {
102+
let seccomp_level = unsafe { libc::prctl(libc::PR_GET_SECCOMP) };
103+
assert_eq!(seccomp_level, 0);
102104
// Install the filter.
103105
apply_filter(&prog).unwrap();
104106

107+
let seccomp_level = unsafe { libc::prctl(libc::PR_GET_SECCOMP) };
108+
assert_eq!(seccomp_level, 2);
109+
105110
unsafe { libc::getpid() }
106111
})
107112
.join()

0 commit comments

Comments
 (0)