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

tests: posix: common: separate into smaller testsuites #79454

Open
12 of 15 tasks
cfriedt opened this issue Oct 5, 2024 · 9 comments
Open
12 of 15 tasks

tests: posix: common: separate into smaller testsuites #79454

cfriedt opened this issue Oct 5, 2024 · 9 comments
Assignees
Labels
area: POSIX POSIX API Library area: Tests Issues related to a particular existing or missing test Enhancement Changes/Updates/Additions to existing features Good first issue Good for a first time contributor to take

Comments

@cfriedt
Copy link
Member

cfriedt commented Oct 5, 2024

Is your enhancement proposal related to a problem? Please describe.
The posix.common testsuite contains a lot of mostly unrelated testsuites. As a result, the code size is large, but mostly the data size is extremely large.

It would require less variation from default settings, and would reduce ram requirements to split that testsuite into smaller groups of more closely related testsuites.

Describe the solution you'd like

The obvious way to group related testsuites is by Option Group.

E.g.

and potentially others.

testcase.yaml permutations can be designed to enable or disable features that affect different Option Groups, like TSS, TSA, TSH (see Codes).

Additionally, such a grouping would theoretically improve bug attribution capabilities; if an error was traced (either via stacktrace or bug description) to a certain posix function, there would be a 1:1 correspondance to an Option Group, so typically, only that testsuite would need to be executed.

Describe alternatives you've considered
The way the testsuite has been designed historically.

Additional context
This came up in the context of #79443 but it was already thought of as a nice-to-have.

@cfriedt cfriedt added Enhancement Changes/Updates/Additions to existing features Good first issue Good for a first time contributor to take area: Tests Issues related to a particular existing or missing test area: POSIX POSIX API Library labels Oct 5, 2024
@zacck
Copy link

zacck commented Oct 7, 2024

Can I take a stab at this one please, if it's ok could it be assigned to me?

@cfriedt
Copy link
Member Author

cfriedt commented Oct 7, 2024

@zacck - please do!

@zacck
Copy link

zacck commented Oct 9, 2024

@cfriedt I'm new to Zephyr and while I have looked at the links and docs supplied above I believe I need an example to start breaking this down would you be able to assist with some information that would help here?

@ycsin
Copy link
Member

ycsin commented Oct 10, 2024

@zacck If you have just started with Zephyr, I think you will need to be familiarized with Twister and the different KV pairs in the testcase.yaml, see Test Runner (Twister)

@cfriedt do you expect the zephyr/tests/posix/common test to be broken down into multiple tests? Because while we can break the test into multiple sub-tests within the tests/posix/common/testcase.yaml, the existing testcase.yaml would be pretty big when we want to make sure that each sub-test are tested with different configurations (different C libs, spin validation, tls, ...) that we have: (<number of option group sub-test> x <number of configurations>)

@cfriedt
Copy link
Member Author

cfriedt commented Oct 10, 2024

@cfriedt do you expect the zephyr/tests/posix/common test to be broken down into multiple tests?

They should be broken down into separate app directories.

That's mainly because the single application is getting quite large, and the configuration requirements are not always clear.

It would be better if the prj.conf and memory requirements were minimal.

@cfriedt
Copy link
Member Author

cfriedt commented Oct 14, 2024

It could be good to split this into smaller commits / a task list.

@zacck
Copy link

zacck commented Oct 15, 2024

@cfriedt yeah breaking this down would be awesome, I am going to do that once I have a solid plan ahead which should be around tomorrow 16th OCT 24.

@cfriedt
Copy link
Member Author

cfriedt commented Oct 15, 2024

@cfriedt yeah breaking this down would be awesome, I am going to do that once I have a solid plan ahead which should be around tomorrow 16th OCT 24.

Cool - it can be separate PRs, which should simplify things. I'll do pthreads, because it is likely the most confusing.

@zacck
Copy link

zacck commented Oct 15, 2024

@cfriedt yeah breaking this down would be awesome, I am going to do that once I have a solid plan ahead which should be around tomorrow 16th OCT 24.

Cool - it can be separate PRs, which should simplify things. I'll do pthteads, because it is likely the most confusing.

It might be more beneficial if you teach me how to do the most confusing parts, that way I and others can grow into being able to help with meatier stuff and contributors like you can get more done since you can effectively direct us.

I do understand that is would be slower and cumbersome, but do consider it enables us to help more.

@cfriedt cfriedt reopened this Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: POSIX POSIX API Library area: Tests Issues related to a particular existing or missing test Enhancement Changes/Updates/Additions to existing features Good first issue Good for a first time contributor to take
Projects
None yet
Development

No branches or pull requests

3 participants