Files
FastSync/tests/runner.c
T
TapTap 84827ca617 feat(output): rsync 3.4.1 selection and output parity (#291, #292)
#291:
- Compile --exclude/--include/--exclude-from/--include-from into the SAME
  ordered rule list as --filter/-f (first match wins), so the common
  `--include='*.txt' --exclude='*'` idiom and include-alone semantics match
  rsync. The legacy per-kind scanner arrays are no longer applied.
- -x/--one-file-system emits the cross-device mount-point directory entry
  (empty) instead of dropping it, in both the sequential and parallel scanners.
- Stop passing the legacy arrays to the scanner; document -f is --filter.

#292:
- New src/shared/format.c/.h: rsync "big_num" (comma-grouped integers) and
  decimal -h human sizes, %M/%t timestamp, and the STATUS_DEST_INFO codec.
- Receiver answers each STATUS_CHECK with a pre-transfer destination snapshot
  (new report_dest_info wire field + STATUS_DEST_INFO, PROTOCOL_VERSION
  2.23.0) so the sender can render true itemize columns.
- Itemize now emits rsync-correct update/type chars and c/s/t/p/o/g columns
  for files, dirs, symlinks and hard links, comparing size/time/perms/owner/
  group against the reported destination.
- --out-format gains %i %n %f %l %b %M %t %o %p %B %U %G %L; %f is the
  relative display path, %M the YYYY/MM/DD-HH:MM:SS form, %b the literal
  bytes sent.
- --list-only prints transfer-relative names, directory entries and ls-style
  grouped sizes.
- --stats prints rsync's multi-line block on stdout; -h uses decimal units.

Tests: unit tests for the filter ordering, format primitives, itemize
columns; integration + differential tests against real rsync 3.4.1 for
itemize/out-format/list-only/selection and -x. Golden wire len/hash and
protocol version strings updated for 2.23.0.
2026-09-15 21:57:39 +02:00

110 lines
2.9 KiB
C

#include "test_array_list.h"
#include "test_batch.h"
#include "test_chunk.h"
#include "test_change_list.h"
#include "test_checksum.h"
#include "test_client_cli.h"
#include "test_compression.h"
#include "test_config.h"
#include "test_credentials.h"
#include "test_data.h"
#include "test_daemon_conf.h"
#include "test_daemon_limits.h"
#include "test_delay_updates.h"
#include "test_delta.h"
#include "test_file.h"
#include "test_file_list.h"
#include "test_file_sendfile.h"
#include "test_format.h"
#include "test_fuzz_smoke.h"
#include "test_glob.h"
#include "test_hardlink.h"
#include "test_iconv.h"
#include "test_log.h"
#include "test_metadata.h"
#include "test_motd.h"
#include "test_multiprocessing.h"
#include "test_property.h"
#include "test_protocol.h"
#include "test_protocol_error.h"
#include "test_queue.h"
#include "test_receiver_timeout.h"
#include "test_robustness.h"
#include "test_scanner.h"
#include "test_server.h"
#include "test_server_cli.h"
#include "test_shared_utils.h"
#include "test_stress.h"
#include "test_stop.h"
#include "test_transport_tcp.h"
#include "test_transport_ssh.h"
#include "test_transport_tls.h"
#include "test_utils.h"
#include "test_xattr.h"
#include <stdio.h>
#include <signal.h>
// Define global test state variables
int tests_run = 0;
int tests_failed = 0;
bool current_test_failed = false;
int main() {
signal(SIGPIPE, SIG_IGN);
printf("\033[1;36m=== RUNNING UNIT TESTS ===\033[0m\n\n");
RUN_TEST(test_queue);
RUN_TEST(test_array_list);
RUN_TEST(test_shared_utils);
RUN_TEST(test_chunk);
RUN_TEST(test_batch);
RUN_TEST(test_change_list);
RUN_TEST(test_format);
RUN_TEST(test_config);
RUN_TEST(test_credentials);
RUN_TEST(test_compression);
RUN_TEST(test_scanner);
RUN_TEST(test_checksum);
RUN_TEST(test_delta);
RUN_TEST(test_data);
RUN_TEST(test_protocol);
RUN_TEST(test_protocol_error);
RUN_TEST(test_receiver_timeout);
RUN_TEST(test_metadata);
RUN_TEST(test_glob);
RUN_TEST(test_iconv);
RUN_TEST(test_file);
RUN_TEST(test_file_list);
RUN_TEST(test_trust_sender);
RUN_TEST(test_delay_updates);
RUN_TEST(test_file_sendfile);
RUN_TEST(test_multiprocessing);
RUN_TEST(test_log);
RUN_TEST(test_robustness);
RUN_TEST(test_stress);
RUN_TEST(test_stop);
RUN_TEST(test_property);
RUN_TEST(test_transport_tcp);
RUN_TEST(test_transport_ssh);
RUN_TEST(test_transport_tls);
RUN_TEST(test_client_cli);
RUN_TEST(test_server);
RUN_TEST(test_daemon_conf);
RUN_TEST(test_daemon_limits);
RUN_TEST(test_motd);
RUN_TEST(test_server_cli);
RUN_TEST(test_fuzz_smoke);
RUN_TEST(test_xattr);
RUN_TEST(test_hardlink);
printf("\n\033[1;36m=== TEST SUMMARY ===\033[0m\n");
printf("Total Tests Run: %d\n", tests_run);
if (tests_failed > 0) {
printf("Status: \033[1;31m%d FAILED\033[0m\n", tests_failed);
return 1;
} else {
printf("Status: \033[1;32mALL PASSED\033[0m\n");
return 0;
}
}