diff options
-rw-r--r-- | src/mscp.c | 6 | ||||
-rw-r--r-- | test/test_e2e.py | 5 |
2 files changed, 7 insertions, 4 deletions
@@ -427,16 +427,14 @@ void *mscp_scan_thread(void *arg) list_splice_tail(&tmp, m->path_list.prev); } - chunk_pool_set_filled(&m->cp); - mpr_info(m->msg_fp, "walk source path(s) done\n"); - + chunk_pool_set_filled(&m->cp); m->ret_scan = 0; return NULL; err_out: + chunk_pool_set_filled(&m->cp); m->ret_scan = -1; - mscp_stop_copy_thread(m); return NULL; } diff --git a/test/test_e2e.py b/test/test_e2e.py index 9c98247..31d9b44 100644 --- a/test/test_e2e.py +++ b/test/test_e2e.py @@ -61,6 +61,11 @@ def test_single_copy(mscp, src_prefix, dst_prefix, src, dst): src.cleanup() dst.cleanup() +@pytest.mark.parametrize("src_prefix, dst_prefix", param_remote_prefix) +def test_failed_to_copy_nonexistent_file(mscp, src_prefix, dst_prefix): + src = "nonexistent_src" + dst = "nonexistent_dst" + run2ng([mscp, "-H", src_prefix + src, dst_prefix + dst]) param_double_copy = [ (File("src1", size = 1024 * 1024), File("src2", size = 1024 * 1024), |