Page MenuHomeFreeBSD

Enable NetBSD kqueue tests.
ClosedPublic

Authored by ngie on May 2 2016, 1:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 31, 8:13 AM
Unknown Object (File)
Thu, May 30, 8:11 AM
Unknown Object (File)
May 22 2024, 3:44 PM
Unknown Object (File)
May 20 2024, 8:24 PM
Unknown Object (File)
May 7 2024, 10:46 AM
Unknown Object (File)
May 7 2024, 8:33 AM
Unknown Object (File)
May 1 2024, 9:36 AM
Unknown Object (File)
Mar 30 2024, 1:51 AM
Subscribers

Details

Summary

Enable NetBSD kqueue tests, except proc2, which fails (I did not looked why). Import t_vnode test, which is the cause of the change.

Test Plan

I did not managed to undestand how to regenerate Kyuafile for libc from buildenv, and I cannot afford waiting for two clang builds during buildworld for this change. A hint how to call make from lib/libc to have updated Kyuafile is appreciated.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib retitled this revision from to Enable NetBSD kqueue tests..
kib updated this object.
kib edited the test plan for this revision. (Show Details)
kib added reviewers: ngie, emaste.
kib set the repository for this revision to rS FreeBSD src repository - subversion.
kib added a subscriber: tests.

I looked at proc2, it must fail on FreeBSD. We do allow superuser to trace setuid processes, while test checks that attach to setuid("nobody") child fails.

contrib/netbsd-tests/kernel/kqueue/t_proc2.c
39 ↗(On Diff #15812)

Please revert this style change -- this is contrib code.

contrib/netbsd-tests/kernel/kqueue/t_sig.c
63 ↗(On Diff #15812)

This should be spelled like:

#ifdef __NetBSD__
67 ↗(On Diff #15812)

This should be spelled like:

#ifdef __NetBSD__
91 ↗(On Diff #15812)

This should be spelled like:

#ifdef __NetBSD__
102 ↗(On Diff #15812)

This should be spelled like:

#ifdef __NetBSD__
contrib/netbsd-tests/kernel/kqueue/t_vnode.c
1 ↗(On Diff #15812)
  1. The licensing tort is missing.
  2. Is this a FreeBSD test? If so, it should go under lib/libc/tests/kqueue .
  3. The filename should be "vnode_test.c", something similar, and the test name should be "vnode_test".
33–34 ↗(On Diff #15812)

Could these functions be marked static to avoid having to declare them above?

36 ↗(On Diff #15812)

style(9): blank line required in function if there aren't any variable declarations.

37 ↗(On Diff #15812)

Parentheses missing around return values here and elsewhere.

lib/libc/tests/kqueue/Makefile
1 ↗(On Diff #15812)

Why are you proposing that this be put under lib/libc/tests/kqueue instead of tests/sys/kqueue ?

5–7 ↗(On Diff #15812)

All of this is unnecessary after r299094 -- plus I'd prefer that none of the packaging stuff be MFCed to ^/stable/10.

9–10 ↗(On Diff #15812)

Not necessary; no FILES/PROGS are specified here.

11–15 ↗(On Diff #15812)

Please suffix with _test, e.g. proc1_test, to match the general scheme of how the other tests are named.

kib marked 7 inline comments as done.May 17 2016, 9:16 AM
kib added inline comments.
contrib/netbsd-tests/kernel/kqueue/t_proc2.c
39 ↗(On Diff #15812)

This is not a style change. Our sys/event.h requires sys/types.h.

contrib/netbsd-tests/kernel/kqueue/t_vnode.c
1 ↗(On Diff #15812)

The file is not a FreeBSD test. It was taken literally from the http://cvsweb.netbsd.org/bsdweb.cgi/src/tests/kernel/kqueue/t_vnode.c . I did not vendor gymnastic because I do not understand it, and because updates to contrib-netbsd seems to be done that way. Feel free to vendor-import the file before or after my commit.

33–34 ↗(On Diff #15812)

These comments are irrelvant because file is taken from NetBSD, I will not repeat that, just mark the comments done.

lib/libc/tests/kqueue/Makefile
1 ↗(On Diff #15812)

What is the scope of 'this' in your question ? I do not see how to integrate contrib tests and existing test, anyway.

5–7 ↗(On Diff #15812)

I do not understand the MFC comment at all, I did not proposed or discussing the stable/10 commit.

Then say what magic shall be used instead. BTW, making the tests build was huge pain with regard to the make glue, and I did not found how to rebuild Kyafile with lib/libc make invocation from buildenv at all.

11–15 ↗(On Diff #15812)

See above.

kib marked an inline comment as done.

Use #ifdef NetBSD to mark local changes.

Unless some further feedback is provided, I am going to commit this in, say, 3-5 days.

ping - did this get committed?

ping - did this get committed?

kib asked that I commandeer the revision.

ngie edited reviewers, added: kib; removed: ngie.
This revision was automatically updated to reflect the committed changes.