diff --git a/.github/workflows/unit_tests.sh b/.github/workflows/unit_tests.sh index 3859433720..4914165b75 100755 --- a/.github/workflows/unit_tests.sh +++ b/.github/workflows/unit_tests.sh @@ -159,7 +159,7 @@ for phase in "${PHASES[@]}"; do # unexpected fails due to incompatibilities with older systemd $DOCKER_EXEC ninja -C build install docker restart $CONT_NAME - $DOCKER_EXEC ninja -C build test + docker exec --interactive=false -t $CONT_NAME meson test -C ./build/ --print-errorlogs ;; RUN_ASAN|RUN_GCC_ASAN|RUN_CLANG_ASAN) if [[ "$phase" = "RUN_CLANG_ASAN" ]]; then diff --git a/src/test/test-fs-util.c b/src/test/test-fs-util.c index aa32629f62..d9da1bad32 100644 --- a/src/test/test-fs-util.c +++ b/src/test/test-fs-util.c @@ -15,6 +15,7 @@ #include "stdio-util.h" #include "string-util.h" #include "strv.h" +#include "tests.h" #include "user-util.h" #include "util.h" #include "virt.h" @@ -544,15 +545,18 @@ static void test_touch_file(void) { assert_se(timespec_load(&st.st_mtim) == test_mtime); } - a = strjoina(p, "/lnk"); - assert_se(symlink("target", a) >= 0); - assert_se(touch_file(a, false, test_mtime, test_uid, test_gid, 0640) >= 0); - assert_se(lstat(a, &st) >= 0); - assert_se(st.st_uid == test_uid); - assert_se(st.st_gid == test_gid); - assert_se(S_ISLNK(st.st_mode)); - assert_se((st.st_mode & 0777) == 0640); - assert_se(timespec_load(&st.st_mtim) == test_mtime); + log_warning("%s: ci_environment()=%s", __func__, ci_environment()); + if (streq_ptr(ci_environment(), "github-actions")) { + a = strjoina(p, "/lnk"); + assert_se(symlink("target", a) >= 0); + assert_se(touch_file(a, false, test_mtime, test_uid, test_gid, 0640) >= 0); + assert_se(lstat(a, &st) >= 0); + assert_se(st.st_uid == test_uid); + assert_se(st.st_gid == test_gid); + assert_se(S_ISLNK(st.st_mode)); + assert_se((st.st_mode & 0777) == 0640); + assert_se(timespec_load(&st.st_mtim) == test_mtime); + } } static void test_unlinkat_deallocate(void) {