Skip to content
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

socket test script #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zevv
Copy link
Contributor

@zevv zevv commented Apr 16, 2013

No description provided.

gvvaughan added a commit that referenced this pull request Jun 27, 2013
* specs/posix_spec.yaml (socket handling): New spec, not working
on Mountain Lion, at least :(
Awaiting feedback, see issue #92.
Reported by zevv@github, from a patch by Ico Doornekamp.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
@zevv
Copy link
Contributor Author

zevv commented Jun 27, 2013

I'd have to look into the details, but my guess is that this stuff is hard to test as a standalone unit. To be able to test IPv6 the host should have IPv6 connectivity configured and enabled, and should allow the tests to bind ports and connect to the outside world. Not sure if this is something which can be properly tested with something like Travis...

@gvvaughan
Copy link
Contributor

Thanks for the swift response! :)

I think its more to do with whether the luaposix socket calls provide everything needed to check whether the functionality required is available before trying to run an unsupported test. This is surely possible with C, so if it can't (yet) be done with luaposix from the Lua side, then I see no technical reason why it can't be fixed by exposing the APIs that C would use to make the pre-test checks.

Plainly, Mac OS has perfectly functional sockets, and most Linux software compiles on the Mac with very little patching (ref. Homebrew). If I need to add a skip function to Specl for gracefully exiting tests that are discovered to be incompatible in the pre-test phase, it would be quite a quick feature to implement.

I sometimes hear the term: a simple matter of programming ;-)

@gvvaughan gvvaughan mentioned this pull request May 21, 2014
@gvvaughan
Copy link
Contributor

Actually, an explicit skip function is not required in recent Specl, because it only reports on examples that fire expect commands. Conditionally running an example is as simple as this:

- describe ipv6 only functionality:
    if posix.IPPROTO_IPV6 then
      expect (ipv6 stuff).to_contain (ipv6 only results)
    end

And reporting will automatically elide that test case if the expect is not reached.

@gvvaughan gvvaughan self-assigned this Oct 7, 2014
@rrthomas
Copy link
Contributor

The test for this issue started passing unexpectedly for me, since I merged today's commits.

@gvvaughan
Copy link
Contributor

It passes unexpectedly for me on my dev machines, but fails on Travis (Ubuntu Precise?) last I checked.

@rrthomas
Copy link
Contributor

See https://travis-ci.org/luaposix/luaposix/jobs/51387861 : one appears to be passing, but not the other (unless I am misreading the log).

@gvvaughan gvvaughan force-pushed the master branch 4 times, most recently from 1c3cf95 to 5d5e06e Compare July 6, 2020 16:48
@gvvaughan gvvaughan force-pushed the master branch 13 times, most recently from ccdf35d to b424672 Compare January 12, 2023 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants