Page MenuHomeFreeBSD

syslogd: Add host forwarding test
ClosedPublic

Authored by jfree on Nov 17 2024, 7:57 PM.
Tags
None
Referenced Files
F106162521: D47649.id147099.diff
Thu, Dec 26, 10:19 AM
F106158477: D47649.id.diff
Thu, Dec 26, 8:44 AM
F106151572: D47649.id146624.diff
Thu, Dec 26, 6:07 AM
Unknown Object (File)
Thu, Dec 26, 2:35 AM
Unknown Object (File)
Thu, Dec 26, 2:17 AM
Unknown Object (File)
Thu, Nov 28, 1:14 AM
Unknown Object (File)
Nov 25 2024, 1:29 AM
Unknown Object (File)
Nov 23 2024, 2:24 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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

jfree requested review of this revision.Nov 17 2024, 7:57 PM
usr.sbin/syslogd/tests/syslogd_test.sh
75–76

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

328

Do these addresses get assigned to an interface anywhere?

336

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

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

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

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
332

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

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

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.