You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests/int: use runc features in seccomp flags test
This test (initially added by commit 58ea21d and later amended in
commit 26dc55e) currently has two major deficiencies:
1. All possible flag combinations, and their respective numeric values,
have to be explicitly listed. Currently we support 3 flags, so
there is only 7 combinations, but adding more flags will become
increasingly difficult.
2. It requires kernel 4.17 (for SECCOMP_FILTER_FLAG_SPEC_ALLOW), and not
doing any tests when running on an older kernel. This, too, will make
it more difficult to add extra flags in the future.
Both issues can be solved by using runc features which now prints all
known and supported runc flags. We still have to hardcode individual
flags to test, and their numeric values, but most of other work is coded
now. In particular:
* The test checks that all the supported flags are being tested. In
other words, this is a sanity check that if a new flag is added to
runc, the test is amended appropriately.
* Flags that are known but not supported (say because of an older
kernel) are removed from the test. This makes it possible to run
the test on older kernels, removing the limitation (2) above.
* The test calculates the powerset (all possible combinations) of
supported flags, and their numeric values. This makes it easier
to add more flags, removing the limitation (1) above.
The downside to this is the test code is somewhat complicated.
Signed-off-by: Kir Kolyshkin <[email protected]>
0 commit comments