Page MenuHomeFreeBSD

Fix test for lib/libc/net/servent_test
ClosedPublic

Authored by olivier on Jul 12 2019, 10:28 PM.

Details

Summary

One test is always skipped because it required inexistent /var/db/services.cdb: Replacing by services.db fix the test.

Test Plan

Before patch:

root@fb:/usr/tests # kyua test lib/libc/net/servent_test
lib/libc/net/servent_test:servent  ->  skipped: Required file '/var/db/services.cdb' not found  [0.001s]

Results file id is usr_tests.20190712-222013-284112
Results saved to /root/.kyua/store/results.usr_tests.20190712-222013-284112.db

1/1 passed (0 failed)

After the patch:

root@fbsd:/usr/tests # kyua test lib/libc/net/servent_test
lib/libc/net/servent_test:servent  ->  passed  [0.117s]

Results file id is usr_tests.20190712-222045-982234
Results saved to /root/.kyua/store/results.usr_tests.20190712-222045-982234.db

1/1 passed (0 failed)

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

olivier created this revision.Jul 12 2019, 10:28 PM
asomers accepted this revision.Jul 12 2019, 11:02 PM
This revision is now accepted and ready to land.Jul 12 2019, 11:02 PM
ngie requested changes to this revision.Jul 12 2019, 11:49 PM

Good eye!

Could you please adjust the script from the Makefile so this script doesn’t need to diverge from upstream?

This revision now requires changes to proceed.Jul 12 2019, 11:49 PM
lwhsu added a subscriber: lwhsu.Jul 13 2019, 12:30 AM
linimon retitled this revision from Fix test: to Fix test for lib/libc/net/servent_test.Jul 13 2019, 4:18 PM
In D20943#453979, @ngie wrote:

Good eye!
Could you please adjust the script from the Makefile so this script doesn’t need to diverge from upstream?

What do you man by adjusting the script from the Makefile ?
Do you mean modifying lib/libc/tests/net/Makefile to add an action to rename services.cdb ?

ngie added a comment.Jul 15 2019, 3:10 PM
In D20943#453979, @ngie wrote:

Good eye!
Could you please adjust the script from the Makefile so this script doesn’t need to diverge from upstream?

What do you man by adjusting the script from the Makefile ?
Do you mean modifying lib/libc/tests/net/Makefile to add an action to rename services.cdb ?

Yes.

Some decent examples for how I did this with the tmpfs tests from NetBSD can be found in tests/sys/fs/tmpfs/Makefile. My goal was to leave the tmpfs testcases as untouched as possible so we could pull in future netbsd-tests snapshots with a little porting/hacking as possible :).

olivier updated this revision to Diff 59775.Jul 15 2019, 3:41 PM

Update following Enji's advice.

This revision is now accepted and ready to land.Jul 15 2019, 4:19 PM
This revision was automatically updated to reflect the committed changes.