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

Sort output for test case to avoid race condition #3196

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

ffesti
Copy link
Contributor

@ffesti ffesti commented Jul 5, 2024

Solves #3106

We should probably understand why the urlhelper tests are racy before merging.

@ffesti ffesti added DONT DO NOT merge, for whatever reason test Testsuite-related labels Jul 5, 2024
@ffesti
Copy link
Contributor Author

ffesti commented Jul 5, 2024

OK, here it is, looks like there is an empty line moving around. And even worse the sort doesn't seem to catch it...

## ---------------------- ##
## Detailed failed tests. ##
## ---------------------- ##

#                             -*- compilation -*-
12. rpmgeneral.at:401: testing urlhelper fails ...
/rpmgeneral.at:404:
runroot rpm --define "_urlhelper /bin/false" --root /srv/test -qp https://example.com/foo-0.1-1.noarch.rpm 2> >(sed 's| /.*rpm-tmp.* https| rpm-tmp https|' | sort >&2)

--- -	2024-07-05 11:50:09.240892131 +0000
+++ /srv/rpmtests.dir/at-groups/12/stderr	2024-07-05 11:50:09.238121757 +0000
@@ -1,3 +1,3 @@
+
 error: Executing url helper "/bin/false rpm-tmp https://example.com/foo-0.1-1.noarch.rpm" failed with status 1
 error: open of https://example.com/foo-0.1-1.noarch.rpm failed: No such file or directory
-
12. rpmgeneral.at:401: 12. urlhelper fails (rpmgeneral.at:401): FAILED (rpmgeneral.at:404)

As the test uses fork() the processes can write out the lines in different
orders

Resolves: rpm-software-management#3106
@ffesti
Copy link
Contributor Author

ffesti commented Jul 19, 2024

Ok, I dropped the patch for the url helper test. Let's just fix this and worry about that one later.

@dmnks
Copy link
Contributor

dmnks commented Jul 19, 2024

Nice! Thanks.

@dmnks dmnks merged commit a57eea8 into rpm-software-management:master Jul 19, 2024
1 check passed
@ffesti ffesti deleted the 3106 branch July 19, 2024 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DONT DO NOT merge, for whatever reason test Testsuite-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants