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

test: Rework TEST-02-UNITTESTS #32394

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

DaanDeMeyer
Copy link
Contributor

Currently, A large amount of unit test output is logged directly to the console instead of to the per test log file as any subprocesses executed by a test manager will detect that stderr is not connected to the journal and log directly to /dev/console instead.

Let's make sure all unit test output is logged to the journal by running each test as a service with systemd-run. We also simplify the entire test script by getting rid of the custom queue and replicating it with xargs instead. By using bash's function export feature, we can make our run_test() function available to the bash subprocess spawned by xargs.

Once a test is finished, we read its logs from the journal and put them in the appropriate file if needed.

@github-actions github-actions bot added tests please-review PR is ready for (re-)review by a maintainer labels Apr 22, 2024
@bluca bluca added good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR and removed please-review PR is ready for (re-)review by a maintainer good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed labels Apr 22, 2024
@github-actions github-actions bot added please-review PR is ready for (re-)review by a maintainer and removed ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR labels Apr 22, 2024
@bluca bluca added good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR and removed please-review PR is ready for (re-)review by a maintainer good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed labels Apr 22, 2024
Currently, A large amount of unit test output is logged directly
to the console instead of to the per test log file as any subprocesses
executed by a test manager will detect that stderr is not connected
to the journal and log directly to /dev/console instead.

To solve this issue, let's make sure all tests are connected directly
to the journal by running them with systemd-run. We also simplify the
entire test script by getting rid of the custom queue and replicating
it with xargs instead. By using bash's function export feature, we can
make our run_test() function available to the bash subprocess spawned
by xargs.

Once a test is finished, we read its logs from the journal and put them
in the appropriate file if needed.
@github-actions github-actions bot added please-review PR is ready for (re-)review by a maintainer and removed ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR labels Apr 22, 2024
@DaanDeMeyer DaanDeMeyer added good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed and removed please-review PR is ready for (re-)review by a maintainer labels Apr 22, 2024
@DaanDeMeyer
Copy link
Contributor Author

TEST-02-UNITTESTS passed on the CentOS CI workflows, so merging

@DaanDeMeyer DaanDeMeyer merged commit 741d59b into systemd:main Apr 22, 2024
29 of 39 checks passed
@DaanDeMeyer DaanDeMeyer deleted the testsuite-02-rework branch April 22, 2024 17:37
@github-actions github-actions bot removed the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants