Page MenuHomeFreeBSD

Fix test for lib/libc/net/servent_test
ClosedPublic

Authored by olivier on Jul 12 2019, 10:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 1, 4:16 PM
Unknown Object (File)
Sat, Apr 20, 3:56 AM
Unknown Object (File)
Mar 20 2024, 2:15 AM
Unknown Object (File)
Jan 15 2024, 9:33 PM
Unknown Object (File)
Jan 14 2024, 9:12 PM
Unknown Object (File)
Dec 27 2023, 2:05 PM
Unknown Object (File)
Dec 20 2023, 5:29 AM
Unknown Object (File)
Dec 3 2023, 2:31 PM
Subscribers

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

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

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
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 ?

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 :).

Update following Enji's advice.

This revision is now accepted and ready to land.Jul 15 2019, 4:19 PM