Repository navigation
feat(ct_test): add auto_sname to opt out of -hidden -sname - #16
Open
TrapsterDK wants to merge 1 commit into
Open
TrapsterDK wants to merge 1 commit into
TrapsterDK wants to merge 1 commit into
Conversation
ct_test always starts ct_run with -hidden -sname <name>. A named node needs epmd and a free name on a working loopback. In sandboxes without a loopback interface the node cannot start, so the test fails before any case runs. ct_run_extra_args can add node options but cannot remove these two. Add a bool attribute auto_sname to ct_test (default True). When False, both the POSIX and the Windows script start ct_run without -hidden and -sname, and ct_run_extra_args picks the node options. For example, -sname undefined -start_epmd false runs the suite without epmd. ct_suite and ct_suite_variant pass it through **kwargs. With the default, the generated scripts are byte-for-byte unchanged. Add analysis tests for the POSIX and Windows scripts with and without the option, and a test/ suite that runs with auto_sname = False and -sname undefined -start_epmd false and checks that the node is unnamed and not hidden. Assisted by Claude.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #15.
Problem
ct_testalways startsct_runwith-hidden -sname <name>. A named node needs epmd and a free name on a working loopback. In a sandbox without a loopback interface the node cannot start, and the test fails before any case runs.ct_run_extra_argscan add node options but cannot remove these two.Change
auto_snameonct_test, defaultTrue.False, both the POSIX and the Windows script startct_runwithout-hiddenand-sname.ct_run_extra_argsthen chooses the node options. For example,-sname undefined -start_epmd falseruns the suite without epmd.-snameor-name,ct_runuses its own default name (ct). The attribute doc says so.ct_suiteandct_suite_variantpass it through**kwargs.Test
private/ct_auto_sname_test: analysis tests on the generated POSIX and Windows scripts.-hiddenand-snameare present by default and absent withauto_sname = False.test/ct_no_sname: a suite withauto_sname = Falseand-sname undefined -start_epmd false. It checks thatnode()isnonode@nohostand that the node is not hidden. With the defaultauto_snamethe same suite fails, because-hiddenis still passed.Note:
test/ct_no_snameruns in every CI job; it was run here on Linux with OTP 29 only. I could not run the macOS or Windows jobs.Test output (OTP 29.1.2, Bazel 9.2.0,
--nohome_rc)The PR was also checked alone on
main(rootbazel test //...passes). The output below is from all four of my PRs stacked (bazel test //...in the root, then intest/).Assisted by Claude.