Page MenuHomeFreeBSD

Port unix_passfd tests to ATF
ClosedPublic

Authored by ngie on Aug 26 2014, 7:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 22 2024, 9:21 PM
Unknown Object (File)
Feb 17 2024, 3:18 PM
Unknown Object (File)
Jan 28 2024, 7:44 PM
Unknown Object (File)
Jan 14 2024, 10:15 PM
Unknown Object (File)
Jan 8 2024, 9:45 AM
Unknown Object (File)
Jan 8 2024, 9:45 AM
Unknown Object (File)
Jan 8 2024, 9:45 AM
Unknown Object (File)
Jan 8 2024, 9:33 AM
Subscribers

Details

Reviewers
markj
asomers
Test Plan

Installed the tests and ran them with kyua; all but the last one pass, as expected.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

markj retitled this revision from to Port unix_passfd tests to ATF.
markj updated this object.
markj edited the test plan for this revision. (Show Details)
markj added a reviewer: asomers.
tests/sys/kern/unix_passfd_test.c
2

Update copyright date?

143

ch is referenced before it is initialized. A smart compiler might complain about that.

345

Since this test fails, you should add an expectation something like this somewhere near the top of the testcase:
atf_tc_expect_fail("PR 181741 Packet loss when 'control' messages are present with large data");

357

buf is referenced before it is initialized.

tests/sys/kern/unix_passfd_test.c
66–67

The legacy tests don't check the return value for close -- should the ATF testcases do this?

136

What about strerror(errno) if len < 0?

137

Should this be ATF_REQUIRE_EQ_MSG ?

169–170

Same comments as above about strerror(errno) / ATF_REQUIRE_EQ_MSG.

200–204

The name of the tests don't clarify why things are being tested.

These comments (in short form) could probably be added to the header as a description of what's being tested (even if it's the PR #).

354–355

What about strerror(errno)?

367

The original test had a "closesocketpair(fd);" down at the bottom. Is this missing?

  • Updates based on feedback in D689.
  • Wrap a long line.
ngie added a reviewer: ngie.
This revision is now accepted and ready to land.Aug 27 2014, 10:10 PM
ngie requested changes to this revision.Aug 27 2014, 10:44 PM
ngie edited edge metadata.

Missed the Makefile revert.

This revision now requires changes to proceed.Aug 27 2014, 10:44 PM
In D689#11, @ngie wrote:

Missed the Makefile revert.

I'm not sure why it's displaying it as reverted. If in the revision update history you select Base and Diff 2, does the makefile show up in the diff?

tests/sys/kern/unix_passfd_test.c
66–67

I don't see any reason not to do the check. A failure here (or in other calls to close(2)) is probably indicative of a bug somewhere and is worth checking for, IMHO.

200–204

It looks like all but the last two are functional tests. The next revision will add descriptions for the regression tests, but I'm not sure what you're suggesting for the test names.

367

Yes, thanks for catching that.

In D689#14, @markj wrote:
In D689#11, @ngie wrote:

Missed the Makefile revert.

I'm not sure why it's displaying it as reverted. If in the revision update history you select Base and Diff 2, does the makefile show up in the diff?

Still not showing the change if I diff between Base and the second diff :/.

In D689#15, @ngie wrote:
In D689#14, @markj wrote:
In D689#11, @ngie wrote:

Missed the Makefile revert.

I'm not sure why it's displaying it as reverted. If in the revision update history you select Base and Diff 2, does the makefile show up in the diff?

Still not showing the change if I diff between Base and the second diff :/.

I'm baffled then. I'm getting the right diff for Base->Diff 2.

In D689#16, @markj wrote:
In D689#15, @ngie wrote:
In D689#14, @markj wrote:
In D689#11, @ngie wrote:

Missed the Makefile revert.

I'm not sure why it's displaying it as reverted. If in the revision update history you select Base and Diff 2, does the makefile show up in the diff?

Still not showing the change if I diff between Base and the second diff :/.

I'm baffled then. I'm getting the right diff for Base->Diff 2.

We seem to be having more problems with the tool than with the code. As long as you say that the Makefile is correct in your working copy, then I'm happy. I'll approve the review.

asomers edited edge metadata.
ngie edited edge metadata.

+1 for this review along with asomers seeing as this appears to be a caveat with phabricator.

This revision is now accepted and ready to land.Aug 28 2014, 8:46 PM

Can/should this CR be closed?

ngie edited reviewers, added: markj; removed: ngie.

Committed as r292914 with some minor tweaks (I opted for the comments in the test code instead of exposing all of the gory details like you originally proposed) -- thanks for the help Mark!