Repository navigation
Conversation
d02b9db to
fafe7e4
Compare
f54af4f to
6de0703
Compare
6de0703 to
e217a58
Compare
e217a58 to
8b68a60
Compare
Collecting DUT syslog in the test container needs a syslogd that can receive remote messages and sort them with property filters, which BusyBox syslogd can't. Build sysklogd 2.7.2, the same version as on the DUTs, into /usr/local and bump the image to 2.15. Signed-off-by: Ejub Sabic <[email protected]>
7c8a534 to
bcd7ca4
Compare
When a test fails in CI, the DUT logs are gone by the time anyone
looks. With TEST_SYSLOG_CAPTURE=y to make test, or --capture-syslog
to Infamy, each DUT logs to a syslogd in the test container, which
writes everything to full and each DUT to a file of its own:
test/.log/<run>/syslog/<test>/full
test/.log/<run>/syslog/<test>/<dut>.log
Infamy adds a remote action on each DUT after test_reset, and the
container's syslogd sorts messages on sender address. Infamy marks
the start and stop of each test, and the start of each step, in the
DUT's log with the log RPC, using msgid test-start, test-stop, and
step. After the run, make test packs the logs in logs.tar.gz.
Capture is off by default and best-effort, it never changes a test
result.
Resolves: #1608
Signed-off-by: Ejub Sabic <[email protected]>
CI uploads logs.tar.gz as the dut-syslog artifact when capture is enabled. Signed-off-by: Ejub Sabic <[email protected]>
bcd7ca4 to
df93b6a
Compare
|
Sorry that I am late to this party. I have some general hesitations about this approach:
I would suggest another approach with, IMO, a clearer separation of concerns between the actors involved. Broadly:
In summary:
What do you think @saba8814? What does the team think? (ping @mattiaswal @rical @troglobit) |
|
@wkz thank you for taking the time to review this thoroughly! We talked about this AFK so I'm 100% onboard with this approach. It drops the extra config step, reducing complexity, and makes infamy more separate from the whole logging, meaning a developer don't necessarily have to run a local sysklogd instance. The only outstanding thing to figure out with this simplified take is ensuring the DUTs log with their Two ways to get
A per-action option is better than a global override, because local files and the local ring buffer would keep the real hostname while only the stream to the test server uses the fixed name. I'll cook this up and prepare a backport branch for the sysklogd 2.x series. |
Summary of further AFK discussions: We should add a |
|
Yup, I'm looking at adding a new feature that would be able to inject structured data on all log messages, like this: |
Description
This PR introduces a way for Infamy to collect each DUT's syslog per test.
Each DUT sends its syslog to the test container, which saves it per test
and DUT next to the test output:
After the run, make test packs the logs in logs.tar.gz, which CI uploads
as the dut-syslog artifact. Capture is off by default, enable it with
make TEST_SYSLOG_CAPTURE=y test.
The start and stop of each test, and each test step, are marked in the
DUT's log with the host's time, so DUT lines can be lined up with the test
output. Capture is best-effort: if a DUT reboots, its log is kept up to
the reboot and resumes when the test attaches again. Tests that set up
syslog themselves stop the capture for that DUT. The test result is
never affected.
Resolves: #1608
Checklist
Tick relevant boxes, this PR is-a or has-a: