]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-execute: Skip test_exec_mount_apivfs() when running with sanitizers
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 30 May 2024 08:22:51 +0000 (10:22 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 30 May 2024 10:47:45 +0000 (12:47 +0200)
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.

src/test/test-execute.c

index 191741d97c2296e4f24eef292ec8c9f4ca7d6ee0..daddeb61d08b3dd17392f862cb9b0ff540107f5d 100644 (file)
@@ -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) {