Skip to content

Conversation

@bneradt
Copy link
Contributor

@bneradt bneradt commented Jun 17, 2022

This updates our AuTest invocation of traffic_server to bind its stdout
and stderr output to traffic.out. Doing this allows the tests to
dynamically interact with the traffic.out content, such as waiting upon
certian debug tag lines. It also serves as a debugging convenience since
all logging output for a Traffic Server process will be in its log dir:
diags.log, error.log, etc., and now traffic.out.

@bneradt bneradt added the AuTest label Jun 17, 2022
@bneradt bneradt added this to the 10.0.0 milestone Jun 17, 2022
@bneradt bneradt self-assigned this Jun 17, 2022
This updates our AuTest invocation of traffic_server to bind its stdout
and stderr output to traffic.out. Doing this allows the tests to
dynamically interact with the traffic.out content, such as waiting upon
certian debug tag lines. It also serves as a debugging convenience since
all logging output for a Traffic Server process will be in its log dir:
diags.log, error.log, etc., and now traffic.out.
@bneradt bneradt force-pushed the autest_stdout_traffic_out branch from 012f188 to b0c092c Compare June 18, 2022 18:46
Comment on lines -31 to -34
# It is necessary to redirect stderr to a file so it will be available for examination by a test run.
ts = Test.MakeATSProcess(
"ts", command="traffic_manager 2> " + Test.RunDirectory + "/ts.stderr.txt", select_ports=True
)
Copy link
Contributor Author

@bneradt bneradt Jun 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an example of something no longer necessary with this patch since we bind stdout and stderr to traffic.out. Instead we can simply interact with traffic.out.

@bneradt bneradt merged commit 3a4c3db into apache:master Jun 21, 2022
@bneradt bneradt deleted the autest_stdout_traffic_out branch June 21, 2022 19:59
@marcin-wadolkowski
Copy link

I'm not sure if it's an issue. I noticed that in file:
tests/gold_tests/pluginTest/stek_share/stek_share.test.py

Lines 225 to 229 begin with ts1.Disk.traffic_out.Content but maybe should begin with:
ts1.Disk.traffic_out.Content (...)
ts2.Disk.traffic_out.Content (...)
...
ts5.Disk.traffic_out.Content (...)

bneradt added a commit to bneradt/trafficserver that referenced this pull request Jun 22, 2022
This fixes the stek_share.test.py AuTest to verify the traffic.out
output against the correct ts process, rather than just using ts1 for
each check. This is fixing a copy and paste bug introduced in apache#8919.
@bneradt
Copy link
Contributor Author

bneradt commented Jun 22, 2022

I'm not sure if it's an issue. I noticed that in file: tests/gold_tests/pluginTest/stek_share/stek_share.test.py

Lines 225 to 229 begin with ts1.Disk.traffic_out.Content but maybe should begin with: ts1.Disk.traffic_out.Content (...) ts2.Disk.traffic_out.Content (...) ... ts5.Disk.traffic_out.Content (...)

Good catch, @marcin-wadolkowski . Fixing in #8921.

bneradt added a commit that referenced this pull request Jun 22, 2022
This fixes the stek_share.test.py AuTest to verify the traffic.out
output against the correct ts process, rather than just using ts1 for
each check. This is fixing a copy and paste bug introduced in #8919.
@zwoop
Copy link
Contributor

zwoop commented Nov 17, 2022

We need this for other PRs to CP.

Cherry-picked to v9.2.x

@zwoop zwoop modified the milestones: 10.0.0, 9.2.0 Nov 17, 2022
zwoop pushed a commit that referenced this pull request Nov 17, 2022
This updates our AuTest invocation of traffic_server to bind its stdout
and stderr output to traffic.out. Doing this allows the tests to
dynamically interact with the traffic.out content, such as waiting upon
certian debug tag lines. It also serves as a debugging convenience since
all logging output for a Traffic Server process will be in its log dir:
diags.log, error.log, etc., and now traffic.out.

(cherry picked from commit 3a4c3db)
masaori335 pushed a commit to masaori335/trafficserver that referenced this pull request Feb 21, 2023
This updates our AuTest invocation of traffic_server to bind its stdout
and stderr output to traffic.out. Doing this allows the tests to
dynamically interact with the traffic.out content, such as waiting upon
certian debug tag lines. It also serves as a debugging convenience since
all logging output for a Traffic Server process will be in its log dir:
diags.log, error.log, etc., and now traffic.out.

(cherry picked from commit 3a4c3db)
masaori335 pushed a commit to masaori335/trafficserver that referenced this pull request Feb 21, 2023
* asf/9.2.x:
  Revert "Make separate read and write vc_handlers (apache#8301)"
  AuTest: Update to Proxy Verifier 2.5.2 (apache#9223)
  AuTest: Update to Proxy Verifier v2.5.0 (apache#9221)
  Updated ChangeLog
  Adding back set_connect_fail for generic I/O error (apache#9181)
  AuTest: make MakeATSProcess accessible for TestRuns (apache#9195)
  Traffic Dump: Allow unlimited disk utilization (apache#9186)
  AuTest: bind stdout/stderr to traffic.out (apache#8919)
  Adds support for serving statichit content out of a directory (apache#9107)
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.

4 participants