Page MenuHomeFreeBSD

Improve debugging output on routing tests failure
ClosedPublic

Authored by melifaro on Apr 23 2021, 9:34 PM.

Details

Summary

Most of the routing tests create per-test VNET, making it harder to repeat the failure with CLI tools.
Provide an additional route/nexthop data on failure.

Diff Detail

Repository
rG 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

melifaro created this revision.
melifaro retitled this revision from Summary: Improve debugging output on routing tests failure to Improve debugging output on routing tests failure.Apr 23 2021, 9:37 PM
melifaro edited the summary of this revision. (Show Details)
melifaro added a reviewer: network.
kp added inline comments.
tests/sys/net/routing/rtsock_print.h
403

It looks like line is unused here.

408

I think you can just system(cmdbuf); here. That'll fork a shell and inherit our stdout/stderr, so it should do what you want with less effort.

tests/sys/net/routing/rtsock_print.h
408

I started with that.
Due to either buffering or other issues the output from system() calls appears on top, before any other logs, thus making it harder to find/interpret.

This revision is now accepted and ready to land.Apr 24 2021, 7:20 AM