Skip to content

ct: Remove usage of deprecated ct_slave in tests #9560

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jchristgit
Copy link
Contributor

These commits update the common_test test suite to:

  • Remove usage of the deprecated ct_slave and slave modules in tests (with the exception of the ct_slave tests itself, and some test_server tests for test_server:start_node)
  • Switch ct:pal to ct:log in most top-level test suites (except for ct_log_SUITE, which explicitly wants to test them), since the stdout of peer nodes won't be shown on the main test nodes & IMO make sense to contain to the HTML logs
  • Enable the cte_track event handler in tests for both local and GitHub-based runs

The second and third commit are of course a bit opinionated, so I'm happy to drop them (and possibly make peer log to our stdout) if wanted.

The only change here I'm a bit unsure about is the `cth_auto_clean`
suite, it is unclear to me why the application master is not started in
`init_per_suite` already, as I can't find any call to start an app
inbetween.
Since peer is way less talkative on the console, trim the remaining logs
too, such that we can use e.g. `cte_track` for clean console output.
Copy link
Contributor

github-actions bot commented Mar 8, 2025

CT Test Results

  2 files   57 suites   1h 11m 29s ⏱️
451 tests 436 ✅ 15 💤 0 ❌
485 runs  467 ✅ 18 💤 0 ❌

Results for commit 65fe335.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@rickard-green rickard-green added the team:PS Assigned to OTP team PS label Mar 10, 2025
@u3s
Copy link
Contributor

u3s commented Apr 2, 2025

I tried configuring cte_track for common_test once or twice, never finished. thanks for making an attempt!
There is some funny output in common_test test output requiring more attention but this could be tackled later.

@@ -1,2 +1,3 @@
{suites,"../common_test_test",all}.
{skip_suites,"../common_test_test",[ct_release_test_SUITE],"Versions not always correct"}.
{event_handler, {cte_track, []}}.
Copy link
Contributor

Choose a reason for hiding this comment

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

{enable_builtin_hooks, false}. addition is not needed? no logger events messing the output?
maybe they're generated less frequently for common_test suites ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, I made a local test run with -enable_builtin_hooks false but it didn't look like it make much of a difference. Some logs (e.g. ct:pal tests) run on the main node and thus always end up on the terminal. I've added it regardless in case I missed something^^

Copy link
Contributor

Choose a reason for hiding this comment

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

OK. maybe it is not relevant for ct.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you want me to remove the addition again?

@jchristgit
Copy link
Contributor Author

There is some funny output in common_test test output requiring more attention but this could be tackled later.

do you mean the .. sequence of numbers? I saw that too, maybe we could move that into a peer-ed test at some point so it's hushed.

@u3s
Copy link
Contributor

u3s commented Apr 3, 2025

There is some funny output in common_test test output requiring more attention but this could be tackled later.

do you mean the .. sequence of numbers? I saw that too, maybe we could move that into a peer-ed test at some point so it's hushed.

I mean all leftovers, after changing pal->log and taking logger events out.
IIRC, there used to be some printouts when slave node was started ... maybe gone already with peer used.

@jchristgit
Copy link
Contributor Author

IIRC, there used to be some printouts when slave node was started ... maybe gone already with peer used.

I think those are mostly gone with peer, yeah: https://github.com/erlang/otp/actions/runs/14226758185/job/39868469457

I can check this out with a closer look next week, but I think the proper fix for that is to just run the tests that test ct:pal in a peer node where the output is captured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:medium team:PS Assigned to OTP team PS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants