src/shared/file.c is one of the most critical files (373 lines) but only 21% covered. Key untested functions:
src/shared/file.c
old_data_from_path()
receive_delta_file()
receive_incremental_check()
file_send_sendfile()
file_receive()
receive_manifest()
to_disk()
file_save_to_disk()
These are the core I/O functions for the sync operation. Bugs here cause data corruption.
Labels: testing, coverage, data-integrity
No dependencies set.
The note is not visible to the blocked user.
src/shared/file.cis one of the most critical files (373 lines) but only 21% covered. Key untested functions:old_data_from_path()receive_delta_file()receive_incremental_check()file_send_sendfile()file_receive()receive_manifest()to_disk()file_save_to_disk()These are the core I/O functions for the sync operation. Bugs here cause data corruption.
Suggested tests
old_data_from_path()— test with existing file, missing file, empty file, large filereceive_delta_file()— test with valid delta, empty delta, corner case deltasreceive_incremental_check()— test with matching file, different mtime, different size, missing targetfile_send_sendfile()— test with regular file, pipe, zero-length filefile_receive()— full receive cycle with various file typesreceive_manifest()— test manifest processing for deleteto_disk()— test directory creation, partial paths, edge casesfile_save_to_disk()— test overwrite, temp file, path traversal blockingLabels: testing, coverage, data-integrity