This reverts commit 41cc117b3f37ab4b9b4ac8a815cd2a496d38fb4b.
This commit broke musl support.
With the changes introduced, the following code evaluates
to the #else branch without checking for SO_DEFAULT_HEADERS
resulting in an error.
server/sock.c +1888
```
\#ifdef HAS_IPX
int ipx_type = protocol - WS_NSPROTO_IPX;
\#ifdef SOL_IPX
setsockopt( sockfd, SOL_IPX, IPX_TYPE, &ipx_type, sizeof(ipx_type) );
\#else
struct ipx val;
/* Should we retrieve val using a getsockopt call and then
* set the modified one? */
val.ipx_pt = ipx_type;
setsockopt( sockfd, 0, SO_DEFAULT_HEADERS, &val, sizeof(val) );
\#endif
\#endif
```
I propose reverting the commit, but we could probably alter
the macro in the code section provided to match the changes
relevant github issue:
https://github.com/void-linux/void-packages/pull/45202
Signed-off-by: Fotios Valasiadis <fvalasiad(a)gmail.com>
--
v2: server: Check for SO_DEFAULT_HEADERS before using it.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3403
This is meant to simplify testing conditions that generally hold true
but may occasionally fail due to interference from external factors
(such as processes that start / stop, network connections being
opened / closed, etc).
The trick is to loop a few times on the set of flaky conditions until
they succeed. During the last attempt all failures are recorded as
usual, while in the previous runs, the tryok() failures area ignored
but cause one more attempt to be made.
The simplest case looks like this:
LOOP_ON_FLAKY_TESTS(3)
{
// ok() failures are never ignored and not retried
ok(..., "check 1", ...);
// tryok() failures are ignored except on the last attempt
tryok(..., "check 2", ...);
}
There is also:
* attempt_retry() which marks the current attempt as failed as if
calling tryok(0), and returns true if another attempt can be made.
* attempt_failed() which returns true if an ok() call failed.
---
This is independent from the 'flaky' mechanism which adds some naming
constraints. The loop macro is still called LOOP_ON_FLAKY_TESTS()
despite being unrelated to the flaky mechanism. The attempt_retry()
and attempt_failed() macro names also don't make it obvious that they
are related to tryok().
I think this mechanism is better than the flaky one because a flaky test
can go bad without anyone noticing, whereas if a tryok() starts failing
systematically it will cause a real failure.
The other side of that coin is that, unlike flaky, the tryok()
mechanism does not entirely eliminate the possibility of getting a
failure, it just reduces it; though by adjusting the maximum number of
attempts one can achieve an arbitrarily low failure rate. For instance
if an ok() call fails 10% of the time and one wants a maximum of 1 in
a million failure rate, use LOOP_ON_FLAKY_TESTS(6). The cost is an
increased run time in the worst case.
This also limits the use of this mechanism to tests that have a
reasonably low failure rate to start with (otherwise one has to loop
too many times). Also note that there are cases where looping
essentially reduce the failure rate to zero. For instance
ieframe:webbrowser fails if IE creates a net session while the test is
counting them. But IE only creates the one net session on start up so
trying even one more time should guarantee that the test will succeed.
Other cases like scheduling delays and the creation of network
connections are more probabilistic in nature. Maybe a comment in test.h
should offer some guideline as to the target failure rate.
Eventually this may replace the flaky mechanism but that depends on
how well it works in practice and how practical it is to loop on flaky
tests. It seems to be going well in the few cases I looked at. But I
think this mechanism has value even if the two end up coexisting
indefinitely.
This MR uses the tryok() in some actual tests for illustration and testing purposes. The final MR will probably split most of those off to separate MRs.
--
v4: mmdevapi/tests: Replace flaky with tryok() in the capture tests.
mmdevapi/tests: Replace flaky with tryok() in the render tests.
quartz/tests: Replace flaky() with tryok() to work around scheduling delays.
DEBUG ieframe/tests: tryok() framework testing ground.
ieframe/tests: Work around a network session race condition.
advapi32/tests: Replace the custom loop with tryok() mechanism.
ntdll/tests: Use tryok() to fix a free disk space race with other processes.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3418
--
v2: tests: Add a test for fmod() with vector arguments.
vkd3d-shader: Use ternary operator in fmod() implementation.
vkd3d-shader/tpf: Use 'movc' to implement ternary operator.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/268
This is similar to https://gitlab.winehq.org/wine/wine/-/merge_requests/2684, https://gitlab.winehq.org/wine/wine/-/merge_requests/3004 or https://gitlab.winehq.org/wine/wine/-/merge_requests/3139 but it validates the session transform node behavior with tests.
The tests are added after the changes because they otherwise don't pass and making them pass would be unnecessarily complicated.
I also have some local tests for MF_TOPONODE_WORKQUEUE_ID attributes and how it is supposed to behave. It basically creates new serialized work queues for every source node and assign them to every node downstream. Any sample request or processing operation is done in the associated queue.
When joining streams, queues are assigned downstream one after another and the last assigned queue is used when requesting samples upstream, but when samples are received and processed downstream it looks like the current queue of the source node is used for every downstream operations.
The request behavior seems to be the same when work queues are used, with round robin input requests, and single ProcessInput call followed by ProcessOutput loop until it fails.
This is yet not optimally efficient, and could be improved, for the following reasons:
1) All session operations are serialized together, even unrelated streams, and ProcessInput / ProcessOutput calls may be costly and stalling the pipeline. I believe that native probably allows parallel processing of unrelated stream requests, this needs to be confirmed.
2) MFT_MESSAGE_COMMAND_DRAIN message use isn't ideal, the message forces the transform to process all queued input synchronously, which can take a long time. I haven't checked exactly what native does but I believe it instead uses MFT_MESSAGE_NOTIFY_END_OF_STREAM messages, which would allow us to notify and drain the GStreamer decoder asynchronously.
3) MFT_MESSAGE_COMMAND_DRAIN also doesn't distinguish between input streams and needs to be sent globally. It's unclear how it should be used when multiple input streams are involved, and when one stream ends its segment then start a new segment while other streams don't have yet reached EOS. MFT_MESSAGE_NOTIFY_END_OF_STREAM messages have a stream ID parameter and would be more appropriate to handle separate input streams independently.
--
v3: mf/tests: Add more media session transform tests with multiple inputs.
mf/tests: Add more media session transform tests with multiple outputs.
mf/tests: Add some media session transform call pattern tests.
mf/session: Increase the stream request count when requests are already queued.
mf/session: Request more samples from upstream when necessary.
mf/session: Push transform input samples one by one to ProcessInput.
mf/session: Use helpers to push and pop samples for transform streams.
mf/session: Flush requests in transform_node_deliver_samples when drained.
mf/session: Use a helper to deliver transform node requested samples.
mf/session: Use local variables to access transform node streams.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3245
--
v2: msxml3: Add tests of ValidateOnParse property.
msxml3: Set ValidateOnParse to VARIANT_TRUE by default.
msxml3: Add ValidateOnParse support for IXMLDOMDocument3_{get,set}Property().
https://gitlab.winehq.org/wine/wine/-/merge_requests/3424
- The initial development was done by Matthew Wong in 2019. I split his v2 patch into testing and implementation commits, making changes needed to get it to compile.
- Some of the feedback given on the v2 patch was addressed by Myah Caron's updated patch versions in 2020, which I split out into a few separate commits.
- I also addressed some of the feedback, expanded the tests, and fixed some results based on those tests.
_(Following is the commit message from Matthew Wong's v2 patch)_
Implement functions used by some games (notably LEGO Island) for
determining which 3D object in a scene was clicked by the mouse cursor.
Fighting Steel also uses this function for mouse over. Previous stubs
would cause LEGO Island to crash upon any click and Fighting Steel
to crash on game start. A patch posted years ago on the bug thread
provided the minimum functionality to prevent crashes, but still
rendered large portions of the game inaccessible without them
implemented correctly.
Picking has been implemented by adding a "pick mode" in
d3d_execute_buffer_execute() which skips any drawing functions
leaving just the vertex processing. Adds click tests for each triangle
when in pick mode for creating an array of D3DPICKRECORDs.
Add a D3DPICKRECORD array and DWORD counter to d3d_device. These are
initiated in d3d_device_init(), allocated/written in
d3d_execute_buffer_execute(), and accessed/read in
d3d_device1_GetPickRecords(). The counter is used to determine the array
size (0 meaning array is not allocated). The array is free'd whenever
the data is no longer necessary by d3d_execute_buffer_execute(),
d3d_device1_GetPickRecords(), and d3d_device_inner_Release().
Add a compliance test to ddraw1 to test whether certain screen points
result in successful picks or not, as well as whether the data returned
from GetPickRecords() is valid and correct.
Stress testing reveals this patch's Pick() implementation may have
slight inaccuracies to the original function; occasionally pixels right
on triangle edges result in successful picks when they don't with the
original function (and vice versa). It may be some sort of floating
point rounding error or other algorithm difference that would be
difficult to determine without seeing the original code. In practice, I
believe this inaccuracy is so negligible that it won't produce any
undesirable results for the user.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=10729
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3420