summaryrefslogtreecommitdiffstats
path: root/src/test/test-execute.c
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-05-30 10:22:51 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-05-30 12:47:45 +0200
commit4dc76eb770121720db12be1ec83ff13ee4f53dbf (patch)
tree09a693aeaca5b283727872b3971e14df59db3e98 /src/test/test-execute.c
parentTEST-02-UNITTESTS: Pass asan environment to units if it is available (diff)
downloadsystemd-4dc76eb770121720db12be1ec83ff13ee4f53dbf.tar.xz
systemd-4dc76eb770121720db12be1ec83ff13ee4f53dbf.zip
test-execute: Skip test_exec_mount_apivfs() when running with sanitizers
The test fails when running under sanitizers due to missing sanitizer libraries. For now, let's skip the test until we can make the necessary changes to run it under sanitizers.
Diffstat (limited to 'src/test/test-execute.c')
-rw-r--r--src/test/test-execute.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/test-execute.c b/src/test/test-execute.c
index 191741d97c..daddeb61d0 100644
--- a/src/test/test-execute.c
+++ b/src/test/test-execute.c
@@ -615,6 +615,7 @@ static void test_exec_inaccessiblepaths(Manager *m) {
test(m, "exec-inaccessiblepaths-mount-propagation.service", can_unshare ? 0 : MANAGER_IS_SYSTEM(m) ? EXIT_FAILURE : EXIT_NAMESPACE, CLD_EXITED);
}
+#if !HAS_FEATURE_ADDRESS_SANITIZER
static int on_spawn_io(sd_event_source *s, int fd, uint32_t revents, void *userdata) {
char **result = userdata;
char buf[4096];
@@ -754,8 +755,10 @@ static int find_libraries(const char *exec, char ***ret) {
*ret = TAKE_PTR(libraries);
return 0;
}
+#endif
static void test_exec_mount_apivfs(Manager *m) {
+#if !HAS_FEATURE_ADDRESS_SANITIZER
_cleanup_free_ char *fullpath_touch = NULL, *fullpath_test = NULL, *data = NULL;
_cleanup_strv_free_ char **libraries = NULL, **libraries_test = NULL;
int r;
@@ -801,6 +804,7 @@ static void test_exec_mount_apivfs(Manager *m) {
test(m, "exec-mount-apivfs-no.service", can_unshare || !MANAGER_IS_SYSTEM(m) ? 0 : EXIT_NAMESPACE, CLD_EXITED);
(void) rm_rf("/tmp/test-exec-mount-apivfs-no/root", REMOVE_ROOT|REMOVE_PHYSICAL);
+#endif
}
static void test_exec_noexecpaths(Manager *m) {