Skip to content

Commit

Permalink
wip: time syscalls
Browse files Browse the repository at this point in the history
  • Loading branch information
pb8o committed Dec 12, 2024
1 parent 42d1e30 commit 849f819
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/integration_tests/security/test_seccomp_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,14 @@ def test_validate_filter(seccompiler, bin_test_syscall, monkeypatch, tmp_path):
assert outcome.returncode == 159

print("now we test syscalls we didn't see in the filter")
import time
for syscall_id in range(syscall_id_max):
if syscall_id in seen_syscalls:
continue
cmd = f"{bin_test_syscall} {filter_path} {syscall_id}"
print(cmd)
# and they should all exit 159
start = time.perf_counter()
assert utils.run_cmd(cmd).returncode == 159
end = time.perf_counter()
print(f"\ttook {end-start:.6f}s")

0 comments on commit 849f819

Please sign in to comment.