test: cover absent-parent no-op and --dirs scanner skip
CI / lint (pull_request) Successful in 38s
CI / sanitizers (undefined) (pull_request) Successful in 51s
CI / sanitizers (address) (pull_request) Successful in 51s
CI / fuzz-build (pull_request) Successful in 19s
CI / coverage (pull_request) Successful in 43s
CI / valgrind (pull_request) Successful in 37s
CI / build-and-test (pull_request) Successful in 14m55s
CI / lint (pull_request) Successful in 38s
CI / sanitizers (undefined) (pull_request) Successful in 51s
CI / sanitizers (address) (pull_request) Successful in 51s
CI / fuzz-build (pull_request) Successful in 19s
CI / coverage (pull_request) Successful in 43s
CI / valgrind (pull_request) Successful in 37s
CI / build-and-test (pull_request) Successful in 14m55s
Unit: manifest_delete_missing_args treats a deeper missing entry whose destination parent directory does not exist as a no-op (run continues, nothing created). Integration (TestMissingArgs): a deeper missing entry with an absent parent -R bare and full-mirror layouts, single-threaded and -m, no longer aborts --delete (the extras walk still removes an unrelated extra); --dirs + --files-from with --ignore-missing-args skips a listed-but-missing entry and transfers the rest.
This commit is contained in:
@@ -638,6 +638,9 @@ static void test_manifest_delete_missing_args() {
|
||||
EXPECT_TRUE(array_list_add(manifest->missing, str_dup("empty_dir")));
|
||||
EXPECT_TRUE(array_list_add(manifest->missing, str_dup("full_dir")));
|
||||
EXPECT_TRUE(array_list_add(manifest->missing, str_dup("never_here.txt")));
|
||||
/* A deeper entry whose destination parent directory does not exist is a
|
||||
no-op (nothing to delete), never a failure. */
|
||||
EXPECT_TRUE(array_list_add(manifest->missing, str_dup("no_parent_here/gone.txt")));
|
||||
|
||||
/* Without --delete/--force the non-empty directory survives (rsync parity). */
|
||||
EXPECT_TRUE(manifest_delete_missing_args(cfg, manifest));
|
||||
@@ -655,6 +658,8 @@ static void test_manifest_delete_missing_args() {
|
||||
EXPECT_TRUE(array_list_add(manifest->missing, str_dup("full_dir")));
|
||||
EXPECT_TRUE(manifest_delete_missing_args(cfg, manifest));
|
||||
EXPECT_EQ_INT(access(full_dir, F_OK), -1);
|
||||
snprintf(path, sizeof(path), "%s/no_parent_here", root);
|
||||
EXPECT_EQ_INT(access(path, F_OK), -1);
|
||||
|
||||
delete_manifest_free(manifest);
|
||||
config_delete(cfg);
|
||||
|
||||
Reference in New Issue
Block a user