diff --git a/README.md b/README.md index f274aa9..b1ffa1f 100644 --- a/README.md +++ b/README.md @@ -43,9 +43,11 @@ The file is deliberately awkward to add to. A divergence with no reason on it do Run `suite/sweep.sh` and it runs every file on its own, with its own server and its own time limit, and prints what each one did. This is the state on 2026-08-29, against yo at the head of main and the Redis 8.10.1 tests, on a Linux box. -Two files pass end to end and are in `suite/passing.txt`: `unit/networking` at 1 of 1 and `unit/quit` at 3 of 3. +Three files pass end to end and are in `suite/passing.txt`: `unit/networking` at 1 of 1, `unit/quit` at 3 of 3 and `unit/info-command` at 3 of 3. -Eight more run real tests and then stop at a command we have not written yet. `unit/protocol` is 14 passed and 3 failed and ends at `DEBUG PROTOCOL`, where the three failures are `SADD` and `SRANDMEMBER`. `unit/type/incr` is 11 and ends at `RPUSH`. `unit/type/increx` is 11 and ends at `OBJECT ENCODING`. `unit/keyspace` is 3 and ends at `KEYS`. `unit/type/string` is 2 and ends at `proto-max-bulk-len`. `unit/introspection` is 1 and ends at `CLIENT`. `unit/info-command` runs to the end with 3 failures, which are `rejected_calls` and `master_repl_offset`. The rest end on the first command from a milestone that has not started. +`unit/info-command` is the newest of the three and it went green on 2026-09-01. It was running to the end with 3 failures, which were `rejected_calls` and `master_repl_offset`, and both of those are now answered: `INFO commandstats` reports how many times each command was called, refused and failed, and the replication section reports the offset. What it does not report is `usec` and `usec_per_call`, because timing a command means two clock reads around a call that takes tens of nanoseconds, and the suite does not ask for either one. + +Seven more run real tests and then stop at a command we have not written yet. `unit/protocol` is 14 passed and 3 failed and ends at `DEBUG PROTOCOL`, where the three failures are `SADD` and `SRANDMEMBER`. `unit/type/incr` is 11 and ends at `RPUSH`. `unit/type/increx` is 11 and ends at `OBJECT ENCODING`. `unit/keyspace` is 3 and ends at `KEYS`. `unit/type/string` is 2 and ends at `proto-max-bulk-len`. `unit/introspection` is 1 and ends at `CLIENT`. The rest end on the first command from a milestone that has not started. Eighteen files run to the end having skipped every test in them. In external mode the suite marks a test that needs a server it started itself as `[ignore]`, so the file says nothing about us either way. The sweep calls that "nothing ran" rather than "clean", and those files are not in `passing.txt`. diff --git a/suite/passing.txt b/suite/passing.txt index 18ae5d7..b300870 100644 --- a/suite/passing.txt +++ b/suite/passing.txt @@ -16,7 +16,9 @@ # # unit/networking runs one test in external mode and passes it. unit/quit runs # three and passes all three, including the pipelined commands after QUIT case -# that found a real bug. +# that found a real bug. unit/info-command runs three and passes all three, and +# it is the file that made us write INFO commandstats. unit/networking unit/quit +unit/info-command diff --git a/suite/runtest.sh b/suite/runtest.sh index 6cdbb55..3a03b8a 100755 --- a/suite/runtest.sh +++ b/suite/runtest.sh @@ -47,10 +47,12 @@ fi server=$! trap 'kill $server 2>/dev/null || true' EXIT -# Wait for it rather than sleeping a guess. +# Wait for it rather than sleeping a guess. The flag is -w and not -q because +# -q is GNU netcat only and the netcat on a Mac does not have it, and -w is the +# one both of them read as give up after this many seconds. i=0 while [ $i -lt 100 ]; do - if printf 'PING\r\n' | timeout 1 nc -q1 127.0.0.1 "$PORT" 2>/dev/null | grep -q PONG; then + if printf 'PING\r\n' | nc -w1 127.0.0.1 "$PORT" 2>/dev/null | grep -q PONG; then break fi i=$((i + 1))