Skip to content

QUIC: Add a unit tests to validate that the qlog file is generated (and no crashes)#9668

Merged
brbzull0 merged 2 commits intoapache:masterfrom
brbzull0:qlog_tidy_and_autest
May 12, 2023
Merged

QUIC: Add a unit tests to validate that the qlog file is generated (and no crashes)#9668
brbzull0 merged 2 commits intoapache:masterfrom
brbzull0:qlog_tidy_and_autest

Conversation

@brbzull0
Copy link
Copy Markdown
Contributor

@brbzull0 brbzull0 commented May 2, 2023

While investigating another issue I found out that I was having some crashes inside quiche because (possible) the qlog string. So I am adding these tests to make sure we detect any crash related to the qlog generation.

This also uses buffer writter to build up the qlog name(instead of snprintf).

@brbzull0 brbzull0 added the QUIC label May 2, 2023
@brbzull0 brbzull0 self-assigned this May 2, 2023
@brbzull0 brbzull0 added this to the 10.0.0 milestone May 2, 2023
@brbzull0 brbzull0 changed the title QUIC: Add a unit tests to validate that the qlog file is generated QUIC: Add a unit tests to validate that the qlog file is generated (and no crashes) May 2, 2023
@bneradt
Copy link
Copy Markdown
Contributor

bneradt commented May 2, 2023

[approve ci rocky autest]

@maskit
Copy link
Copy Markdown
Member

maskit commented May 2, 2023

Can we have a gold-file to examine the generated qlog file? I don't think sleep-and-ls is a common way for autest.

@brbzull0
Copy link
Copy Markdown
Contributor Author

brbzull0 commented May 4, 2023

Can we have a gold-file to examine the generated qlog file? I don't think sleep-and-ls is a common way for autest.

the issue is that we do not have the trace id to know which file is the one we are supposed to read to then compare with a gold file. An example of a file would be test_qlog-9b9eca8989ab274e14a3acd9e95e1a23247f.sqlog

I guess I can make a quick script to rename whatever TS is droping as qlog files and the read the renamed file's content(and then apply the gold file).
How does this looks to you?

@maskit
Copy link
Copy Markdown
Member

maskit commented May 4, 2023

Oh, I see, filename. Renaming is an option.

@bneradt Do you have any suggestions?

@bryancall bryancall requested a review from bneradt May 8, 2023 22:18
@bneradt
Copy link
Copy Markdown
Contributor

bneradt commented May 8, 2023

Can we have a gold-file to examine the generated qlog file? I don't think sleep-and-ls is a common way for autest.

the issue is that we do not have the trace id to know which file is the one we are supposed to read to then compare with a gold file. An example of a file would be test_qlog-9b9eca8989ab274e14a3acd9e95e1a23247f.sqlog

I guess I can make a quick script to rename whatever TS is droping as qlog files and the read the renamed file's content(and then apply the gold file). How does this looks to you?

I don't think there's a way to handle run-time naming. , this seems like the way to go:

  1. cp the output to a well known file.
  2. Use a gold file, or ContainsExpression, to verify the contents.

… configured).

This also uses buffer writter to build up the qlog name(instead of
snprintf).
@brbzull0 brbzull0 force-pushed the qlog_tidy_and_autest branch from 90a2f3d to 8ebb801 Compare May 9, 2023 11:08
@brbzull0 brbzull0 force-pushed the qlog_tidy_and_autest branch from 8ebb801 to 25d7a65 Compare May 9, 2023 11:13
@brbzull0 brbzull0 requested a review from maskit May 12, 2023 08:42
@brbzull0 brbzull0 merged commit 61dc334 into apache:master May 12, 2023
cmcfarlen pushed a commit to cmcfarlen/trafficserver that referenced this pull request Jun 3, 2024
* asf/master:
  Fix ttmsh log field (apache#9722)
  Add CentOS to the required builds (apache#9721)
  Fix H3 transaction leak (apache#9714)
  Only need to include eventfd for native mode. This was using the wrong define anyway (apache#9711)
  Cleanup: remove ts::Buffer from LogField. (apache#9665)
  Cleanup: remove ts::Buffer from URL.cc (apache#9663)
  Check the calling thread of Ethread::schedule_local (apache#9691)
  build_h3_tools.sh: Remove an unneeded dir check (apache#9710)
  autoconf: Add lib flags for the quiche build test. (apache#9679)
  Remove deprecated debug output functions from 13 source files. (apache#9676)
  Changes for C++23 (apache#9703)
  QUIC: Add a unit tests to validate that the qlog file is generated (and no crashes) (apache#9668)
  libswoc: Update to 1.4.10 (apache#9700)
  Reload hosting.config on TASK thread (apache#9699)
  Changes for C++20 (apache#9701)
  Make io_uring or thread AIO modes a startup time decision (vs compile time) (apache#9630)
  Replace curl with proxy verifier in proxy protocol tests (apache#9684)
  Fix event queue corruption on PreWarmManager::reconfigure (apache#9692)
  Fixes crashes around OCSP with FetchSM (apache#9672)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants