Module: wine
Branch: master
Commit: f4b52f796abb9bb7b3648a8aea256f39c7f6ac93
URL: https://gitlab.winehq.org/wine/wine/-/commit/f4b52f796abb9bb7b3648a8aea256f…
Author: Eric Pouech <eric.pouech(a)gmail.com>
Date: Tue Nov 8 10:44:56 2022 +0100
shell32/tests: Improve timeout detection in shlexec tests.
Some shlexec tests timeout on Windows10 (and generate errors as no
action has been executed).
Improve detection of timeout in child program (so that existing
workaround in shell_execute_ex can be triggered).
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/shell32/tests/shlexec.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c
index 5096eef380f..b84a96a2434 100644
--- a/dlls/shell32/tests/shlexec.c
+++ b/dlls/shell32/tests/shlexec.c
@@ -194,6 +194,7 @@ static void init_event(const char* child_file)
hEvent=CreateEventA(NULL, FALSE, FALSE, event_name);
}
+static HANDLE hChildFile;
/*
* This is just to make sure the child won't run forever stuck in a
* GetMessage() loop when DDE fails for some reason.
@@ -201,6 +202,7 @@ static void init_event(const char* child_file)
static void CALLBACK childTimeout(HWND wnd, UINT msg, UINT_PTR timer, DWORD time)
{
trace("childTimeout called\n");
+ childPrintf(hChildFile, "Timeout=1\r\n");
PostQuitMessage(0);
}
@@ -217,6 +219,7 @@ static void doChild(int argc, char** argv)
if (hFile == INVALID_HANDLE_VALUE)
return;
+ hChildFile = hFile;
/* Arguments */
childPrintf(hFile, "[Child]\r\n");
if (winetest_debug > 2)
@@ -654,10 +657,20 @@ static INT_PTR shell_execute_ex_(const char* file, int line,
c = GetPrivateProfileIntA("Child", "Failures", -1, child_file);
if (c > 0)
winetest_add_failures(c);
+ c = GetPrivateProfileIntA("Child", "Timeout", -1, child_file);
+ if (c > 0)
+ {
+ /* Inform caller of the timeout... these two following bits
+ * are directly returned by some Windows10 versions.
+ * Return the same bits when we detect a timeout in child.
+ */
+ SetLastError(ERROR_FILE_NOT_FOUND);
+ rc = SE_ERR_DDEFAIL;
+ }
/* When NOZONECHECKS is specified the environment variables are not
* inherited if the process does not have elevated privileges.
*/
- if ((mask & SEE_MASK_NOZONECHECKS) && skip_shlexec_tests)
+ else if ((mask & SEE_MASK_NOZONECHECKS) && skip_shlexec_tests)
{
okChildInt_(file, line, "ShlexecVarLE", 203);
okChildString_(file, line, "ShlexecVar", "", "");
Module: wine
Branch: master
Commit: f1b9c9a4c7731a954188f0efc4c5973fbb66e775
URL: https://gitlab.winehq.org/wine/wine/-/commit/f1b9c9a4c7731a954188f0efc4c597…
Author: Bernhard Kölbl <besentv(a)gmail.com>
Date: Mon Nov 7 12:27:03 2022 +0100
mf: Assume same up and downstream media type for copier creation.
The copier creation is only called, when the topo resolve code was
successful, thus it should always be given, that up and down media
types in the copier branch are compatible/the same at this point.
---
dlls/mf/topology_loader.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/dlls/mf/topology_loader.c b/dlls/mf/topology_loader.c
index 0c42a93511b..273d96a81ba 100644
--- a/dlls/mf/topology_loader.c
+++ b/dlls/mf/topology_loader.c
@@ -533,23 +533,21 @@ static BOOL topology_loader_is_node_d3d_aware(IMFTopologyNode *node)
static HRESULT topology_loader_create_copier(IMFTopologyNode *upstream_node, DWORD upstream_output,
IMFTopologyNode *downstream_node, unsigned int downstream_input, IMFTransform **copier)
{
- IMFMediaType *input_type = NULL, *output_type = NULL;
+ IMFMediaType *up_type = NULL;
IMFTransform *transform;
HRESULT hr;
if (FAILED(hr = MFCreateSampleCopierMFT(&transform)))
return hr;
- if (FAILED(hr = MFGetTopoNodeCurrentType(upstream_node, upstream_output, TRUE, &input_type)))
+ if (FAILED(hr = MFGetTopoNodeCurrentType(upstream_node, upstream_output, TRUE, &up_type)))
WARN("Failed to get upstream media type hr %#lx.\n", hr);
- if (SUCCEEDED(hr) && FAILED(hr = MFGetTopoNodeCurrentType(downstream_node, downstream_input, FALSE, &output_type)))
- WARN("Failed to get downstream media type hr %#lx.\n", hr);
-
- if (SUCCEEDED(hr) && FAILED(hr = IMFTransform_SetInputType(transform, 0, input_type, 0)))
+ if (SUCCEEDED(hr) && FAILED(hr = IMFTransform_SetInputType(transform, 0, up_type, 0)))
WARN("Input type wasn't accepted, hr %#lx.\n", hr);
- if (SUCCEEDED(hr) && FAILED(hr = IMFTransform_SetOutputType(transform, 0, output_type, 0)))
+ /* We assume, that up_type is set to a value compatible with the down node by the branch resolver. */
+ if (SUCCEEDED(hr) && FAILED(hr = IMFTransform_SetOutputType(transform, 0, up_type, 0)))
WARN("Output type wasn't accepted, hr %#lx.\n", hr);
if (SUCCEEDED(hr))
@@ -558,10 +556,8 @@ static HRESULT topology_loader_create_copier(IMFTopologyNode *upstream_node, DWO
IMFTransform_AddRef(*copier);
}
- if (input_type)
- IMFMediaType_Release(input_type);
- if (output_type)
- IMFMediaType_Release(output_type);
+ if (up_type)
+ IMFMediaType_Release(up_type);
IMFTransform_Release(transform);