Skip to content

Commit e172e7c

Browse files
committed
Fix protocol_version_mismatch race condition in 3.1.3 golden file
When rsync 3.1.3 outputs protocol mismatch errors, the sender and receiver processes may write concurrently without proper newline separation, resulting in concatenated messages like: "(see the rsync man page for an explanation)protocol version mismatch..." Convert the two separate expected messages into a message_group that accepts: - Individual messages (when output is properly separated) - Concatenated forms (when race condition occurs) This allows the interop validation to pass regardless of which timing behavior occurs during the test.
1 parent 4377686 commit e172e7c

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

tests/interop/messages/golden-3.1.3.toml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,20 @@ text = "rsync error: syntax or usage error (code 1) at main.c(1601) [client]"
1818
role = "client"
1919
scenario = "invalid_option"
2020

21-
[[messages]]
22-
text = "protocol version mismatch -- is your shell clean?"
23-
scenario = "protocol_version_mismatch"
24-
25-
[[messages]]
26-
text = "(see the rsync man page for an explanation)"
21+
# Race-dependent: The protocol mismatch messages may appear separately or concatenated
22+
# due to concurrent output from sender/receiver processes
23+
[[message_groups]]
24+
name = "protocol_mismatch_description"
2725
scenario = "protocol_version_mismatch"
26+
require_at_least = 1
27+
messages = [
28+
# Individual messages when output is properly separated
29+
{ text = "protocol version mismatch -- is your shell clean?" },
30+
{ text = "(see the rsync man page for an explanation)" },
31+
# Concatenated forms when race condition causes no newline between messages
32+
{ text = "(see the rsync man page for an explanation)protocol version mismatch -- is your shell clean?" },
33+
{ text = "protocol version mismatch -- is your shell clean?(see the rsync man page for an explanation)" },
34+
]
2835

2936
# Race-dependent: At least one protocol/IPC error must appear
3037
[[message_groups]]

0 commit comments

Comments
 (0)