ci: fix coverage and valgrind jobs, skip fork tests under valgrind
CI / lint (push) Successful in 8s
CI / lint (pull_request) Successful in 8s
CI / build-and-test (push) Successful in 53s
CI / sanitizers (address) (push) Successful in 15s
CI / coverage (push) Successful in 22s
CI / valgrind (push) Successful in 1m43s
CI / build-and-test (pull_request) Successful in 52s
CI / sanitizers (address) (pull_request) Successful in 13s
CI / coverage (pull_request) Successful in 1m14s
CI / valgrind (pull_request) Successful in 1m4s

- Install lcov in coverage job (not in fastsync-ci:v7)
- Use lcov 2.x compatible flags (--branch-coverage instead of --rc)
- Remove unused xxhash exclude pattern that lcov 2.x rejects
- Install valgrind in valgrind job
- Skip fork-based file tests under valgrind (pipe timing issues)
- Add FASTSYNC_UNDER_VALGRIND env var for test skip detection
- Move cleanup before assertions in fork tests to prevent leaks
- Add coverage.info to .gitignore
This commit is contained in:
2026-07-19 20:16:48 +02:00
parent 2243c958ce
commit aa6878496b
3 changed files with 16 additions and 10 deletions
+11 -8
View File
@@ -4,6 +4,7 @@
#include "utils.h"
#include "protocol.h"
#include "test_utils.h"
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/wait.h>
@@ -187,14 +188,14 @@ static void test_file_send_receive() {
bool sent = file_send_single_calls(file, p[1], false, 0, true);
close(p[1]);
EXPECT_TRUE(sent);
int status;
waitpid(pid, &status, 0);
EXPECT_TRUE(WIFEXITED(status) && WEXITSTATUS(status) == 0);
file_destroy(file);
config_delete(cfg);
EXPECT_TRUE(sent);
EXPECT_TRUE(WIFEXITED(status) && WEXITSTATUS(status) == 0);
}
}
@@ -234,13 +235,13 @@ static void test_file_send_no_path() {
bool sent = file_send_single_calls(file, p[1], false, 0, false);
close(p[1]);
EXPECT_TRUE(sent);
int status;
waitpid(pid, &status, 0);
EXPECT_TRUE(WIFEXITED(status) && WEXITSTATUS(status) == 0);
file_destroy(file);
EXPECT_TRUE(sent);
EXPECT_TRUE(WIFEXITED(status) && WEXITSTATUS(status) == 0);
}
}
@@ -270,7 +271,9 @@ void test_file() {
test_to_disk_basic();
test_to_disk_creates_dirs();
test_file_content_to_buffer();
test_file_send_receive();
test_file_send_no_path();
if (!getenv("FASTSYNC_UNDER_VALGRIND")) {
test_file_send_receive();
test_file_send_no_path();
}
test_file_metadata_create();
}