|
5 | 5 | import os |
6 | 6 | import time |
7 | 7 |
|
| 8 | +import pytest |
| 9 | + |
8 | 10 | from host_tools.cargo_build import run_seccompiler_bin |
9 | 11 |
|
| 12 | +ITERATIONS = 100 |
| 13 | + |
10 | 14 |
|
| 15 | +@pytest.mark.nonci |
11 | 16 | def test_startup_time_new_pid_ns( |
12 | 17 | microvm_factory, guest_kernel_linux_5_10, rootfs, metrics |
13 | 18 | ): |
14 | 19 | """ |
15 | 20 | Check startup time when jailer is spawned in a new PID namespace. |
16 | 21 | """ |
17 | | - for _ in range(10): |
| 22 | + for _ in range(ITERATIONS): |
18 | 23 | microvm = microvm_factory.build(guest_kernel_linux_5_10, rootfs) |
19 | 24 | microvm.jailer.new_pid_ns = True |
20 | 25 | _test_startup_time(microvm, metrics, "new_pid_ns") |
21 | 26 |
|
22 | 27 |
|
| 28 | +@pytest.mark.nonci |
23 | 29 | def test_startup_time_daemonize( |
24 | 30 | microvm_factory, guest_kernel_linux_5_10, rootfs, metrics |
25 | 31 | ): |
26 | 32 | """ |
27 | 33 | Check startup time when jailer detaches Firecracker from the controlling terminal. |
28 | 34 | """ |
29 | | - for _ in range(10): |
| 35 | + for _ in range(ITERATIONS): |
30 | 36 | microvm = microvm_factory.build(guest_kernel_linux_5_10, rootfs) |
31 | 37 | _test_startup_time(microvm, metrics, "daemonize") |
32 | 38 |
|
33 | 39 |
|
| 40 | +@pytest.mark.nonci |
34 | 41 | def test_startup_time_custom_seccomp( |
35 | 42 | microvm_factory, guest_kernel_linux_5_10, rootfs, metrics |
36 | 43 | ): |
37 | 44 | """ |
38 | 45 | Check the startup time when using custom seccomp filters. |
39 | 46 | """ |
40 | | - for _ in range(10): |
| 47 | + for _ in range(ITERATIONS): |
41 | 48 | microvm = microvm_factory.build(guest_kernel_linux_5_10, rootfs) |
42 | 49 | _custom_filter_setup(microvm) |
43 | 50 | _test_startup_time(microvm, metrics, "custom_seccomp") |
|
0 commit comments