-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: Improve hitch_hosts(), add configure checks #234
Conversation
This fixes hitch_hosts() on OpenBSD where fstat(1) or netstat(1) from base are used in such cases.
With this pull request, we now have 3 inconsistent uses of The code looks good to me, in the mean time I'll try to test it on OpenBSD to get familiar-enough with Thanks! |
I omitted unifying hunks in my diff since I couldn't test them on other platforms. Maybe I can do so later on and amend here. |
Simplify lsof usage, fix sockstat usage to look for Hitch's PID instead of processes named "tcp". Unify filtering across all tools with a single awk script, this makes the code more readable and easier to adapt in case of changes. Limiting fstat to IPv4 avoids printing two lines in case hitch listens on both address families. The filters only (without running the entire test suite) have been tested on Debian and OpenBSD.
Just added the configure bits and made the filters consistent across different tools. Please run the test suite with this on your machines if you can, I will do so tomorrow on CentOS and OpenBSD. |
Doesn't work for me, tests fail.
OpenBSD doesn't seem to have
I started from this pull request's branch, rebased against master, produced a clean |
Well, what does test-suite.log say? You're most likely running into unrelated issues here. My test results look good so far, nothing changes/breaks. |
The original patch set from Klemens Nanni <[email protected]> added support for fstat and while reviewing it we soon realized that the Linux port for sockstat threw away any possible attempt at portability. As it turns out FreeBSD also supports fstat and is portable enough to satisfy our testing needs for both OpenBSD and FreeBSD. Refs #234
Not available on OpenBSD, only in POSIX... Commands relying on the paths formerly checked will certainly choke on invalid paths. Refs #234
FreeBSD's fstat doesn't print listen addresses in the NAME column. Refs #234
Today I tried to support
This off-by-144 is a mystery, so that's now settled: The project looks dead by the way:
Unless it's only me that can't reach http://nenolod.net/ at all. Now the reason why this ticket is still open is because one test is failing on OpenBSD, the one test making use of the |
The |
This fixes
hitch_hosts()
on OpenBSD where fstat(1) or netstat(1) frombase are used in such cases.
Follow up to #209.