Page MenuHomeFreeBSD

syslogd: Add host forwarding test
ClosedPublic

Authored by jfree on Sun, Nov 17, 7:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 28, 1:14 AM
Unknown Object (File)
Mon, Nov 25, 1:29 AM
Unknown Object (File)
Sat, Nov 23, 2:24 PM
Unknown Object (File)
Thu, Nov 21, 9:44 PM
Unknown Object (File)
Thu, Nov 21, 1:23 PM
Unknown Object (File)
Wed, Nov 20, 12:04 AM
Unknown Object (File)
Tue, Nov 19, 9:15 PM
Unknown Object (File)
Tue, Nov 19, 3:03 PM
Subscribers

Details

Summary

Test communication between hosts by setting up two syslogd instances,
each binded to their own addresses, and sending a message from one to
the other. The tests passes if the message was delivered and logged
successfully.

This required some tweaking to the syslogd start and stop routines so
they could handle launching multiple syslogd instances with different
runtime files.

Run the tests in jails with an isolated VNET so they don't fail due to
an address bind collision in the host's VNET.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 60647
Build 57531: arc lint + arc unit

Event Timeline

jfree requested review of this revision.Sun, Nov 17, 7:57 PM
usr.sbin/syslogd/tests/syslogd_test.sh
30

IMO it'd be a bit cleaner to just handle this with getopts.

311

Do these addresses get assigned to an interface anywhere?

319

-a isn't handled by syslogd_start, does it get passed to syslogd somehow?

jfree marked 3 inline comments as done.
  • Fix argument parsing in syslogd_start()
  • Assign address to interface for host_action test
markj added inline comments.
usr.sbin/syslogd/tests/Makefile
7

I suspect that this is too aggressive. When running tests in parallel there can be a lot of load, resulting in some (hopefully not too large) delays. Probably something like 15-30s would be better.

usr.sbin/syslogd/tests/syslogd_test.sh
315

I suspect you could just assign ${addr} to lo0?

This revision is now accepted and ready to land.Sun, Nov 24, 6:43 PM
usr.sbin/syslogd/tests/syslogd_test.sh
315

I suspect you could just assign ${addr} to lo0?

If I assign ${addr} to lo0, it gets overridden by the lo0 localhost configuration in syslogd_start(). I couldn't find any options to add multiple addresses to a single loopback interface. Perhaps I am just not seeing the option?

usr.sbin/syslogd/tests/syslogd_test.sh
315

Ah, it was right in front of me! ifconfig lo0 alias. I'll give that a try.

usr.sbin/syslogd/tests/syslogd_test.sh
315

Ah, you need to specify the alias keyword when adding a second ip address if you don't want to clear an existing address. I suspect that running ifconfig lo0 inet alias 127.0.0.1/16 in syslogd_start() would fix the problem, but having an extra loopback interface is fine too.

This revision was automatically updated to reflect the committed changes.