test: fix merged parity branches (4-section manifest fixtures, timeout-teardown)
This commit is contained in:
+1
-1
@@ -2693,7 +2693,7 @@ static void golden_config_populate(Config* c) {
|
||||
* one report_dest_info bool, and other wire changes landing in this version);
|
||||
* the byte-exact values are recomputed for the merged layout. */
|
||||
#define GOLDEN_WIRE_LEN 697
|
||||
#define GOLDEN_WIRE_HASH 0ULL
|
||||
#define GOLDEN_WIRE_HASH 7835017034643051109ULL
|
||||
|
||||
static unsigned long long fnv1a_64(const unsigned char* buf, size_t len) {
|
||||
unsigned long long h = 1469598103934665603ULL;
|
||||
|
||||
@@ -582,6 +582,7 @@ static void test_late_manifest_abort_frees_keepset() {
|
||||
EXPECT_TRUE(send_str(p[1], "keep.txt"));
|
||||
EXPECT_TRUE(send_int(p[1], 0)); /* protected-prefix section is empty */
|
||||
EXPECT_TRUE(send_int(p[1], 0)); /* missing-args section is empty */
|
||||
EXPECT_TRUE(send_int(p[1], 0)); /* synchronized-directories section is empty */
|
||||
EXPECT_TRUE(send_status(p[1], STATUS_ABORT));
|
||||
|
||||
DeleteManifest* pending = NULL;
|
||||
@@ -606,6 +607,7 @@ static void test_late_manifest_eof_frees_keepset() {
|
||||
EXPECT_TRUE(send_str(p[1], "keep.txt"));
|
||||
EXPECT_TRUE(send_int(p[1], 0)); /* protected-prefix section is empty */
|
||||
EXPECT_TRUE(send_int(p[1], 0)); /* missing-args section is empty */
|
||||
EXPECT_TRUE(send_int(p[1], 0)); /* synchronized-directories section is empty */
|
||||
shutdown(p[1], SHUT_WR);
|
||||
|
||||
DeleteManifest* pending = NULL;
|
||||
@@ -630,11 +632,13 @@ static void test_late_second_manifest_frees_both() {
|
||||
EXPECT_TRUE(send_str(p[1], "first.txt"));
|
||||
EXPECT_TRUE(send_int(p[1], 0)); /* protected-prefix section is empty */
|
||||
EXPECT_TRUE(send_int(p[1], 0)); /* missing-args section is empty */
|
||||
EXPECT_TRUE(send_int(p[1], 0)); /* synchronized-directories section is empty */
|
||||
EXPECT_TRUE(send_status(p[1], STATUS_MANIFEST));
|
||||
EXPECT_TRUE(send_int(p[1], 1));
|
||||
EXPECT_TRUE(send_str(p[1], "second.txt"));
|
||||
EXPECT_TRUE(send_int(p[1], 0)); /* protected-prefix section is empty */
|
||||
EXPECT_TRUE(send_int(p[1], 0)); /* missing-args section is empty */
|
||||
EXPECT_TRUE(send_int(p[1], 0)); /* synchronized-directories section is empty */
|
||||
|
||||
DeleteManifest* pending = NULL;
|
||||
EXPECT_EQ_INT(run_pending_receiver(cfg, p[0], &pending), -1);
|
||||
|
||||
@@ -156,6 +156,9 @@ static void test_tcp_set_timeouts() {
|
||||
tcp_set_timeouts(-1, -1);
|
||||
EXPECT_EQ_INT(tcp_get_timeout_sec(), 0);
|
||||
EXPECT_EQ_INT(tcp_get_contimeout_sec(), 0);
|
||||
/* Restore finite defaults so later tests that rely on a bounded connect/IO
|
||||
* timeout (e.g. connecting to a non-routable address) cannot block forever. */
|
||||
tcp_set_timeouts(30, 10);
|
||||
}
|
||||
|
||||
/* Test client_connect with an invalid host (should fail gracefully) */
|
||||
|
||||
Reference in New Issue
Block a user