-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Meson test fixups #3120
Meson test fixups #3120
Conversation
eli-schwartz
commented
Apr 27, 2022
- don't make running the valgrind tests mandatory
- mark known-broken test on Windows, to work around "./zstreamtest --newapi" test case fails on Windows #3119
After manually installing these fixes into the Meson WrapDB, I finally got both Windows and macOS (new additions to our test matrix) to pass CI: https://github.com/mesonbuild/wrapdb/runs/6089540648?check_suite_focus=true |
@@ -183,6 +185,8 @@ test('test-zstream-1', | |||
test('test-zstream-3', | |||
zstreamtest, | |||
args: ['--newapi', '-t1', ZSTREAM_TESTTIME] + FUZZER_FLAGS, | |||
# --newapi dies on Windows with "exit status 3221225477 or signal 3221225349 SIGinvalid" | |||
should_fail: host_machine_os == os_windows, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if the issue is fixed, and zstreamtest --newapi
now completes successfully ?
would it be considered a test failure due to should_fail
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR changes its status to EXPECTEDFAIL, which is a success status. When the bug is fixed, it will start producing an UNEXPECTEDPASS status, which is considered a failure and causes the overall test results to be negative.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR changes its status to EXPECTEDFAIL, which is a success status. When the bug is fixed, it will start producing an UNEXPECTEDPASS status, which is considered a failure and causes the overall test results to be negative.
Better fix the issue then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, once that other PR is merged I will re-check this and drop the obsolete commit.
Is there anything else I should do about this? As far as discussion over the second commit goes, it seems the attempt to actually fix the issue isn't getting anywhere. I think it's fine to add a "known broken" label to the testsuite. |
I don't remember all the details,
I think it's fair to say that I would largely prefer to have the issue fixed. Given a choice, I would still prefer to fix the issue. |
To be clear, the proposal is to make it be non-blocking, but visibly reported:
This is something that the Test Anything protocol calls "todo" tests: https://testanything.org/tap-specification.html#todo-tests
Automake's "Generalities about testing" mentions:
It's not uncommon to make a test failure be non-blocking when you've temporarily exhausted your efforts at solving it (and you have a tracking issue for it, and the testsuite flags it as a FIXME). If the test failure doesn't indicate a critical release blocker, then you want the testsuite status to be useful -- i.e. it should be non-blocking by default, and only raise critical errors if new or unknown issues are introduced. |
OK, this will be discussed with the team, so that we can provide a feedback on this PR in a reasonable delay. |
Alright, thanks for looking into it. :) |
Follow up : @terrelln is going to have a look at this topic. |
Any update on this? :) |
@terrelln did you ever have a chance to investigate this? |
I'll take a look at this today / tomorrow. |
An update: I've reproduced the problem and found the root cause. |
Fantastic! Thank you for your investigation. Looking forward to being able to pass tests on the next zstd release. :) |
1. If threads are resized the threads' `ZSTD_pthread_t` might move while the worker still holds a pointer into it (see more details in facebook#3120). 2. The join operation was waiting for a thread and then return its `thread.arg` as a return value, but since the `ZSTD_pthread_t thread` was passed by value it would have a stale `arg` that wouldn't match the thread's actual return value. This fix changes the `ZSTD_pthread_join` API and removes support for returning a value. This means that we are diverging from the `pthread_join` API and this is no longer just an alias. In the future, if needed, we could return a Windows thread's return value using `GetExitCodeThread`, but as this path wouldn't be excised in any case, it's preferable to not add it right now.
1. If threads are resized the threads' `ZSTD_pthread_t` might move while the worker still holds a pointer into it (see more details in facebook#3120). 2. The join operation was waiting for a thread and then return its `thread.arg` as a return value, but since the `ZSTD_pthread_t thread` was passed by value it would have a stale `arg` that wouldn't match the thread's actual return value. This fix changes the `ZSTD_pthread_join` API and removes support for returning a value. This means that we are diverging from the `pthread_join` API and this is no longer just an alias. In the future, if needed, we could return a Windows thread's return value using `GetExitCodeThread`, but as this path wouldn't be excised in any case, it's preferable to not add it right now.
1. If threads are resized the threads' `ZSTD_pthread_t` might move while the worker still holds a pointer into it (see more details in facebook#3120). 2. The join operation was waiting for a thread and then return its `thread.arg` as a return value, but since the `ZSTD_pthread_t thread` was passed by value it would have a stale `arg` that wouldn't match the thread's actual return value. This fix changes the `ZSTD_pthread_join` API and removes support for returning a value. This means that we are diverging from the `pthread_join` API and this is no longer just an alias. In the future, if needed, we could return a Windows thread's return value using `GetExitCodeThread`, but as this path wouldn't be excised in any case, it's preferable to not add it right now.
68ab1b2
to
887d06a
Compare
Added CI improvements on top. This also includes #3368 which is needed to configure the contrib directory so that CI runs, although that PR is much more easily merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, my only feedback is that I think it'd be better to pin the third-party action to a specific commit.
After making the change I think it'd be a good idea to merge this and then merge a PR that fixes the issue and removes the expected failure for windows.
1. If threads are resized the threads' `ZSTD_pthread_t` might move while the worker still holds a pointer into it (see more details in facebook#3120). 2. The join operation was waiting for a thread and then return its `thread.arg` as a return value, but since the `ZSTD_pthread_t thread` was passed by value it would have a stale `arg` that wouldn't match the thread's actual return value. This fix changes the `ZSTD_pthread_join` API and removes support for returning a value. This means that we are diverging from the `pthread_join` API and this is no longer just an alias. In the future, if needed, we could return a Windows thread's return value using `GetExitCodeThread`, but as this path wouldn't be excised in any case, it's preferable to not add it right now.
1. If threads are resized the threads' `ZSTD_pthread_t` might move while the worker still holds a pointer into it (see more details in facebook#3120). 2. The join operation was waiting for a thread and then return its `thread.arg` as a return value, but since the `ZSTD_pthread_t thread` was passed by value it would have a stale `arg` that wouldn't match the thread's actual return value. This fix changes the `ZSTD_pthread_join` API and removes support for returning a value. This means that we are diverging from the `pthread_join` API and this is no longer just an alias. In the future, if needed, we could return a Windows thread's return value using `GetExitCodeThread`, but as this path wouldn't be excised in any case, it's preferable to not add it right now.
It's entirely possible some people don't have valgrind installed, but still want to run the tests. If they don't have it installed, then they probably don't intend to run those precise test targets anyway. Also, this solves an error when running the tests in an automated environment. The valgrind tests have a hard dependency on behavior such as `./zstd` erroring out with the message "stdin is a console, aborting" which does not work if the automated environment doesn't have a console. As a rough heuristic, automated environments lacking a console will *probably* also not have valgrind, so avoiding that test definition neatly sidesteps the issue. Also, valgrind is not easily installable on macOS, at least homebrew says it isn't available there. This makes it needlessly hard to enable the testsuite on macOS.
playTests.sh has an option to run really slow tests. This is enabled by default in Meson, but what we really want is to do like the Makefile, and run the fast ones by default, but with an option to run the slow ones instead.
Travis is no longer run, but this wasn't ported to something else.
There are a couple of oddities here. We don't attempt to build e.g. contrib, because that doesn't seem to work at the moment. Also notice that each command is its own step. This happens because github actions runs in powershell, which doesn't seem to let you abort on the first failure.
887d06a
to
6747ba4
Compare
Looks good, although a bit unstable as the windows test might actually pass sometimes. |
1. If threads are resized the threads' `ZSTD_pthread_t` might move while the worker still holds a pointer into it (see more details in facebook#3120). 2. The join operation was waiting for a thread and then return its `thread.arg` as a return value, but since the `ZSTD_pthread_t thread` was passed by value it would have a stale `arg` that wouldn't match the thread's actual return value. This fix changes the `ZSTD_pthread_join` API and removes support for returning a value. This means that we are diverging from the `pthread_join` API and this is no longer just an alias. In the future, if needed, we could return a Windows thread's return value using `GetExitCodeThread`, but as this path wouldn't be excised in any case, it's preferable to not add it right now.
1. If threads are resized the threads' `ZSTD_pthread_t` might move while the worker still holds a pointer into it (see more details in facebook#3120). 2. The join operation was waiting for a thread and then return its `thread.arg` as a return value, but since the `ZSTD_pthread_t thread` was passed by value it would have a stale `arg` that wouldn't match the thread's actual return value. This fix changes the `ZSTD_pthread_join` API and removes support for returning a value. This means that we are diverging from the `pthread_join` API and this is no longer just an alias. In the future, if needed, we could return a Windows thread's return value using `GetExitCodeThread`, but as this path wouldn't be excised in any case, it's preferable to not add it right now.
Oops, yeah, I think I grabbed a hash for the msvc-dev-cmd action, from the wrong branch. |
Honestly, I really wish it was possible to target semantically meaningful versions of an action, like I originally did, and specify a checksum to verify, instead of abusing commit hashes. But GitHub doesn't support that. :( |