Skip to content

common_test: Document fail return from init callbacks#11355

Draft
ausimian wants to merge 1 commit into
erlang:maintfrom
ausimian:common_test/init-fail-return
Draft

common_test: Document fail return from init callbacks#11355
ausimian wants to merge 1 commit into
erlang:maintfrom
ausimian:common_test/init-fail-return

Conversation

@ausimian

@ausimian ausimian commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Document that init_per_suite/1 and init_per_group/2 may return {fail, Reason}.
  • Add {fail, Reason} to the ct_suite callback specs.
  • Update the Common Test example suite templates to include the fail return.

Why

Common Test already handles {fail, Reason} from these init callbacks, but the public callback docs and examples only mentioned skip returns. This aligns the documentation with the existing behavior.

Closes #8952.

Testing

  • ./otp_build configure
  • make common_test using OTP 29 in PATH
  • git diff --check

Document that init_per_suite/1 and init_per_group/2 may return {fail, Reason}. This behavior is already handled by Common Test, but the ct_suite callback types and example suite templates only mentioned skip returns.

Update the callback specs and descriptions, and align the Common Test example chapter with the documented return values.

Closes erlang#8952
@github-actions

github-actions Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

CT Test Results

  2 files   58 suites   1h 15m 33s ⏱️
468 tests 453 ✅ 15 💤 0 ❌
502 runs  484 ✅ 18 💤 0 ❌

Results for commit 1406fd6.

♻️ 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant