Repository navigation
test: trim the suite - #74
Merged
Merged
Conversation
Each removed check repeats a contract another test already runs, or it pins a string that is not a program contract. `tests/test_output_stability.sh` keeps the kept-log compare. `tests/differential.sh` drops the report compares that only ask `COMPAT.md` to name the command. It also drops the matching unit tests. The suite loses 76 tests: 22 Zig `test` blocks and 54 shell checks.
The six `why` failure rows become one table. The wrap pair becomes one table. The output-style cases share a single check. The tmpdir cases share one check. The nine schema commands share one table. The glob rows join the `parsePolicy` test. The three zone rows join the `glibc` rule table. The `-h` check uses the same command-line reference as `--help`. 36 checks become 5 tables. 3 rows join tests that already existed. The suite loses 31 tests.
`EB_KEEP_LOGS_SYSLOG_CAPTURE` stores the framed write that `--syslog` would send. The test opens no Transmission Control Protocol socket and no User Datagram Protocol socket. The octet count is `N` plus the payload. The User Datagram Protocol buffer is that payload as one datagram. The local-socket datagram tests still check the `RFC 5424` text. The same one test reads a buffer instead of `127.0.0.1`.
Rotation races use short logs. One locked round runs. Two rounds meet at a gzip barrier while the lock is off. The test releases the lock, and the waiting rotate runs. The test checks `gunzip` on two windows of input. The test drains a silent syslog socket once after `wait`, and the read returns without waiting. The five checks keep the same assertions and drop the long inputs.
The mid-compress compare kills the shell side when its gzip input closes. `EB_KEEP_LOGS_TEST_KILL_AT=mid-copy` kills the Zig side in the test-ops binary. The test freezes `EB_KEEP_LOGS_CLOCK` while the rotate waits for the lock. The test then jumps the timestamp. A monotonic clock measures `--lock-timeout`, with a 50 millisecond early allowance. The `flock` waiter records `EINTR` on a pipe before the helper releases the lock. The four checks avoid a sleep used as a wait. The timeouts stay the same.
The shell emitter writes that capture file. The Zig emitter writes the file the same way. The binary reads the clock file from `/proc/self/environ`. The binary links no `libc`.
The two captures carry different timestamps. The length equals the octet count. The pattern matches the payload. The datagram matches the pattern. The datagram has no length prefix.
Two rotates with the lock off meet in the gzip stand-in before either compresses. The stand-in opened `go` as a fifo. That open blocks until the other end is open. Both gzip processes stayed there, and `wait` never returned. The second rotate writes a regular file. The first polls for that file, then both run the real gzip.
HaoZeke
added a commit
that referenced
this pull request
Nov 26, 2026
The develop merge brought back `--help` checks, `failed` and `rotate` stability checks with their goldens, and nine case goldens that #74 removed. Drop them again.
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.
Commits:
The two captures carry different timestamps. The length
equals the octet count. The pattern matches the payload.
The datagram matches the pattern. The datagram has no
length prefix.