Skip to content
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

doc: overhaul sample criteria and expectations #78024

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

nashif
Copy link
Member

@nashif nashif commented Sep 4, 2024

overhaul sample criteria and what we expect in a sample, especially
overhaul the twister part and what should be provided for good test
coverage.

Signed-off-by: Anas Nashif anas.nashif@intel.com

Copy link
Collaborator

@kartben kartben left a comment

Choose a reason for hiding this comment

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

thanks for this!

samples/sample_definition_and_criteria.rst Outdated Show resolved Hide resolved
samples/sample_definition_and_criteria.rst Outdated Show resolved Hide resolved
samples/sample_definition_and_criteria.rst Outdated Show resolved Hide resolved
samples/sample_definition_and_criteria.rst Outdated Show resolved Hide resolved
samples/sample_definition_and_criteria.rst Outdated Show resolved Hide resolved
samples/sample_definition_and_criteria.rst Outdated Show resolved Hide resolved
samples/sample_definition_and_criteria.rst Outdated Show resolved Hide resolved
samples/sample_definition_and_criteria.rst Outdated Show resolved Hide resolved
samples/sample_definition_and_criteria.rst Outdated Show resolved Hide resolved
* Make the sample as generic as possible. Avoid making a sample platform specific unless it is
for particular hardware.

4. A sample should provide sufficient coverage of a subsystem, feature, or module.
3. A sample should provide sufficient coverage of a subsystem, feature, or module.
Copy link
Collaborator

Choose a reason for hiding this comment

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

FWIW I have mixed feelings about this section as it contains a lot of redundant information (if we people don't get it by now that samples must not be unit tests!) and the wording might be confusing: we ask for "sufficient coverage of a subsytesm" when earlier we advise to not use samples to test subsystems.
No immediate action needed though as it is OK enough as-is and can be improved in later PRs.

Copy link
Member Author

Choose a reason for hiding this comment

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

coverage as in 'feature coverage', try to demonstrate as much as possible of a subsystem to be usable and submit thin content leaving much behind.

Copy link
Collaborator

@kartben kartben Sep 11, 2024

Choose a reason for hiding this comment

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

yup, I know that's what this is supposed to mean, hence why I said I think it's confusing as other people not aware of the distinction between tests and samples that we're trying to establish might interpret "coverage" in a different way by just looking at the heading title.

Like I said, will likely tackle this in a follow-up PR but I guess where my head is at is rewording/summarizing this along the lines of "A sample should demonstrate an actual use case" or something in that vein.

overhaul sample criteria and what we expect in a sample, especially
overhaul the twister part and what should be provided for good test
coverage.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
@carlescufi carlescufi merged commit ef49f03 into zephyrproject-rtos:main Sep 12, 2024
16 checks passed
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.

5 participants