Repository navigation
net: fix stale validate.sh and portscan output filename - #96
Merged
Merged
Conversation
net/validate.sh was written against an earlier layout of this benchmark and never updated when it landed as net/ in 65b1bc8. It resolved every path under /networking, a directory that does not exist, and checked two scripts, massvulscan and pingsweep, that the benchmark does not contain, while never validating portscan at all. The massvulscan branch additionally reported success on a missing file, since it only greps for failure strings and grep matches nothing in a file that is not there. The net effect was that net reported [fail] unconditionally, on every OS, in Docker or bare. net is not in the CI matrix, so this went unnoticed. Rewrite validate.sh against the three scripts execute.sh actually runs: - portscan: report is non-empty, carries no error markers, and lists ports 4444/5555/6666 as open, which execute.sh holds listeners on. - ping: loopback reports UP, and every input IP is classified UP or DOWN, counted rather than matched per IP to stay linear in the input size. - accept-ips: logic unchanged, path corrected. Also fix execute.sh's chown, which named portscan_output.txt while portscan.sh writes portscan.txt, and add a namespace readiness probe so an environment that cannot enter a netns says why, instead of surfacing a bare exit code 255 and an empty output file.
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.
net/validate.sh was written against an earlier layout of this benchmark and never updated when it landed as net/ in 65b1bc8. It resolved every path under /networking, a directory that does not exist, and checked two scripts, massvulscan and pingsweep, that the benchmark does not contain, while never validating portscan at all. The massvulscan branch additionally reported success on a missing file, since it only greps for failure strings and grep matches nothing in a file that is not there.
The net effect was that net reported [fail] unconditionally, on every OS, in Docker or bare. net is not in the CI matrix, so this went unnoticed.
Rewrite validate.sh against the three scripts execute.sh actually runs:
Also fix execute.sh's chown, which named portscan_output.txt while portscan.sh writes portscan.txt, and add a namespace readiness probe so an environment that cannot enter a netns says why, instead of surfacing a bare exit code 255 and an empty output file.