Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP7:Update
systemd.16035
0002-test-seccomp-log-function-names.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0002-test-seccomp-log-function-names.patch of Package systemd.16035
From b6573e577fb72bbec604851cd7f199f58571d14a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> Date: Fri, 21 Sep 2018 14:14:45 +0200 Subject: [PATCH 2/3] test-seccomp: log function names Various tests produce similar output, and the function names make it easier to see where the output is generated. (cherry picked from commit f09da7ccbc67efd4e1a7ac7f3bc1356fad27fc40) [fbui: adjust context] --- src/test/test-seccomp.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/test/test-seccomp.c b/src/test/test-seccomp.c index f80a6a91f9..7a951aec62 100644 --- a/src/test/test-seccomp.c +++ b/src/test/test-seccomp.c @@ -55,6 +55,8 @@ static void test_seccomp_arch_to_string(void) { uint32_t a, b; const char *name; + log_info("/* %s */", __func__); + a = seccomp_arch_native(); assert_se(a > 0); name = seccomp_arch_to_string(a); @@ -66,6 +68,8 @@ static void test_seccomp_arch_to_string(void) { static void test_architecture_table(void) { const char *n, *n2; + log_info("/* %s */", __func__); + NULSTR_FOREACH(n, "native\0" "x86\0" @@ -94,6 +98,8 @@ static void test_architecture_table(void) { } static void test_syscall_filter_set_find(void) { + log_info("/* %s */", __func__); + assert_se(!syscall_filter_set_find(NULL)); assert_se(!syscall_filter_set_find("")); assert_se(!syscall_filter_set_find("quux")); @@ -108,6 +114,8 @@ static void test_filter_sets(void) { unsigned i; int r; + log_info("/* %s */", __func__); + if (!is_seccomp_available()) { log_notice("Seccomp not available, skipping %s", __func__); return; @@ -156,6 +164,8 @@ static void test_restrict_namespace(void) { unsigned long ul; pid_t pid; + log_info("/* %s */", __func__); + assert_se(namespace_flag_to_string(0) == NULL); assert_se(streq(namespace_flag_to_string(CLONE_NEWNS), "mnt")); assert_se(namespace_flag_to_string(CLONE_NEWNS|CLONE_NEWIPC) == NULL); @@ -243,6 +253,8 @@ static void test_restrict_namespace(void) { static void test_protect_sysctl(void) { pid_t pid; + log_info("/* %s */", __func__); + if (!is_seccomp_available()) { log_notice("Seccomp not available, skipping %s", __func__); return; @@ -283,6 +295,8 @@ static void test_protect_sysctl(void) { static void test_restrict_address_families(void) { pid_t pid; + log_info("/* %s */", __func__); + if (!is_seccomp_available()) { log_notice("Seccomp not available, skipping %s", __func__); return; @@ -370,6 +384,8 @@ static void test_restrict_address_families(void) { static void test_restrict_realtime(void) { pid_t pid; + log_info("/* %s */", __func__); + if (!is_seccomp_available()) { log_notice("Seccomp not available, skipping %s", __func__); return; @@ -415,6 +431,8 @@ static void test_restrict_realtime(void) { static void test_memory_deny_write_execute_mmap(void) { pid_t pid; + log_info("/* %s */", __func__); + if (!is_seccomp_available()) { log_notice("Seccomp not available, skipping %s", __func__); return; @@ -463,6 +481,8 @@ static void test_memory_deny_write_execute_shmat(void) { int shmid; pid_t pid; + log_info("/* %s */", __func__); + if (!is_seccomp_available()) { log_notice("Seccomp not available, skipping %s", __func__); return; @@ -513,6 +533,8 @@ static void test_memory_deny_write_execute_shmat(void) { static void test_restrict_archs(void) { pid_t pid; + log_info("/* %s */", __func__); + if (!is_seccomp_available()) { log_notice("Seccomp not available, skipping %s", __func__); return; @@ -551,6 +573,8 @@ static void test_restrict_archs(void) { static void test_load_syscall_filter_set_raw(void) { pid_t pid; + log_info("/* %s */", __func__); + if (!is_seccomp_available()) { log_notice("Seccomp not available, skipping %s", __func__); return; -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor