more test coverage improvements#914
Open
tridge wants to merge 4 commits into
Open
Conversation
The coverage report counted bundled third-party code (zlib/, popt/, and the PostgreSQL/ISC lib/ imports getaddrinfo/getpass/inet_ntop/inet_pton) that rsync ships but does not own, muddying the percentages. Add a COVERAGE_EXCLUDE gcovr filter (shared by all coverage targets) so the report reflects rsync's own code: on the same data, lines 63.9%->65.5%, functions 81.4%->85.0%, branches 55.0%->56.5% (rsync's own md5/mdfour/wildmatch/etc. stay in the report). Add 'make coverage-all': run the suite under pipe + --protocol=30 + --protocol=29 + --use-tcp, accumulating into the shared .gcda (not cleared between runs), then one merged scoped report -- covers the daemon/TCP and protocol-compat paths a single pipe run misses (lines 67.6%, functions 87.6%, branches 58.6%). Also add 'make coverage-fallback' for a separate --disable-openat2 build (different .gcno, so it can't merge with the openat2 report). CI is unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Target the lowest-coverage rsync files identified from a merged (pipe + proto29/30
+ tcp) gcov report:
daemon-access-ip hosts allow / hosts deny with exact-IP and CIDR patterns over
--use-tcp, exercising access.c make_mask/match_address/
match_binary (19% -> 62% lines), plus client --address
(socket.c try_bind_local). require_tcp.
daemon-config the &include rsyncd.conf directive (params.c include_config/
parse_directives, 48% -> 60%) and a module with a missing path
(clientserver.c path_failure).
stop-time --stop-at future/past (options.c parse_time) and --stop-after
(options.c 59% -> 64%).
Merged scoped coverage: lines 67.3%->68.3%, functions 87.5%->88.4%.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…on-access-ip The --expect-skipped check compared the skip list as an ordered string, so the per-platform RSYNC_EXPECT_SKIPPED lists had to match runtests' collection order (sorted filenames) exactly -- a subtle, easy-to-break ordering dependency. Compare the skipped SET instead; which tests skipped is what matters. Register the new require_tcp test daemon-access-ip in the per-platform expected-skipped lists (it skips in the pipe-transport make check, like daemon-chroot-acl and proxy-response-line-too-long). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…elete.c)
Target previously-uncovered functions in the path/file-operation files the
resolver restructure touches, confirmed hit under coverage:
preallocate --preallocate (syscall.c do_fallocate) and sparse hole-punching
via --preallocate --sparse and --inplace --sparse (do_punch_hole),
on a file several levels deep.
fuzzy-basis --fuzzy basis selection with similar-named candidates and no
exact match, so the generator scores them (util1.c fuzzy_distance).
delete-deep add a --backup --delete case so removing an extraneous
backup-suffixed file consults delete.c is_backup_file.
All three are plain local transfers (no skips), green on master and under
--protocol=29/30.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
and ignore upstream libs