Check if CAPABILITY_MODE and CAPABILITIES are presents, and skip (in place of fail) the test if not
Details
Details
- Reviewers
oshogbo
On a kernel without CAPABILITY, test results before:
lib/libcasper/services/cap_fileargs/fileargs_test:fileargs__fopen_create -> failed: /usr/src/lib/libcasper/services/cap_fileargs/tests/fileargs_test.c:215: cap_rights_get(fd, &fdrights) == 0 not met [0.004s] lib/libcasper/services/cap_fileargs/fileargs_test:fileargs__fopen_read -> failed: /usr/src/lib/libcasper/services/cap_fileargs/tests/fileargs_test.c:215: cap_rights_get(fd, &fdrights) == 0 not met [0.034s] lib/libcasper/services/cap_fileargs/fileargs_test:fileargs__fopen_write -> failed: /usr/src/lib/libcasper/services/cap_fileargs/tests/fileargs_test.c:215: cap_rights_get(fd, &fdrights) == 0 not met [0.033s] lib/libcasper/services/cap_fileargs/fileargs_test:fileargs__open_create -> failed: /usr/src/lib/libcasper/services/cap_fileargs/tests/fileargs_test.c:215: cap_rights_get(fd, &fdrights) == 0 not met [0.004s] lib/libcasper/services/cap_fileargs/fileargs_test:fileargs__open_lstat -> failed: /usr/src/lib/libcasper/services/cap_fileargs/tests/fileargs_test.c:215: cap_rights_get(fd, &fdrights) == 0 not met [0.034s] lib/libcasper/services/cap_fileargs/fileargs_test:fileargs__open_read -> failed: /usr/src/lib/libcasper/services/cap_fileargs/tests/fileargs_test.c:215: cap_rights_get(fd, &fdrights) == 0 not met [0.033s] lib/libcasper/services/cap_fileargs/fileargs_test:fileargs__open_realpath -> failed: /usr/src/lib/libcasper/services/cap_fileargs/tests/fileargs_test.c:215: cap_rights_get(fd, &fdrights) == 0 not met [0.033s] lib/libcasper/services/cap_fileargs/fileargs_test:fileargs__open_write -> failed: /usr/src/lib/libcasper/services/cap_fileargs/tests/fileargs_test.c:215: cap_rights_get(fd, &fdrights) == 0 not met [0.033s]
And test results after this patch:
PREPROD.cache.netflix# kyua test lib/libcasper/services/cap_fileargs/fileargs_test lib/libcasper/services/cap_fileargs/fileargs_test:fileargs__fopen_create -> skipped: kernel feature (security_capabilities) not present [0.002s] lib/libcasper/services/cap_fileargs/fileargs_test:fileargs__fopen_read -> skipped: kernel feature (security_capabilities) not present [0.002s] lib/libcasper/services/cap_fileargs/fileargs_test:fileargs__fopen_write -> skipped: kernel feature (security_capabilities) not present [0.002s] lib/libcasper/services/cap_fileargs/fileargs_test:fileargs__lstat -> skipped: kernel feature (security_capabilities) not present [0.002s] lib/libcasper/services/cap_fileargs/fileargs_test:fileargs__open_create -> skipped: kernel feature (security_capabilities) not present [0.002s] lib/libcasper/services/cap_fileargs/fileargs_test:fileargs__open_lstat -> skipped: kernel feature (security_capabilities) not present [0.002s] lib/libcasper/services/cap_fileargs/fileargs_test:fileargs__open_read -> skipped: kernel feature (security_capabilities) not present [0.002s] lib/libcasper/services/cap_fileargs/fileargs_test:fileargs__open_realpath -> skipped: kernel feature (security_capabilities) not present [0.002s] lib/libcasper/services/cap_fileargs/fileargs_test:fileargs__open_with_casper -> skipped: kernel feature (security_capabilities) not present [0.002s] lib/libcasper/services/cap_fileargs/fileargs_test:fileargs__open_write -> skipped: kernel feature (security_capabilities) not present [0.002s]
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped