Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 2af1ec49d958424e2b78f52ae3e3daca1d562b35 Mon Sep 17 00:00:00 2001
From da59fcb896bc204ea0ea1d866eeddef0c9b962c4 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 28 Mar 2015 08:18:10 +0100
Subject: [PATCH] dsound: Apply filters before sound is multiplied to speakers.
Expand All @@ -11,7 +11,7 @@ Based on a patch by Mark Harmstone.
3 files changed, 80 insertions(+), 35 deletions(-)

diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c
index 3085d86e5b5..91fa94b943e 100644
index 346cc4ceca3..e869c4dd251 100644
--- a/dlls/dsound/dsound.c
+++ b/dlls/dsound/dsound.c
@@ -234,6 +234,8 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
Expand All @@ -24,7 +24,7 @@ index 3085d86e5b5..91fa94b943e 100644
HeapFree(GetProcessHeap(), 0, device->cp_buffer);
HeapFree(GetProcessHeap(), 0, device->buffer);
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
index 2408f80ba82..2e23f222b03 100644
index f89588de4d9..d4e74ed0e82 100644
--- a/dlls/dsound/dsound_private.h
+++ b/dlls/dsound/dsound_private.h
@@ -89,8 +89,8 @@ struct DirectSoundDevice
Expand All @@ -39,7 +39,7 @@ index 2408f80ba82..2e23f222b03 100644
DSVOLUMEPAN volpan;

diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
index 1877d61cbf0..13bff1b9ae7 100644
index 50816b1a582..ddab45893ac 100644
--- a/dlls/dsound/mixer.c
+++ b/dlls/dsound/mixer.c
@@ -283,10 +283,9 @@ static inline float get_current_sample(const IDirectSoundBufferImpl *dsb,
Expand All @@ -54,7 +54,7 @@ index 1877d61cbf0..13bff1b9ae7 100644
UINT committed_samples = 0;
DWORD channel, i;

@@ -302,17 +301,16 @@ static UINT cp_fields_noresample(IDirectSoundBufferImpl *dsb, UINT count)
@@ -305,17 +304,16 @@ static UINT cp_fields_noresample(IDirectSoundBufferImpl *dsb, UINT count)

for (; i < count; i++)
for (channel = 0; channel < dsb->mix_channels; channel++)
Expand All @@ -75,7 +75,7 @@ index 1877d61cbf0..13bff1b9ae7 100644
UINT channels = dsb->mix_channels;

LONG64 freqAcc_start = *freqAccNum;
@@ -340,7 +338,7 @@ static UINT cp_fields_resample_lq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
@@ -343,7 +341,7 @@ static UINT cp_fields_resample_lq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
float s1 = get_current_sample(dsb, dsb->buffer->memory, dsb->buflen, idx, channel);
float s2 = get_current_sample(dsb, dsb->buffer->memory, dsb->buflen, idx + istride, channel);
float result = s1 * cur_freqAcc2 + s2 * cur_freqAcc;
Expand All @@ -84,7 +84,7 @@ index 1877d61cbf0..13bff1b9ae7 100644
}
}

@@ -348,11 +346,11 @@ static UINT cp_fields_resample_lq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
@@ -351,11 +349,11 @@ static UINT cp_fields_resample_lq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
return max_ipos;
}

Expand All @@ -98,7 +98,7 @@ index 1877d61cbf0..13bff1b9ae7 100644
UINT committed_samples = 0;

LONG64 freqAcc_start = *freqAccNum;
@@ -422,7 +420,7 @@ static UINT cp_fields_resample_hq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
@@ -430,23 +428,24 @@ static UINT cp_fields_resample_hq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
float* cache = &intermediate[channel * required_input + ipos];
for (j = 0; j < fir_used; j++)
sum += fir_copy[j] * cache[j];
Expand All @@ -107,7 +107,6 @@ index 1877d61cbf0..13bff1b9ae7 100644
}
}

@@ -431,16 +429,17 @@ static UINT cp_fields_resample_hq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
return max_ipos;
}

Expand All @@ -129,7 +128,7 @@ index 1877d61cbf0..13bff1b9ae7 100644

ipos = dsb->sec_mixpos + adv * dsb->pwfx->nBlockAlign;
if (ipos >= dsb->buflen) {
@@ -476,6 +475,21 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2)
@@ -482,6 +481,21 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2)
return buflen + ptr1 - ptr2;
}
}
Expand All @@ -151,7 +150,7 @@ index 1877d61cbf0..13bff1b9ae7 100644
/**
* Mix at most the given amount of data into the allocated temporary buffer
* of the given secondary buffer, starting from the dsb's first currently
@@ -491,34 +505,63 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2)
@@ -497,34 +511,63 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2)
*/
static void DSOUND_MixToTemporary(IDirectSoundBufferImpl *dsb, DWORD frames)
{
Expand Down Expand Up @@ -211,9 +210,9 @@ index 1877d61cbf0..13bff1b9ae7 100644
+ hr = IMediaObjectInPlace_Process(dsb->filters[i].inplace, frames * sizeof(float) * dsb->mix_channels,
+ (BYTE *)dsb->device->dsp_buffer, 0, DMO_INPLACE_NORMAL);
+ if (FAILED(hr))
+ WARN("IMediaObjectInPlace_Process failed for filter %u\n", i);
+ WARN("IMediaObjectInPlace_Process failed for filter %lu\n", i);
+ } else
+ WARN("filter %u has no inplace object - unsupported\n", i);
+ WARN("filter %lu has no inplace object - unsupported\n", i);
+ }
+ }

Expand All @@ -235,5 +234,5 @@ index 1877d61cbf0..13bff1b9ae7 100644

static void DSOUND_MixerVol(const IDirectSoundBufferImpl *dsb, INT frames)
--
2.33.0
2.35.1

10 changes: 5 additions & 5 deletions patches/dsound-EAX/0004-dsound-Add-EAX-propset-stubs.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From ee7fe13f2c520e1360e46f825790539b5bc2be3b Mon Sep 17 00:00:00 2001
From c2c33dff38e55d87582d8d6526b3d321ba577570 Mon Sep 17 00:00:00 2001
From: Mark Harmstone <mark@harmstone.com>
Date: Sun, 22 Mar 2015 13:58:53 +0000
Subject: [PATCH] dsound: Add EAX propset stubs.
Expand Down Expand Up @@ -68,7 +68,7 @@ index 304708c26da..c0e254f7a6e 100644
void DSOUND_RecalcVolPan(PDSVOLUMEPAN volpan) DECLSPEC_HIDDEN;
diff --git a/dlls/dsound/eax.c b/dlls/dsound/eax.c
new file mode 100644
index 00000000000..c30c7e1a51a
index 00000000000..c1264f977b6
--- /dev/null
+++ b/dlls/dsound/eax.c
@@ -0,0 +1,54 @@
Expand Down Expand Up @@ -109,7 +109,7 @@ index 00000000000..c30c7e1a51a
+ ULONG dwPropID, void *pInstanceData, ULONG cbInstanceData, void *pPropData,
+ ULONG cbPropData, ULONG *pcbReturned)
+{
+ TRACE("(buf=%p,guidPropSet=%s,dwPropID=%d,pInstanceData=%p,cbInstanceData=%d,pPropData=%p,cbPropData=%d,pcbReturned=%p)\n",
+ TRACE("(buf=%p,guidPropSet=%s,dwPropID=%lu,pInstanceData=%p,cbInstanceData=%lu,pPropData=%p,cbPropData=%lu,pcbReturned=%p)\n",
+ buf, debugstr_guid(guidPropSet), dwPropID, pInstanceData, cbInstanceData, pPropData, cbPropData, pcbReturned);
+
+ *pcbReturned = 0;
Expand All @@ -121,11 +121,11 @@ index 00000000000..c30c7e1a51a
+ ULONG dwPropID, void *pInstanceData, ULONG cbInstanceData, void *pPropData,
+ ULONG cbPropData)
+{
+ TRACE("(%p,%s,%d,%p,%d,%p,%d)\n",
+ TRACE("(%p,%s,%lu,%p,%lu,%p,%lu)\n",
+ buf, debugstr_guid(guidPropSet), dwPropID, pInstanceData, cbInstanceData, pPropData, cbPropData);
+
+ return E_PROP_ID_UNSUPPORTED;
+}
--
2.34.1
2.35.1

Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
From fe1de4d0856517f1ce59a3a5eb15a13f6ce4a9e6 Mon Sep 17 00:00:00 2001
From d60cc4b9f0a45a69813d0faf172a04c32aff3990 Mon Sep 17 00:00:00 2001
From: Mark Harmstone <mark@harmstone.com>
Date: Sun, 22 Mar 2015 14:22:02 +0000
Subject: dsound: Support getting and setting EAX properties.
Subject: [PATCH] dsound: Support getting and setting EAX properties.

---
dlls/dsound/dsound_eax.h | 8 +++
dlls/dsound/dsound_eax.h | 8 ++
dlls/dsound/dsound_private.h | 2 +
dlls/dsound/eax.c | 167 +++++++++++++++++++++++++++++++++++++++++++
dlls/dsound/eax.c | 167 +++++++++++++++++++++++++++++++++++
3 files changed, 177 insertions(+)

diff --git a/dlls/dsound/dsound_eax.h b/dlls/dsound/dsound_eax.h
index 06d961e..c90d82d 100644
index 06d961e006e..c90d82d9a3f 100644
--- a/dlls/dsound/dsound_eax.h
+++ b/dlls/dsound/dsound_eax.h
@@ -111,6 +111,14 @@ typedef struct {
Expand All @@ -29,10 +29,10 @@ index 06d961e..c90d82d 100644
}
#endif
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
index e4495b2..c16f770 100644
index c0e254f7a6e..461fbd4fdc8 100644
--- a/dlls/dsound/dsound_private.h
+++ b/dlls/dsound/dsound_private.h
@@ -99,6 +99,8 @@ struct DirectSoundDevice
@@ -97,6 +97,8 @@ struct DirectSoundDevice

normfunc normfunction;

Expand All @@ -42,7 +42,7 @@ index e4495b2..c16f770 100644
DS3DLISTENER ds3dl;
BOOL ds3dl_need_recalc;
diff --git a/dlls/dsound/eax.c b/dlls/dsound/eax.c
index 57d88e7..cdd03be 100644
index c1653a200c5..13471aec3a9 100644
--- a/dlls/dsound/eax.c
+++ b/dlls/dsound/eax.c
@@ -92,6 +92,22 @@ static const EFXEAXREVERBPROPERTIES efx_presets[] = {
Expand Down Expand Up @@ -145,7 +145,7 @@ index 57d88e7..cdd03be 100644
{
+ EAX_REVERBPROPERTIES *props;
+
TRACE("(%p,%s,%d,%p,%d,%p,%d)\n",
TRACE("(%p,%s,%lu,%p,%lu,%p,%lu)\n",
buf, debugstr_guid(guidPropSet), dwPropID, pInstanceData, cbInstanceData, pPropData, cbPropData);

+ if (IsEqualGUID(&DSPROPSETID_EAX_ReverbProperties, guidPropSet)) {
Expand Down Expand Up @@ -236,5 +236,5 @@ index 57d88e7..cdd03be 100644
return E_PROP_ID_UNSUPPORTED;
}
--
2.3.3
2.35.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From af21be49d511224d7299ef3d21f08ebfee66f3a5 Mon Sep 17 00:00:00 2001
From 38fec88e8dee99a012773648289b228245001c6c Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 5 Apr 2015 19:13:18 +0200
Subject: [PATCH] dsound: Allow disabling of EAX support in the registry.
Expand Down Expand Up @@ -97,7 +97,7 @@ index 0bca36b2540..7d488ab1e45 100644
ULONG dwPropID, void *pInstanceData, ULONG cbInstanceData, void *pPropData,
ULONG cbPropData, ULONG *pcbReturned) DECLSPEC_HIDDEN;
diff --git a/dlls/dsound/eax.c b/dlls/dsound/eax.c
index ef802b95a7d..570207709f0 100644
index 2244565897b..3e15ac59480 100644
--- a/dlls/dsound/eax.c
+++ b/dlls/dsound/eax.c
@@ -809,6 +809,28 @@ void free_eax_buffer(IDirectSoundBufferImpl *dsb)
Expand All @@ -106,7 +106,7 @@ index ef802b95a7d..570207709f0 100644

+BOOL WINAPI EAX_QuerySupport(REFGUID guidPropSet, ULONG dwPropID, ULONG *pTypeSupport)
+{
+ TRACE("(%s,%d,%p)\n", debugstr_guid(guidPropSet), dwPropID, pTypeSupport);
+ TRACE("(%s,%ld,%p)\n", debugstr_guid(guidPropSet), dwPropID, pTypeSupport);
+
+ if (!ds_eax_enabled)
+ return FALSE;
Expand All @@ -130,7 +130,7 @@ index ef802b95a7d..570207709f0 100644
ULONG dwPropID, void *pInstanceData, ULONG cbInstanceData, void *pPropData,
ULONG cbPropData, ULONG *pcbReturned)
@@ -816,6 +838,9 @@ HRESULT WINAPI EAX_Get(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
TRACE("(buf=%p,guidPropSet=%s,dwPropID=%d,pInstanceData=%p,cbInstanceData=%d,pPropData=%p,cbPropData=%d,pcbReturned=%p)\n",
TRACE("(buf=%p,guidPropSet=%s,dwPropID=%lu,pInstanceData=%p,cbInstanceData=%lu,pPropData=%p,cbPropData=%lu,pcbReturned=%p)\n",
buf, debugstr_guid(guidPropSet), dwPropID, pInstanceData, cbInstanceData, pPropData, cbPropData, pcbReturned);

+ if (!ds_eax_enabled)
Expand All @@ -140,7 +140,7 @@ index ef802b95a7d..570207709f0 100644

if (IsEqualGUID(&DSPROPSETID_EAX_ReverbProperties, guidPropSet)) {
@@ -922,6 +947,9 @@ HRESULT WINAPI EAX_Set(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
TRACE("(%p,%s,%d,%p,%d,%p,%d)\n",
TRACE("(%p,%s,%lu,%p,%lu,%p,%lu)\n",
buf, debugstr_guid(guidPropSet), dwPropID, pInstanceData, cbInstanceData, pPropData, cbPropData);

+ if (!ds_eax_enabled)
Expand All @@ -150,5 +150,5 @@ index ef802b95a7d..570207709f0 100644
buf->device->eax.using_eax = TRUE;

--
2.34.1
2.35.1

Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
From f2c56d857f9e30ba7d15e31c67e20c0698b3df9f Mon Sep 17 00:00:00 2001
From 3e15d6c0b64a1abe347ec4ab37fe260ee058850b Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
Date: Mon, 5 Oct 2015 21:56:15 -0600
Subject: dsound: Add stub support for DSPROPSETID_EAX20_ListenerProperties.
Subject: [PATCH] dsound: Add stub support for
DSPROPSETID_EAX20_ListenerProperties.

---
dlls/dsound/dsound_eax.h | 21 +++++++++++++++++++++
dlls/dsound/eax.c | 11 +++++++++++
2 files changed, 32 insertions(+)

diff --git a/dlls/dsound/dsound_eax.h b/dlls/dsound/dsound_eax.h
index a555a75..21450e8 100644
index a555a75e458..fe85179bf01 100644
--- a/dlls/dsound/dsound_eax.h
+++ b/dlls/dsound/dsound_eax.h
@@ -28,6 +28,7 @@ extern "C" {
Expand Down Expand Up @@ -48,7 +49,7 @@ index a555a75..21450e8 100644

#define AL_EAXREVERB_MAX_REFLECTIONS_DELAY (0.3f)
diff --git a/dlls/dsound/eax.c b/dlls/dsound/eax.c
index 857f924..297d444 100644
index 3e15ac59480..ed8dd204759 100644
--- a/dlls/dsound/eax.c
+++ b/dlls/dsound/eax.c
@@ -826,6 +826,11 @@ BOOL WINAPI EAX_QuerySupport(REFGUID guidPropSet, ULONG dwPropID, ULONG *pTypeSu
Expand All @@ -68,7 +69,7 @@ index 857f924..297d444 100644

return S_OK;
+ } else if (IsEqualGUID(&DSPROPSETID_EAX20_ListenerProperties, guidPropSet)) {
+ FIXME("Unsupported DSPROPSETID_EAX20_ListenerProperties: %d\n", dwPropID);
+ FIXME("Unsupported DSPROPSETID_EAX20_ListenerProperties: %ld\n", dwPropID);
+ return E_PROP_ID_UNSUPPORTED;
}

Expand All @@ -78,11 +79,11 @@ index 857f924..297d444 100644

return S_OK;
+ } else if (IsEqualGUID(&DSPROPSETID_EAX20_ListenerProperties, guidPropSet)) {
+ FIXME("Unsupported DSPROPSETID_EAX20_ListenerProperties: %d\n", dwPropID);
+ FIXME("Unsupported DSPROPSETID_EAX20_ListenerProperties: %ld\n", dwPropID);
+ return E_PROP_ID_UNSUPPORTED;
}

return E_PROP_ID_UNSUPPORTED;
--
2.6.0
2.35.1

Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
From 6147f0b2fe272cdce45785de1efcd323084d5ac7 Mon Sep 17 00:00:00 2001
From 84bf274c38399dad825c21a9a165730f07f6904c Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
Date: Wed, 7 Oct 2015 19:31:53 -0600
Subject: dsound: Add stub support for DSPROPSETID_EAX20_BufferProperties.
Subject: [PATCH] dsound: Add stub support for
DSPROPSETID_EAX20_BufferProperties.

---
dlls/dsound/dsound_eax.h | 20 ++++++++++++++++++++
dlls/dsound/eax.c | 16 ++++++++++++++++
2 files changed, 36 insertions(+)

diff --git a/dlls/dsound/dsound_eax.h b/dlls/dsound/dsound_eax.h
index fe85179..09563a0 100644
index fe85179bf01..09563a0d615 100644
--- a/dlls/dsound/dsound_eax.h
+++ b/dlls/dsound/dsound_eax.h
@@ -29,6 +29,7 @@ extern "C" {
Expand Down Expand Up @@ -47,7 +48,7 @@ index fe85179..09563a0 100644

#define AL_EAXREVERB_MAX_REFLECTIONS_DELAY (0.3f)
diff --git a/dlls/dsound/eax.c b/dlls/dsound/eax.c
index 297d444..12c290a 100644
index ed8dd204759..9237aa055e0 100644
--- a/dlls/dsound/eax.c
+++ b/dlls/dsound/eax.c
@@ -831,8 +831,14 @@ BOOL WINAPI EAX_QuerySupport(REFGUID guidPropSet, ULONG dwPropID, ULONG *pTypeSu
Expand All @@ -61,37 +62,37 @@ index 297d444..12c290a 100644
+ }
}

+ FIXME("(%s,%d,%p)\n", debugstr_guid(guidPropSet), dwPropID, pTypeSupport);
+ FIXME("(%s,%ld,%p)\n", debugstr_guid(guidPropSet), dwPropID, pTypeSupport);
return FALSE;
}

@@ -941,8 +947,13 @@ HRESULT WINAPI EAX_Get(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
} else if (IsEqualGUID(&DSPROPSETID_EAX20_ListenerProperties, guidPropSet)) {
FIXME("Unsupported DSPROPSETID_EAX20_ListenerProperties: %d\n", dwPropID);
FIXME("Unsupported DSPROPSETID_EAX20_ListenerProperties: %ld\n", dwPropID);
return E_PROP_ID_UNSUPPORTED;
+ } else if (IsEqualGUID(&DSPROPSETID_EAX20_BufferProperties, guidPropSet)) {
+ FIXME("Unsupported DSPROPSETID_EAX20_BufferProperties: %d\n", dwPropID);
+ FIXME("Unsupported DSPROPSETID_EAX20_BufferProperties: %ld\n", dwPropID);
+ return E_PROP_ID_UNSUPPORTED;
}

+ FIXME("(buf=%p,guidPropSet=%s,dwPropID=%d,pInstanceData=%p,cbInstanceData=%d,pPropData=%p,cbPropData=%d,pcbReturned=%p)\n",
+ FIXME("(buf=%p,guidPropSet=%s,dwPropID=%ld,pInstanceData=%p,cbInstanceData=%ld,pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n",
+ buf, debugstr_guid(guidPropSet), dwPropID, pInstanceData, cbInstanceData, pPropData, cbPropData, pcbReturned);
return E_PROP_ID_UNSUPPORTED;
}

@@ -1073,7 +1084,12 @@ HRESULT WINAPI EAX_Set(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
} else if (IsEqualGUID(&DSPROPSETID_EAX20_ListenerProperties, guidPropSet)) {
FIXME("Unsupported DSPROPSETID_EAX20_ListenerProperties: %d\n", dwPropID);
FIXME("Unsupported DSPROPSETID_EAX20_ListenerProperties: %ld\n", dwPropID);
return E_PROP_ID_UNSUPPORTED;
+ } else if (IsEqualGUID(&DSPROPSETID_EAX20_BufferProperties, guidPropSet)) {
+ FIXME("Unsupported DSPROPSETID_EAX20_BufferProperties: %d\n", dwPropID);
+ FIXME("Unsupported DSPROPSETID_EAX20_BufferProperties: %ld\n", dwPropID);
+ return E_PROP_ID_UNSUPPORTED;
}

+ FIXME("(%p,%s,%d,%p,%d,%p,%d)\n",
+ FIXME("(%p,%s,%ld,%p,%ld,%p,%ld)\n",
+ buf, debugstr_guid(guidPropSet), dwPropID, pInstanceData, cbInstanceData, pPropData, cbPropData);
return E_PROP_ID_UNSUPPORTED;
}
--
2.6.0
2.35.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From b332a35d8382c6fc77ba663c5db98a6374518bfe Mon Sep 17 00:00:00 2001
From cb7356ad69c333277313e305cee4dc17b765a184 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 25 Jan 2021 19:14:32 +1100
Subject: [PATCH] dsound: Fake success for EAX Set Buffer/ListenerProperties
Expand All @@ -24,25 +24,25 @@ index 39ce9101266..ba93989f372 100644

return E_PROP_ID_UNSUPPORTED;
diff --git a/dlls/dsound/eax.c b/dlls/dsound/eax.c
index 6a6d22bc031..b3f48cdb5bd 100644
index 9237aa055e0..7034b5fca07 100644
--- a/dlls/dsound/eax.c
+++ b/dlls/dsound/eax.c
@@ -1082,11 +1082,11 @@ HRESULT WINAPI EAX_Set(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,

return S_OK;
} else if (IsEqualGUID(&DSPROPSETID_EAX20_ListenerProperties, guidPropSet)) {
- FIXME("Unsupported DSPROPSETID_EAX20_ListenerProperties: %d\n", dwPropID);
- FIXME("Unsupported DSPROPSETID_EAX20_ListenerProperties: %ld\n", dwPropID);
- return E_PROP_ID_UNSUPPORTED;
+ FIXME("Unsupported DSPROPSETID_EAX20_ListenerProperties: %d - Faking Success\n", dwPropID);
+ FIXME("Unsupported DSPROPSETID_EAX20_ListenerProperties: %ld - Faking Success\n", dwPropID);
+ return S_OK;
} else if (IsEqualGUID(&DSPROPSETID_EAX20_BufferProperties, guidPropSet)) {
- FIXME("Unsupported DSPROPSETID_EAX20_BufferProperties: %d\n", dwPropID);
- FIXME("Unsupported DSPROPSETID_EAX20_BufferProperties: %ld\n", dwPropID);
- return E_PROP_ID_UNSUPPORTED;
+ FIXME("Unsupported DSPROPSETID_EAX20_BufferProperties: %d - Faking Success\n", dwPropID);
+ FIXME("Unsupported DSPROPSETID_EAX20_BufferProperties: %ld - Faking Success\n", dwPropID);
+ return S_OK;
}

FIXME("(%p,%s,%d,%p,%d,%p,%d)\n",
FIXME("(%p,%s,%ld,%p,%ld,%p,%ld)\n",
--
2.34.1
2.35.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 8c7187f5501fff70df81612dfbdd084e67605189 Mon Sep 17 00:00:00 2001
From bf4cc6cfca946ff719763bb7be25fe268577f0d3 Mon Sep 17 00:00:00 2001
From: Lucian Poston <lucianposton@pm.me>
Date: Mon, 21 May 2018 18:13:00 -0700
Subject: [PATCH] dwrite: Use font fallback when mapping characters
Expand All @@ -7,11 +7,11 @@ Signed-off-by: Lucian Poston <lucianposton@pm.me>
---
dlls/dwrite/analyzer.c | 77 +++++++++++++++++++++++++++++---------
dlls/dwrite/layout.c | 6 +++
dlls/dwrite/tests/layout.c | 54 +++++---------------------
3 files changed, 74 insertions(+), 63 deletions(-)
dlls/dwrite/tests/layout.c | 54 ++++----------------------
3 files changed, 73 insertions(+), 64 deletions(-)

diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c
index 13ccf8e4434..c535b0cf49d 100644
index 7ffcfa8070c..aab309c2a8c 100644
--- a/dlls/dwrite/analyzer.c
+++ b/dlls/dwrite/analyzer.c
@@ -2094,6 +2094,7 @@ static HRESULT fallback_get_fallback_font(struct dwrite_fontfallback *fallback,
Expand Down Expand Up @@ -124,7 +124,7 @@ index 13ccf8e4434..c535b0cf49d 100644
free(buff);
return hr;
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
index d4aa49c6a6c..cda50c20777 100644
index ba80c3f70e8..c7845f9b675 100644
--- a/dlls/dwrite/layout.c
+++ b/dlls/dwrite/layout.c
@@ -725,6 +725,12 @@ static HRESULT layout_resolve_fonts(struct dwrite_textlayout *layout)
Expand All @@ -141,10 +141,10 @@ index d4aa49c6a6c..cda50c20777 100644
IDWriteFont_Release(font);
if (FAILED(hr)) {
diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c
index 096fc554253..b622aeb4239 100644
index 3efedd3df95..07687c76c60 100644
--- a/dlls/dwrite/tests/layout.c
+++ b/dlls/dwrite/tests/layout.c
@@ -3368,35 +3368,23 @@ static void test_GetMetrics(void)
@@ -3366,35 +3366,23 @@ static void test_GetMetrics(void)

count = 0;
hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
Expand Down Expand Up @@ -180,45 +180,48 @@ index 096fc554253..b622aeb4239 100644
ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);

IDWriteTextLayout_Release(layout);
@@ -4690,12 +4678,9 @@ static void test_MapCharacters(void)
@@ -4688,16 +4676,12 @@ static void test_MapCharacters(void)
font = NULL;
hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 1, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL,
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale);
-todo_wine {
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(mappedlength == 1, "got %u\n", mappedlength);
-}
ok(scale == 1.0f, "got %f\n", scale);
- todo_wine
ok(font != NULL, "got %p\n", font);
if (font) {
-if (font) {
IDWriteFont_Release(font);
@@ -4707,16 +4692,13 @@ if (font) {
-}
+
/* same Latin text, full length */
g_source = L"abc";
mappedlength = 0;
@@ -4705,16 +4689,12 @@ if (font) {
font = NULL;
hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 3, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL,
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale);
-todo_wine {
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(mappedlength == 3, "got %u\n", mappedlength);
-}
ok(scale == 1.0f, "got %f\n", scale);
- todo_wine
ok(font != NULL, "got %p\n", font);
-if (font) {
- IDWriteFont_Release(font);
IDWriteFont_Release(font);
-}
+ if (font) {
+ IDWriteFont_Release(font);
+ }
+
/* string 'a\x3058b' */
g_source = str2W;
mappedlength = 0;
@@ -4724,32 +4706,24 @@ if (font) {
@@ -4722,32 +4702,24 @@ if (font) {
font = NULL;
hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 3, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL,
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale);
-todo_wine {
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(mappedlength == 1, "got %u\n", mappedlength);
-}
ok(scale == 1.0f, "got %f\n", scale);
Expand All @@ -235,7 +238,7 @@ index 096fc554253..b622aeb4239 100644
hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 1, 2, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL,
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale);
-todo_wine {
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(mappedlength == 1, "got %u\n", mappedlength);
-}
ok(scale == 1.0f, "got %f\n", scale);
Expand All @@ -248,7 +251,7 @@ index 096fc554253..b622aeb4239 100644
/* Try with explicit collection, Tahoma will be forced. */
/* 1. Latin part */
g_source = str2W;
@@ -4772,7 +4746,10 @@ if (font) {
@@ -4770,7 +4742,10 @@ if (font) {
IDWriteLocalizedStrings_Release(strings);
IDWriteFont_Release(font);

Expand All @@ -260,15 +263,15 @@ index 096fc554253..b622aeb4239 100644
g_source = str2W;
mappedlength = 0;
scale = 0.0f;
@@ -4782,7 +4759,6 @@ if (font) {
ok(hr == S_OK, "got 0x%08x\n", hr);
@@ -4780,7 +4755,6 @@ if (font) {
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(mappedlength == 1, "got %u\n", mappedlength);
ok(scale == 1.0f, "got %f\n", scale);
- ok(font != NULL, "got %p\n", font);

exists = FALSE;
hr = IDWriteFont_GetInformationalStrings(font, DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES, &strings, &exists);
@@ -6669,34 +6645,22 @@ static void test_GetMetrics_with_custom_fontcollection(void)
@@ -6667,34 +6641,22 @@ static void test_GetMetrics_with_custom_fontcollection(void)
ok(hr == S_OK, "got 0x%08x\n", hr);
count = 9999;
hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
Expand Down Expand Up @@ -304,5 +307,5 @@ index 096fc554253..b622aeb4239 100644
IDWriteTextLayout_Release(layout);

--
2.34.1
2.35.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 4417ee6abe20066cb1bbc784c0705885a07b3966 Mon Sep 17 00:00:00 2001
From fb71b7bedd8d2863a588473dc09a04dcd8b43b44 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Wed, 13 Jun 2018 22:25:40 -0500
Subject: [PATCH] kernel32/tests: Mark some existing tests as failing under
Expand All @@ -9,27 +9,27 @@ Subject: [PATCH] kernel32/tests: Mark some existing tests as failing under
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dlls/kernel32/tests/sync.c b/dlls/kernel32/tests/sync.c
index 2a47abf342c..ef900dcfc04 100644
index 93cae1c84d5..b158ac905fd 100644
--- a/dlls/kernel32/tests/sync.c
+++ b/dlls/kernel32/tests/sync.c
@@ -218,7 +218,8 @@ todo_wine
@@ -223,7 +223,8 @@ static void test_mutex(void)
SetLastError(0xdeadbeef);
hOpened = OpenMutexA(GENERIC_READ | GENERIC_WRITE, FALSE, "WineTestMutex");
ok(hOpened != NULL, "OpenMutex failed with error %d\n", GetLastError());
ok(hOpened != NULL, "OpenMutex failed with error %ld\n", GetLastError());
- wait_ret = WaitForSingleObject(hOpened, INFINITE);
+ wait_ret = WaitForSingleObject(hOpened, 0);
+todo_wine_if(getenv("WINEESYNC")) /* XFAIL: validation is not implemented */
ok(wait_ret == WAIT_FAILED, "WaitForSingleObject succeeded\n");
CloseHandle(hOpened);

@@ -249,6 +250,7 @@ todo_wine
@@ -254,6 +255,7 @@ static void test_mutex(void)

SetLastError(0xdeadbeef);
ret = ReleaseMutex(hCreated);
+todo_wine_if(getenv("WINEESYNC")) /* XFAIL: due to the above */
ok(!ret && (GetLastError() == ERROR_NOT_OWNER),
"ReleaseMutex should have failed with ERROR_NOT_OWNER instead of %d\n", GetLastError());
"ReleaseMutex should have failed with ERROR_NOT_OWNER instead of %ld\n", GetLastError());

--
2.28.0
2.35.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 775bf85e0e0614cbfe4494d7b8c47159cae5f47a Mon Sep 17 00:00:00 2001
From 8592fcfbee64b776ce90c5edc5e9b67350665213 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Wed, 13 Jun 2018 22:40:47 -0500
Subject: [PATCH] kernel32/tests: Add some semaphore tests.
Expand All @@ -8,10 +8,10 @@ Subject: [PATCH] kernel32/tests: Add some semaphore tests.
1 file changed, 97 insertions(+), 1 deletion(-)

diff --git a/dlls/kernel32/tests/sync.c b/dlls/kernel32/tests/sync.c
index ef900dcfc04..26ccfdd4a54 100644
index b158ac905fd..ad6ab1adc96 100644
--- a/dlls/kernel32/tests/sync.c
+++ b/dlls/kernel32/tests/sync.c
@@ -577,7 +577,10 @@ static void test_event(void)
@@ -582,7 +582,10 @@ static void test_event(void)

static void test_semaphore(void)
{
Expand All @@ -23,106 +23,106 @@ index ef900dcfc04..26ccfdd4a54 100644

/* test case sensitivity */

@@ -619,6 +622,99 @@ static void test_semaphore(void)
ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError());
@@ -624,6 +627,99 @@ static void test_semaphore(void)
ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError());

CloseHandle( handle );
+
+ handle = CreateSemaphoreA( NULL, 0, 5, NULL );
+ ok(!!handle, "CreateSemaphore failed: %u\n", GetLastError());
+ ok(!!handle, "CreateSemaphore failed: %lu\n", GetLastError());
+
+ ret = WaitForSingleObject( handle, 0 );
+ ok(ret == WAIT_TIMEOUT, "got %u\n", ret);
+ ok(ret == WAIT_TIMEOUT, "got %lu\n", ret);
+
+ ret = ReleaseSemaphore( handle, 1, &prev );
+ ok(ret, "got error %u\n", GetLastError());
+ ok(prev == 0, "got prev %d\n", prev);
+ ok(ret, "got error %lu\n", GetLastError());
+ ok(prev == 0, "got prev %ld\n", prev);
+
+ ret = ReleaseSemaphore( handle, 1, &prev );
+ ok(ret, "got error %u\n", GetLastError());
+ ok(prev == 1, "got prev %d\n", prev);
+ ok(ret, "got error %lu\n", GetLastError());
+ ok(prev == 1, "got prev %ld\n", prev);
+
+ ret = ReleaseSemaphore( handle, 5, &prev );
+ ok(!ret, "got %d\n", ret);
+ ok(GetLastError() == ERROR_TOO_MANY_POSTS, "got error %u\n", GetLastError());
+ ok(prev == 1, "got prev %d\n", prev);
+ ok(!ret, "got %ld\n", ret);
+ ok(GetLastError() == ERROR_TOO_MANY_POSTS, "got error %lu\n", GetLastError());
+ ok(prev == 1, "got prev %ld\n", prev);
+
+ ret = ReleaseSemaphore( handle, 2, &prev );
+ ok(ret, "got error %u\n", GetLastError());
+ ok(prev == 2, "got prev %d\n", prev);
+ ok(ret, "got error %lu\n", GetLastError());
+ ok(prev == 2, "got prev %ld\n", prev);
+
+ ret = ReleaseSemaphore( handle, 1, &prev );
+ ok(ret, "got error %u\n", GetLastError());
+ ok(prev == 4, "got prev %d\n", prev);
+ ok(ret, "got error %lu\n", GetLastError());
+ ok(prev == 4, "got prev %ld\n", prev);
+
+ for (i = 0; i < 5; i++)
+ {
+ ret = WaitForSingleObject( handle, 0 );
+ ok(ret == 0, "got %u\n", ret);
+ ok(ret == 0, "got %lu\n", ret);
+ }
+
+ ret = WaitForSingleObject( handle, 0 );
+ ok(ret == WAIT_TIMEOUT, "got %u\n", ret);
+ ok(ret == WAIT_TIMEOUT, "got %lu\n", ret);
+
+ handle2 = CreateSemaphoreA( NULL, 3, 5, NULL );
+ ok(!!handle2, "CreateSemaphore failed: %u\n", GetLastError());
+ ok(!!handle2, "CreateSemaphore failed: %lu\n", GetLastError());
+
+ ret = ReleaseSemaphore( handle2, 1, &prev );
+ ok(ret, "got error %u\n", GetLastError());
+ ok(prev == 3, "got prev %d\n", prev);
+ ok(ret, "got error %lu\n", GetLastError());
+ ok(prev == 3, "got prev %ld\n", prev);
+
+ for (i = 0; i < 4; i++)
+ {
+ ret = WaitForSingleObject( handle2, 0 );
+ ok(ret == 0, "got %u\n", ret);
+ ok(ret == 0, "got %lu\n", ret);
+ }
+
+ ret = WaitForSingleObject( handle2, 0 );
+ ok(ret == WAIT_TIMEOUT, "got %u\n", ret);
+ ok(ret == WAIT_TIMEOUT, "got %lu\n", ret);
+
+ handles[0] = handle;
+ handles[1] = handle2;
+
+ ret = WaitForMultipleObjects( 2, handles, FALSE, 0 );
+ ok(ret == WAIT_TIMEOUT, "got %u\n", ret);
+ ok(ret == WAIT_TIMEOUT, "got %lu\n", ret);
+
+ ReleaseSemaphore( handle, 1, NULL );
+ ReleaseSemaphore( handle2, 1, NULL );
+
+ ret = WaitForMultipleObjects( 2, handles, FALSE, 0 );
+ ok(ret == 0, "got %u\n", ret);
+ ok(ret == 0, "got %lu\n", ret);
+
+ ret = WaitForMultipleObjects( 2, handles, FALSE, 0 );
+ ok(ret == 1, "got %u\n", ret);
+ ok(ret == 1, "got %lu\n", ret);
+
+ ret = WaitForMultipleObjects( 2, handles, FALSE, 0 );
+ ok(ret == WAIT_TIMEOUT, "got %u\n", ret);
+ ok(ret == WAIT_TIMEOUT, "got %lu\n", ret);
+
+ ReleaseSemaphore( handle, 1, NULL );
+ ReleaseSemaphore( handle2, 1, NULL );
+
+ ret = WaitForMultipleObjects( 2, handles, TRUE, 0 );
+ ok(ret == 0, "got %u\n", ret);
+ ok(ret == 0, "got %lu\n", ret);
+
+ ret = WaitForMultipleObjects( 2, handles, FALSE, 0 );
+ ok(ret == WAIT_TIMEOUT, "got %u\n", ret);
+ ok(ret == WAIT_TIMEOUT, "got %lu\n", ret);
+
+ ReleaseSemaphore( handle, 1, NULL );
+
+ ret = WaitForMultipleObjects( 2, handles, TRUE, 0 );
+ ok(ret == WAIT_TIMEOUT, "got %u\n", ret);
+ ok(ret == WAIT_TIMEOUT, "got %lu\n", ret);
+
+ ret = WaitForSingleObject( handle, 0 );
+ ok(ret == 0, "got %u\n", ret);
+ ok(ret == 0, "got %lu\n", ret);
+
+ ret = CloseHandle( handle );
+ ok(ret, "got error %u\n", ret);
+ ok(ret, "got error %lu\n", ret);
+
+ ret = CloseHandle( handle2 );
+ ok(ret, "got error %u\n", ret);
+ ok(ret, "got error %lu\n", ret);
}

static void test_waitable_timer(void)
--
2.28.0
2.35.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 30a65d88cd062f09f88513c377d2c7780e92e05d Mon Sep 17 00:00:00 2001
From 8790bcd9d5ff4b2e38ca00a4ba7d1d884924b25e Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Wed, 13 Jun 2018 22:59:37 -0500
Subject: [PATCH] kernel32/tests: Add some event tests.
Expand All @@ -8,10 +8,10 @@ Subject: [PATCH] kernel32/tests: Add some event tests.
1 file changed, 118 insertions(+), 1 deletion(-)

diff --git a/dlls/kernel32/tests/sync.c b/dlls/kernel32/tests/sync.c
index 26ccfdd4a54..ea54cb069df 100644
index ad6ab1adc96..95f51f54b83 100644
--- a/dlls/kernel32/tests/sync.c
+++ b/dlls/kernel32/tests/sync.c
@@ -464,12 +464,13 @@ static void test_slist(void)
@@ -469,12 +469,13 @@ static void test_slist(void)

static void test_event(void)
{
Expand All @@ -26,129 +26,129 @@ index 26ccfdd4a54..ea54cb069df 100644

/* no sd */
handle = CreateEventA(NULL, FALSE, FALSE, __FILE__ ": Test Event");
@@ -573,6 +574,122 @@ static void test_event(void)
ok( ret, "QueryMemoryResourceNotification failed err %u\n", GetLastError() );
@@ -578,6 +579,122 @@ static void test_event(void)
ok( ret, "QueryMemoryResourceNotification failed err %lu\n", GetLastError() );
ok( val == FALSE || val == TRUE, "wrong value %u\n", val );
CloseHandle( handle );
+
+ handle = CreateEventA( NULL, TRUE, FALSE, NULL );
+ ok(!!handle, "got error %u\n", GetLastError());
+ ok(!!handle, "got error %lu\n", GetLastError());
+
+ ret = WaitForSingleObject( handle, 0 );
+ ok(ret == WAIT_TIMEOUT, "got %u\n", ret);
+ ok(ret == WAIT_TIMEOUT, "got %lu\n", ret);
+
+ ret = SetEvent( handle );
+ ok(ret, "got error %u\n", GetLastError());
+ ok(ret, "got error %lu\n", GetLastError());
+
+ ret = SetEvent( handle );
+ ok(ret, "got error %u\n", GetLastError());
+ ok(ret, "got error %lu\n", GetLastError());
+
+ for (i = 0; i < 100; i++)
+ {
+ ret = WaitForSingleObject( handle, 0 );
+ ok(ret == 0, "got %u\n", ret);
+ ok(ret == 0, "got %lu\n", ret);
+ }
+
+ ret = ResetEvent( handle );
+ ok(ret, "got error %u\n", GetLastError());
+ ok(ret, "got error %lu\n", GetLastError());
+
+ ret = ResetEvent( handle );
+ ok(ret, "got error %u\n", GetLastError());
+ ok(ret, "got error %lu\n", GetLastError());
+
+ ret = WaitForSingleObject( handle, 0 );
+ ok(ret == WAIT_TIMEOUT, "got %u\n", ret);
+ ok(ret == WAIT_TIMEOUT, "got %lu\n", ret);
+
+ handle2 = CreateEventA( NULL, FALSE, TRUE, NULL );
+ ok(!!handle2, "got error %u\n", GetLastError());
+ ok(!!handle2, "got error %lu\n", GetLastError());
+
+ ret = WaitForSingleObject( handle2, 0 );
+ ok(ret == 0, "got %u\n", ret);
+ ok(ret == 0, "got %lu\n", ret);
+
+ ret = WaitForSingleObject( handle2, 0 );
+ ok(ret == WAIT_TIMEOUT, "got %u\n", ret);
+ ok(ret == WAIT_TIMEOUT, "got %lu\n", ret);
+
+ ret = SetEvent( handle2 );
+ ok(ret, "got error %u\n", GetLastError());
+ ok(ret, "got error %lu\n", GetLastError());
+
+ ret = SetEvent( handle2 );
+ ok(ret, "got error %u\n", GetLastError());
+ ok(ret, "got error %lu\n", GetLastError());
+
+ ret = ResetEvent( handle2 );
+ ok(ret, "got error %u\n", GetLastError());
+ ok(ret, "got error %lu\n", GetLastError());
+
+ ret = ResetEvent( handle2 );
+ ok(ret, "got error %u\n", GetLastError());
+ ok(ret, "got error %lu\n", GetLastError());
+
+ ret = WaitForSingleObject( handle2, 0 );
+ ok(ret == WAIT_TIMEOUT, "got %u\n", ret);
+ ok(ret == WAIT_TIMEOUT, "got %lu\n", ret);
+
+ handles[0] = handle;
+ handles[1] = handle2;
+
+ ret = WaitForMultipleObjects( 2, handles, FALSE, 0 );
+ ok(ret == WAIT_TIMEOUT, "got %u\n", ret);
+ ok(ret == WAIT_TIMEOUT, "got %lu\n", ret);
+
+ SetEvent( handle );
+ SetEvent( handle2 );
+
+ ret = WaitForMultipleObjects( 2, handles, FALSE, 0 );
+ ok(ret == 0, "got %u\n", ret);
+ ok(ret == 0, "got %lu\n", ret);
+
+ ret = WaitForMultipleObjects( 2, handles, FALSE, 0 );
+ ok(ret == 0, "got %u\n", ret);
+ ok(ret == 0, "got %lu\n", ret);
+
+ ret = WaitForSingleObject( handle2, 0 );
+ ok(ret == 0, "got %u\n", ret);
+ ok(ret == 0, "got %lu\n", ret);
+
+ ResetEvent( handle );
+ SetEvent( handle2 );
+
+ ret = WaitForMultipleObjects( 2, handles, FALSE, 0 );
+ ok(ret == 1, "got %u\n", ret);
+ ok(ret == 1, "got %lu\n", ret);
+
+ ret = WaitForMultipleObjects( 2, handles, FALSE, 0 );
+ ok(ret == WAIT_TIMEOUT, "got %u\n", ret);
+ ok(ret == WAIT_TIMEOUT, "got %lu\n", ret);
+
+ SetEvent( handle );
+ SetEvent( handle2 );
+
+ ret = WaitForMultipleObjects( 2, handles, TRUE, 0 );
+ ok(ret == 0, "got %u\n", ret);
+ ok(ret == 0, "got %lu\n", ret);
+
+ ret = WaitForMultipleObjects( 2, handles, TRUE, 0 );
+ ok(ret == WAIT_TIMEOUT, "got %u\n", ret);
+ ok(ret == WAIT_TIMEOUT, "got %lu\n", ret);
+
+ SetEvent( handle2 );
+ ResetEvent( handle );
+
+ ret = WaitForMultipleObjects( 2, handles, TRUE, 0 );
+ ok(ret == WAIT_TIMEOUT, "got %u\n", ret);
+ ok(ret == WAIT_TIMEOUT, "got %lu\n", ret);
+
+ ret = WaitForSingleObject( handle2, 0 );
+ ok(ret == 0, "got %u\n", ret);
+ ok(ret == 0, "got %lu\n", ret);
+
+ handles[0] = handle2;
+ handles[1] = handle;
+ SetEvent( handle );
+ SetEvent( handle2 );
+
+ ret = WaitForMultipleObjects( 2, handles, FALSE, 0 );
+ ok(ret == 0, "got %u\n", ret);
+ ok(ret == 0, "got %lu\n", ret);
+
+ ret = WaitForMultipleObjects( 2, handles, FALSE, 0 );
+ ok(ret == 1, "got %u\n", ret);
+ ok(ret == 1, "got %lu\n", ret);
+
+ ret = WaitForMultipleObjects( 2, handles, FALSE, 0 );
+ ok(ret == 1, "got %u\n", ret);
+ ok(ret == 1, "got %lu\n", ret);
+
+ ret = CloseHandle( handle );
+ ok(ret, "got error %u\n", GetLastError());
+ ok(ret, "got error %lu\n", GetLastError());
+
+ ret = CloseHandle( handle2 );
+ ok(ret, "got error %u\n", GetLastError());
+ ok(ret, "got error %lu\n", GetLastError());
}

static void test_semaphore(void)
--
2.28.0
2.35.1

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ index ea54cb069df..790b7bfe797 100644
+ DWORD ret;
+
+ ret = WaitForSingleObject( mutex, 0 );
+ ok(ret == expect, "expected %u, got %u\n", expect, ret);
+ ok(ret == expect, "expected %lu, got %lu\n", expect, ret);
+
+ if (!ret) ReleaseMutex( mutex );
+ return 0;
Expand All @@ -41,11 +41,11 @@ index ea54cb069df..790b7bfe797 100644
CloseHandle(hCreated);
+
+ mutex = CreateMutexA( NULL, FALSE, NULL );
+ ok(!!mutex, "got error %u\n", GetLastError());
+ ok(!!mutex, "got error %lu\n", GetLastError());
+
+ ret = ReleaseMutex( mutex );
+ ok(!ret, "got %d\n", ret);
+ ok(GetLastError() == ERROR_NOT_OWNER, "got error %u\n", GetLastError());
+ ok(GetLastError() == ERROR_NOT_OWNER, "got error %lu\n", GetLastError());
+
+ for (i = 0; i < 100; i++)
+ {
Expand All @@ -56,12 +56,12 @@ index ea54cb069df..790b7bfe797 100644
+ for (i = 0; i < 100; i++)
+ {
+ ret = ReleaseMutex( mutex );
+ ok(ret, "got error %u\n", GetLastError());
+ ok(ret, "got error %lu\n", GetLastError());
+ }
+
+ ret = ReleaseMutex( mutex );
+ ok(!ret, "got %d\n", ret);
+ ok(GetLastError() == ERROR_NOT_OWNER, "got error %u\n", GetLastError());
+ ok(GetLastError() == ERROR_NOT_OWNER, "got error %lu\n", GetLastError());
+
+ thread = CreateThread( NULL, 0, mutex_thread, (void *)0, 0, NULL );
+ ret = WaitForSingleObject( thread, 2000 );
Expand All @@ -74,21 +74,21 @@ index ea54cb069df..790b7bfe797 100644
+ ok(ret == 0, "wait failed: %u\n", ret);
+
+ ret = ReleaseMutex( mutex );
+ ok(ret, "got error %u\n", GetLastError());
+ ok(ret, "got error %lu\n", GetLastError());
+
+ thread = CreateThread( NULL, 0, mutex_thread, (void *)0, 0, NULL );
+ ret = WaitForSingleObject( thread, 2000 );
+ ok(ret == 0, "wait failed: %u\n", ret);
+
+ mutex2 = CreateMutexA( NULL, TRUE, NULL );
+ ok(!!mutex2, "got error %u\n", GetLastError());
+ ok(!!mutex2, "got error %lu\n", GetLastError());
+
+ ret = ReleaseMutex( mutex2 );
+ ok(ret, "got error %u\n", GetLastError());
+ ok(ret, "got error %lu\n", GetLastError());
+
+ ret = ReleaseMutex( mutex2 );
+ ok(!ret, "got %d\n", ret);
+ ok(GetLastError() == ERROR_NOT_OWNER, "got error %u\n", GetLastError());
+ ok(GetLastError() == ERROR_NOT_OWNER, "got error %lu\n", GetLastError());
+
+ mutices[0] = mutex;
+ mutices[1] = mutex2;
Expand All @@ -97,26 +97,26 @@ index ea54cb069df..790b7bfe797 100644
+ ok(ret == 0, "got %u\n", ret);
+
+ ret = ReleaseMutex( mutex );
+ ok(ret, "got error %u\n", GetLastError());
+ ok(ret, "got error %lu\n", GetLastError());
+
+ ret = ReleaseMutex( mutex2 );
+ ok(!ret, "got %d\n", ret);
+ ok(GetLastError() == ERROR_NOT_OWNER, "got error %u\n", GetLastError());
+ ok(GetLastError() == ERROR_NOT_OWNER, "got error %lu\n", GetLastError());
+
+ ret = WaitForMultipleObjects( 2, mutices, TRUE, 0 );
+ ok(ret == 0, "got %u\n", ret);
+
+ ret = ReleaseMutex( mutex );
+ ok(ret, "got error %u\n", GetLastError());
+ ok(ret, "got error %lu\n", GetLastError());
+
+ ret = ReleaseMutex( mutex2 );
+ ok(ret, "got error %u\n", GetLastError());
+ ok(ret, "got error %lu\n", GetLastError());
+
+ ret = CloseHandle( mutex );
+ ok(ret, "got error %u\n", GetLastError());
+ ok(ret, "got error %lu\n", GetLastError());
+
+ ret = CloseHandle( mutex2 );
+ ok(ret, "got error %u\n", GetLastError());
+ ok(ret, "got error %lu\n", GetLastError());
+
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 0596227ece99953785e8165d9c983114da77721c Mon Sep 17 00:00:00 2001
From 9d683eab1efae1c8dcd5b571e8a31ac0f13fc563 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Wed, 13 Jun 2018 23:58:01 -0500
Subject: [PATCH] kernel32/tests: Add some tests for wait timeouts.
Expand All @@ -8,18 +8,18 @@ Subject: [PATCH] kernel32/tests: Add some tests for wait timeouts.
1 file changed, 68 insertions(+)

diff --git a/dlls/kernel32/tests/sync.c b/dlls/kernel32/tests/sync.c
index 790b7bfe797..6e4916f6bc3 100644
index 4685b7bec06..117edf12fb6 100644
--- a/dlls/kernel32/tests/sync.c
+++ b/dlls/kernel32/tests/sync.c
@@ -54,6 +54,7 @@ static BOOLEAN (WINAPI *pTryAcquireSRWLockShared)(PSRWLOCK);
@@ -57,6 +57,7 @@ static BOOLEAN (WINAPI *pTryAcquireSRWLockShared)(PSRWLOCK);

static NTSTATUS (WINAPI *pNtAllocateVirtualMemory)(HANDLE, PVOID *, ULONG_PTR, SIZE_T *, ULONG, ULONG);
static NTSTATUS (WINAPI *pNtFreeVirtualMemory)(HANDLE, PVOID *, SIZE_T *, ULONG);
+static NTSTATUS (WINAPI *pNtQuerySystemTime)(LARGE_INTEGER *);
static NTSTATUS (WINAPI *pNtWaitForSingleObject)(HANDLE, BOOLEAN, const LARGE_INTEGER *);
static NTSTATUS (WINAPI *pNtWaitForMultipleObjects)(ULONG,const HANDLE*,BOOLEAN,BOOLEAN,const LARGE_INTEGER*);
static PSLIST_ENTRY (__fastcall *pRtlInterlockedPushListSList)(PSLIST_HEADER list, PSLIST_ENTRY first,
@@ -1480,11 +1481,15 @@ static HANDLE modify_handle(HANDLE handle, DWORD modify)
@@ -1485,11 +1486,15 @@ static HANDLE modify_handle(HANDLE handle, DWORD modify)
return ULongToHandle(tmp);
}

Expand All @@ -35,76 +35,76 @@ index 790b7bfe797..6e4916f6bc3 100644
DWORD ret;

signaled = CreateEventW(NULL, TRUE, TRUE, NULL);
@@ -1569,6 +1574,68 @@ static void test_WaitForSingleObject(void)
@@ -1574,6 +1579,68 @@ static void test_WaitForSingleObject(void)
status = pNtWaitForSingleObject(GetCurrentThread(), FALSE, &timeout);
ok(status == STATUS_TIMEOUT, "expected STATUS_TIMEOUT, got %08x\n", status);
ok(status == STATUS_TIMEOUT, "expected STATUS_TIMEOUT, got %08lx\n", status);

+ ret = WaitForSingleObject( signaled, 0 );
+ ok(ret == 0, "got %u\n", ret);
+ ok(ret == 0, "got %lu\n", ret);
+
+ ret = WaitForSingleObject( nonsignaled, 0 );
+ ok(ret == WAIT_TIMEOUT, "got %u\n", ret);
+ ok(ret == WAIT_TIMEOUT, "got %lu\n", ret);
+
+ /* test that a timed wait actually does wait */
+ now = GetTickCount();
+ ret = WaitForSingleObject( nonsignaled, 100 );
+ then = GetTickCount();
+ ok(ret == WAIT_TIMEOUT, "got %u\n", ret);
+ ok(abs((then - now) - 100) < 5, "got %u ms\n", then - now);
+ ok(ret == WAIT_TIMEOUT, "got %lu\n", ret);
+ ok(abs((then - now) - 100) < 5, "got %lu ms\n", then - now);
+
+ now = GetTickCount();
+ ret = WaitForSingleObject( signaled, 100 );
+ then = GetTickCount();
+ ok(ret == 0, "got %u\n", ret);
+ ok(abs(then - now) < 5, "got %u ms\n", then - now);
+ ok(ret == 0, "got %lu\n", ret);
+ ok(abs(then - now) < 5, "got %lu ms\n", then - now);
+
+ ret = WaitForSingleObject( signaled, INFINITE );
+ ok(ret == 0, "got %u\n", ret);
+ ok(ret == 0, "got %lu\n", ret);
+
+ /* test NT timeouts */
+ pNtQuerySystemTime( &ntnow );
+ timeout.QuadPart = ntnow.QuadPart + 100 * 10000;
+ status = pNtWaitForSingleObject( nonsignaled, FALSE, &timeout );
+ pNtQuerySystemTime( &ntthen );
+ ok(status == STATUS_TIMEOUT, "got %#x\n", status);
+ ok(status == STATUS_TIMEOUT, "got %#lx\n", status);
+ ok(abs(((ntthen.QuadPart - ntnow.QuadPart) / 10000) - 100) < 5, "got %s ns\n",
+ wine_dbgstr_longlong((ntthen.QuadPart - ntnow.QuadPart) * 100));
+
+ pNtQuerySystemTime( &ntnow );
+ timeout.QuadPart = -100 * 10000;
+ status = pNtWaitForSingleObject( nonsignaled, FALSE, &timeout );
+ pNtQuerySystemTime( &ntthen );
+ ok(status == STATUS_TIMEOUT, "got %#x\n", status);
+ ok(status == STATUS_TIMEOUT, "got %#lx\n", status);
+ ok(abs(((ntthen.QuadPart - ntnow.QuadPart) / 10000) - 100) < 5, "got %s ns\n",
+ wine_dbgstr_longlong((ntthen.QuadPart - ntnow.QuadPart) * 100));
+
+ status = pNtWaitForSingleObject( signaled, FALSE, NULL );
+ ok(status == 0, "got %#x\n", status);
+ ok(status == 0, "got %#lx\n", status);
+
+ timeout.QuadPart = TIMEOUT_INFINITE;
+ status = pNtWaitForSingleObject( signaled, FALSE, &timeout );
+ ok(status == 0, "got %#x\n", status);
+ ok(status == 0, "got %#lx\n", status);
+
+ pNtQuerySystemTime( &ntnow );
+ timeout.QuadPart = ntnow.QuadPart;
+ status = pNtWaitForSingleObject( nonsignaled, FALSE, &timeout );
+ pNtQuerySystemTime( &ntthen );
+ ok(status == STATUS_TIMEOUT, "got %#x\n", status);
+ ok(status == STATUS_TIMEOUT, "got %#lx\n", status);
+ ok(abs((ntthen.QuadPart - ntnow.QuadPart) / 10000) < 5, "got %s ns\n",
+ wine_dbgstr_longlong((ntthen.QuadPart - ntnow.QuadPart) * 100));
+
+ pNtQuerySystemTime( &ntnow );
+ timeout.QuadPart = ntnow.QuadPart - 100 * 10000;
+ status = pNtWaitForSingleObject( nonsignaled, FALSE, &timeout );
+ pNtQuerySystemTime( &ntthen );
+ ok(status == STATUS_TIMEOUT, "got %#x\n", status);
+ ok(status == STATUS_TIMEOUT, "got %#lx\n", status);
+ ok(abs((ntthen.QuadPart - ntnow.QuadPart) / 10000) < 5, "got %s ns\n",
+ wine_dbgstr_longlong((ntthen.QuadPart - ntnow.QuadPart) * 100));
+
CloseHandle(signaled);
CloseHandle(nonsignaled);
}
@@ -3037,6 +3104,7 @@ START_TEST(sync)
@@ -3113,6 +3180,7 @@ START_TEST(sync)
pTryAcquireSRWLockShared = (void *)GetProcAddress(hdll, "TryAcquireSRWLockShared");
pNtAllocateVirtualMemory = (void *)GetProcAddress(hntdll, "NtAllocateVirtualMemory");
pNtFreeVirtualMemory = (void *)GetProcAddress(hntdll, "NtFreeVirtualMemory");
Expand All @@ -113,5 +113,5 @@ index 790b7bfe797..6e4916f6bc3 100644
pNtWaitForMultipleObjects = (void *)GetProcAddress(hntdll, "NtWaitForMultipleObjects");
pRtlInterlockedPushListSList = (void *)GetProcAddress(hntdll, "RtlInterlockedPushListSList");
--
2.28.0
2.35.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From ba211cf9d8ca7a462c24a62334813c68d41b3fc0 Mon Sep 17 00:00:00 2001
From 8b6a7baacf0a26c7de7524c5f6da37bf4f4c1120 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 30 Aug 2021 15:16:06 +1000
Subject: [PATCH] ntoskrnl.exe: Add FltBuildDefaultSecurityDescriptor test
Expand All @@ -10,10 +10,10 @@ Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
2 files changed, 66 insertions(+), 1 deletion(-)

diff --git a/dlls/ntoskrnl.exe/tests/Makefile.in b/dlls/ntoskrnl.exe/tests/Makefile.in
index 052a8618a81..9028a392002 100644
index ab1db85adbb..9c89e44e70a 100644
--- a/dlls/ntoskrnl.exe/tests/Makefile.in
+++ b/dlls/ntoskrnl.exe/tests/Makefile.in
@@ -2,7 +2,7 @@ EXTRADEFS = -DWINE_NO_LONG_TYPES
@@ -1,7 +1,7 @@
TESTDLL = ntoskrnl.exe
IMPORTS = advapi32 crypt32 newdev setupapi user32 wintrust ws2_32 hid

Expand All @@ -23,7 +23,7 @@ index 052a8618a81..9028a392002 100644
driver2_IMPORTS = winecrt0 ntoskrnl hal
driver2_EXTRADLLFLAGS = -nodefaultlibs -nostartfiles -Wl,--subsystem,native
diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c
index dabb3b73f15..187f00c8bcb 100644
index de61ed64fa4..a0cdbf0878a 100644
--- a/dlls/ntoskrnl.exe/tests/driver.c
+++ b/dlls/ntoskrnl.exe/tests/driver.c
@@ -32,6 +32,7 @@
Expand All @@ -50,19 +50,19 @@ index dabb3b73f15..187f00c8bcb 100644
+ PSID sid1, sid2;
+
+ status = FltBuildDefaultSecurityDescriptor(&sd, STANDARD_RIGHTS_ALL);
+ ok(status == STATUS_SUCCESS, "got %#x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
+ ok(sd != NULL, "Failed to return descriptor\n");
+
+ status = RtlGetGroupSecurityDescriptor(sd, &group, &isdefault);
+ ok(status == STATUS_SUCCESS, "got %#x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
+ ok(group == NULL, "group isn't NULL\n");
+
+ status = RtlGetOwnerSecurityDescriptor(sd, &owner, &isdefault);
+ ok(status == STATUS_SUCCESS, "got %#x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
+ ok(owner == NULL, "owner isn't NULL\n");
+
+ status = RtlGetDaclSecurityDescriptor(sd, &present, &acl, &isdefault);
+ ok(status == STATUS_SUCCESS, "got %#x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
+ ok(acl != NULL, "acl is NULL\n");
+ ok(acl->AceCount == 2, "got %d\n", acl->AceCount);
+
Expand All @@ -77,21 +77,21 @@ index dabb3b73f15..187f00c8bcb 100644
+
+ /* SECURITY_BUILTIN_DOMAIN_RID */
+ status = RtlGetAce(acl, 0, (void**)&ace);
+ ok(status == STATUS_SUCCESS, "got %#x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
+
+ ok(ace->Header.AceType == ACCESS_ALLOWED_ACE_TYPE, "got %#x\n", ace->Header.AceType);
+ ok(ace->Header.AceFlags == 0, "got %#x\n", ace->Header.AceFlags);
+ ok(ace->Mask == STANDARD_RIGHTS_ALL, "got %#x\n", ace->Mask);
+ ok(ace->Mask == STANDARD_RIGHTS_ALL, "got %#lx\n", ace->Mask);
+
+ ok(RtlEqualSid(sid1, (PSID)&ace->SidStart), "SID not equal\n");
+
+ /* SECURITY_LOCAL_SYSTEM_RID */
+ status = RtlGetAce(acl, 1, (void**)&ace);
+ ok(status == STATUS_SUCCESS, "got %#x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
+
+ ok(ace->Header.AceType == ACCESS_ALLOWED_ACE_TYPE, "got %#x\n", ace->Header.AceType);
+ ok(ace->Header.AceFlags == 0, "got %#x\n", ace->Header.AceFlags);
+ ok(ace->Mask == STANDARD_RIGHTS_ALL, "got %#x\n", ace->Mask);
+ ok(ace->Mask == STANDARD_RIGHTS_ALL, "got %#lx\n", ace->Mask);
+
+ ok(RtlEqualSid(sid2, (PSID)&ace->SidStart), "SID not equal\n");
+
Expand All @@ -113,5 +113,5 @@ index dabb3b73f15..187f00c8bcb 100644
IoMarkIrpPending(irp);
IoQueueWorkItem(work_item, main_test_task, DelayedWorkQueue, irp);
--
2.34.1
2.35.1

Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ index 3a6f8184009..b5231636261 100644
+ }
+
+ if (pdev->brush.style != BS_NULL &&
+ !(interior = NtGdiPolyPolyDraw( ULongToHandle(ALTERNATE), points, (const UINT *)&count, 1, NtGdiPolyPolygonRgn )))
+ !(interior = ULongToHandle(NtGdiPolyPolyDraw( ULongToHandle(ALTERNATE), points, (const UINT *)&count, 1, NtGdiPolyPolygonRgn ))))
+ {
+ free( points );
+ if (outline) NtGdiDeleteObjectApp( outline );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2493,7 +2493,7 @@ index c72a12955b8..87d11472ff0 100644
+ This->hr = S_OK;
+ else
+ {
+ ERR("CopyFile failed: %u\n", GetLastError());
+ ERR("CopyFile failed: %lu\n", GetLastError());
+ This->hr = E_FAIL;
+ }
+
Expand Down Expand Up @@ -3076,7 +3076,7 @@ index c72a12955b8..87d11472ff0 100644
InstallEngine *This = impl_from_IInstallEngine2(iface);
- FIXME("(%p)->(%d %p)\n", This, index, id);
+
+ FIXME("(%p)->(%lu %p): stub\n", This, index, id);
+ FIXME("(%p)->(%u %p): stub\n", This, index, id);
+
return E_NOTIMPL;
}
Expand All @@ -3090,7 +3090,7 @@ index c72a12955b8..87d11472ff0 100644
+ ICifComponent *comp;
+ HRESULT hr;
+
+ TRACE("(%p)->(%lu %p)\n", This, index, id);
+ TRACE("(%p)->(%u %p)\n", This, index, id);
+
+ if (!This->icif || !id)
+ return E_FAIL;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
From f29eb0b6a2b555beea0c29e9202c218ef31311b6 Mon Sep 17 00:00:00 2001
From 8b435d44bcbeb2e6fd1ef37c8a23405dea88b685 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 26 Feb 2015 06:41:26 +0100
Subject: [PATCH] kernelbase: Add support for progress callback in CopyFileEx.

---
dlls/kernel32/tests/file.c | 6 ---
dlls/kernelbase/file.c | 77 +++++++++++++++++++++++++++++++++++---
2 files changed, 71 insertions(+), 12 deletions(-)
dlls/kernel32/tests/file.c | 6 ----
dlls/kernelbase/file.c | 72 ++++++++++++++++++++++++++++++++++----
2 files changed, 66 insertions(+), 12 deletions(-)

diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c
index f8e49491a7d..74c13ff11d0 100644
index 1c4cdfea1b4..0d0e6a893c9 100644
--- a/dlls/kernel32/tests/file.c
+++ b/dlls/kernel32/tests/file.c
@@ -1169,23 +1169,17 @@ static void test_CopyFileEx(void)
ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %d\n", GetLastError());
ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %ld\n", GetLastError());
SetLastError(0xdeadbeef);
retok = CopyFileExA(source, dest, copy_progress_cb, hfile, NULL, 0);
- todo_wine
ok(!retok, "CopyFileExA unexpectedly succeeded\n");
- todo_wine
ok(GetLastError() == ERROR_REQUEST_ABORTED, "expected ERROR_REQUEST_ABORTED, got %d\n", GetLastError());
ok(GetLastError() == ERROR_REQUEST_ABORTED, "expected ERROR_REQUEST_ABORTED, got %ld\n", GetLastError());
ok(GetFileAttributesA(dest) != INVALID_FILE_ATTRIBUTES, "file was deleted\n");

hfile = CreateFileA(dest, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_WRITE | FILE_SHARE_DELETE,
NULL, OPEN_EXISTING, 0, 0);
- todo_wine
ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %d\n", GetLastError());
ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %ld\n", GetLastError());
SetLastError(0xdeadbeef);
retok = CopyFileExA(source, dest, copy_progress_cb, hfile, NULL, 0);
- todo_wine
ok(!retok, "CopyFileExA unexpectedly succeeded\n");
- todo_wine
ok(GetLastError() == ERROR_REQUEST_ABORTED, "expected ERROR_REQUEST_ABORTED, got %d\n", GetLastError());
ok(GetLastError() == ERROR_REQUEST_ABORTED, "expected ERROR_REQUEST_ABORTED, got %ld\n", GetLastError());
- todo_wine
ok(GetFileAttributesA(dest) == INVALID_FILE_ATTRIBUTES, "file was not deleted\n");

retok = CopyFileExA(source, NULL, copy_progress_cb, hfile, NULL, 0);
diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c
index c6dc904044a..b9ba1bd7c26 100644
index 7b1858de424..a98a54ae9b1 100644
--- a/dlls/kernelbase/file.c
+++ b/dlls/kernelbase/file.c
@@ -499,11 +499,16 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
@@ -500,11 +500,16 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
{
static const int buffer_size = 65536;
HANDLE h1, h2;
Expand All @@ -58,24 +58,19 @@ index c6dc904044a..b9ba1bd7c26 100644

if (!source || !dest)
{
@@ -518,7 +523,15 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT

TRACE("%s -> %s, %lx\n", debugstr_w(source), debugstr_w(dest), flags);
@@ -526,7 +531,10 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
if (flags & COPY_FILE_OPEN_SOURCE_FOR_WRITE)
FIXME("COPY_FILE_OPEN_SOURCE_FOR_WRITE is not supported\n");

- if ((h1 = CreateFileW( source, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
+ if (flags & COPY_FILE_RESTARTABLE)
+ FIXME("COPY_FILE_RESTARTABLE is not supported\n");
+ if (flags & COPY_FILE_COPY_SYMLINK)
+ FIXME("COPY_FILE_COPY_SYMLINK is not supported\n");
+
+ if (flags & COPY_FILE_OPEN_SOURCE_FOR_WRITE)
+ source_access |= GENERIC_WRITE;
+
+ if ((h1 = CreateFileW( source, source_access, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
NULL, OPEN_EXISTING, 0, 0 )) == INVALID_HANDLE_VALUE)
{
WARN("Unable to open source %s\n", debugstr_w(source));
@@ -526,7 +539,7 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
@@ -534,7 +542,7 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
return FALSE;
}

Expand All @@ -84,7 +79,7 @@ index c6dc904044a..b9ba1bd7c26 100644
{
WARN("GetFileInformationByHandle returned error for %s\n", debugstr_w(source));
HeapFree( GetProcessHeap(), 0, buffer );
@@ -552,7 +565,11 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
@@ -560,7 +568,11 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
}
}

Expand All @@ -97,7 +92,7 @@ index c6dc904044a..b9ba1bd7c26 100644
(flags & COPY_FILE_FAIL_IF_EXISTS) ? CREATE_NEW : CREATE_ALWAYS,
info.FileAttributes, h1 )) == INVALID_HANDLE_VALUE)
{
@@ -562,6 +579,29 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
@@ -570,6 +582,29 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
return FALSE;
}

Expand Down Expand Up @@ -127,7 +122,7 @@ index c6dc904044a..b9ba1bd7c26 100644
while (ReadFile( h1, buffer, buffer_size, &count, NULL ) && count)
{
char *p = buffer;
@@ -571,13 +611,38 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
@@ -579,13 +614,38 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
if (!WriteFile( h2, p, count, &res, NULL ) || !res) goto done;
p += res;
count -= res;
Expand Down Expand Up @@ -169,5 +164,5 @@ index c6dc904044a..b9ba1bd7c26 100644
CloseHandle( h1 );
CloseHandle( h2 );
--
2.34.1
2.35.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 5d8e7efe186c9a49005e1451ac04e4fc8f9bb2b8 Mon Sep 17 00:00:00 2001
From dd46b005cfcc8aa02bf25c031326e28bd75e0ff2 Mon Sep 17 00:00:00 2001
From: Mark Jansen <mark.jansen@reactos.org>
Date: Sun, 24 Sep 2017 22:45:22 +0200
Subject: [PATCH] kernel32/tests: Add tests for job object accounting
Expand All @@ -9,11 +9,11 @@ Signed-off-by: Mark Jansen <mark.jansen@reactos.org>
1 file changed, 95 insertions(+)

diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c
index 52c3036fe59..1b72f8f4466 100644
index e9e8555c32e..e5a9914ca7b 100644
--- a/dlls/kernel32/tests/process.c
+++ b/dlls/kernel32/tests/process.c
@@ -2541,6 +2541,69 @@ static void _create_process(int line, const char *command, LPPROCESS_INFORMATION
ok_(__FILE__, line)(ret, "CreateProcess error %u\n", GetLastError());
ok_(__FILE__, line)(ret, "CreateProcess error %lu\n", GetLastError());
}

+#define test_assigned_proc(job, ...) _test_assigned_proc(__LINE__, job, __VA_ARGS__)
Expand All @@ -28,24 +28,24 @@ index 52c3036fe59..1b72f8f4466 100644
+
+ memset(buf, 0, sizeof(buf));
+ ret = pQueryInformationJobObject(job, JobObjectBasicProcessIdList, pid_list, sizeof(buf), &ret_len);
+ ok_(__FILE__, line)(ret, "QueryInformationJobObject error %u\n", GetLastError());
+ ok_(__FILE__, line)(ret, "QueryInformationJobObject error %lu\n", GetLastError());
+ if (ret)
+ {
+ todo_wine_if(expected_count)
+ ok_(__FILE__, line)(expected_count == pid_list->NumberOfAssignedProcesses,
+ "Expected NumberOfAssignedProcesses to be %d (expected_count) is %d\n",
+ "Expected NumberOfAssignedProcesses to be %d (expected_count) is %ld\n",
+ expected_count, pid_list->NumberOfAssignedProcesses);
+ todo_wine_if(expected_count)
+ ok_(__FILE__, line)(expected_count == pid_list->NumberOfProcessIdsInList,
+ "Expected NumberOfProcessIdsInList to be %d (expected_count) is %d\n",
+ "Expected NumberOfProcessIdsInList to be %d (expected_count) is %ld\n",
+ expected_count, pid_list->NumberOfProcessIdsInList);
+
+ va_start(valist, expected_count);
+ for (n = 0; n < min(expected_count, pid_list->NumberOfProcessIdsInList); ++n)
+ {
+ pid = va_arg(valist, DWORD);
+ ok_(__FILE__, line)(pid == pid_list->ProcessIdList[n],
+ "Expected pid_list->ProcessIdList[%d] to be %x is %lx\n",
+ "Expected pid_list->ProcessIdList[%d] to be %lx is %Ix\n",
+ n, pid, pid_list->ProcessIdList[n]);
+ }
+ va_end(valist);
Expand All @@ -61,21 +61,21 @@ index 52c3036fe59..1b72f8f4466 100644
+
+ memset(&basic_accounting, 0, sizeof(basic_accounting));
+ ret = pQueryInformationJobObject(job, JobObjectBasicAccountingInformation, &basic_accounting, sizeof(basic_accounting), &ret_len);
+ ok_(__FILE__, line)(ret, "QueryInformationJobObject error %u\n", GetLastError());
+ ok_(__FILE__, line)(ret, "QueryInformationJobObject error %lu\n", GetLastError());
+ if (ret)
+ {
+ /* Not going to check process times or page faults */
+
+ todo_wine_if(total_proc)
+ ok_(__FILE__, line)(total_proc == basic_accounting.TotalProcesses,
+ "Expected basic_accounting.TotalProcesses to be %d (total_proc) is %d\n",
+ "Expected basic_accounting.TotalProcesses to be %d (total_proc) is %ld\n",
+ total_proc, basic_accounting.TotalProcesses);
+ todo_wine_if(active_proc)
+ ok_(__FILE__, line)(active_proc == basic_accounting.ActiveProcesses,
+ "Expected basic_accounting.ActiveProcesses to be %d (active_proc) is %d\n",
+ "Expected basic_accounting.ActiveProcesses to be %d (active_proc) is %ld\n",
+ active_proc, basic_accounting.ActiveProcesses);
+ ok_(__FILE__, line)(terminated_proc == basic_accounting.TotalTerminatedProcesses,
+ "Expected basic_accounting.TotalTerminatedProcesses to be %d (terminated_proc) is %d\n",
+ "Expected basic_accounting.TotalTerminatedProcesses to be %d (terminated_proc) is %ld\n",
+ terminated_proc, basic_accounting.TotalTerminatedProcesses);
+ }
+}
Expand All @@ -84,30 +84,30 @@ index 52c3036fe59..1b72f8f4466 100644
{
@@ -2566,11 +2629,15 @@ static void test_IsProcessInJob(void)
ret = pIsProcessInJob(pi.hProcess, job, &out);
ok(ret, "IsProcessInJob error %u\n", GetLastError());
ok(ret, "IsProcessInJob error %lu\n", GetLastError());
ok(!out, "IsProcessInJob returned out=%u\n", out);
+ test_assigned_proc(job, 0);
+ test_accounting(job, 0, 0, 0);

out = TRUE;
ret = pIsProcessInJob(pi.hProcess, job2, &out);
ok(ret, "IsProcessInJob error %u\n", GetLastError());
ok(ret, "IsProcessInJob error %lu\n", GetLastError());
ok(!out, "IsProcessInJob returned out=%u\n", out);
+ test_assigned_proc(job2, 0);
+ test_accounting(job2, 0, 0, 0);

ret = pAssignProcessToJobObject(job, pi.hProcess);
ok(ret, "AssignProcessToJobObject error %u\n", GetLastError());
ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError());
@@ -2579,11 +2646,15 @@ static void test_IsProcessInJob(void)
ret = pIsProcessInJob(pi.hProcess, job, &out);
ok(ret, "IsProcessInJob error %u\n", GetLastError());
ok(ret, "IsProcessInJob error %lu\n", GetLastError());
ok(out, "IsProcessInJob returned out=%u\n", out);
+ test_assigned_proc(job, 1, pi.dwProcessId);
+ test_accounting(job, 1, 1, 0);

out = TRUE;
ret = pIsProcessInJob(pi.hProcess, job2, &out);
ok(ret, "IsProcessInJob error %u\n", GetLastError());
ok(ret, "IsProcessInJob error %lu\n", GetLastError());
ok(!out, "IsProcessInJob returned out=%u\n", out);
+ test_assigned_proc(job2, 0);
+ test_accounting(job2, 0, 0, 0);
Expand All @@ -116,7 +116,7 @@ index 52c3036fe59..1b72f8f4466 100644
ret = pIsProcessInJob(pi.hProcess, NULL, &out);
@@ -2597,6 +2668,8 @@ static void test_IsProcessInJob(void)
ret = pIsProcessInJob(pi.hProcess, job, &out);
ok(ret, "IsProcessInJob error %u\n", GetLastError());
ok(ret, "IsProcessInJob error %lu\n", GetLastError());
ok(out, "IsProcessInJob returned out=%u\n", out);
+ test_assigned_proc(job, 0);
+ test_accounting(job, 1, 0, 0);
Expand All @@ -126,28 +126,28 @@ index 52c3036fe59..1b72f8f4466 100644
@@ -2613,11 +2686,15 @@ static void test_TerminateJobObject(void)

job = pCreateJobObjectW(NULL, NULL);
ok(job != NULL, "CreateJobObject error %u\n", GetLastError());
ok(job != NULL, "CreateJobObject error %lu\n", GetLastError());
+ test_assigned_proc(job, 0);
+ test_accounting(job, 0, 0, 0);

create_process("wait", &pi);

ret = pAssignProcessToJobObject(job, pi.hProcess);
ok(ret, "AssignProcessToJobObject error %u\n", GetLastError());
ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError());
+ test_assigned_proc(job, 1, pi.dwProcessId);
+ test_accounting(job, 1, 1, 0);

ret = pTerminateJobObject(job, 123);
ok(ret, "TerminateJobObject error %u\n", GetLastError());
ok(ret, "TerminateJobObject error %lu\n", GetLastError());
@@ -2626,6 +2703,8 @@ static void test_TerminateJobObject(void)
dwret = WaitForSingleObject(pi.hProcess, 1000);
ok(dwret == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", dwret);
ok(dwret == WAIT_OBJECT_0, "WaitForSingleObject returned %lu\n", dwret);
if (dwret == WAIT_TIMEOUT) TerminateProcess(pi.hProcess, 0);
+ test_assigned_proc(job, 0);
+ test_accounting(job, 1, 0, 0);

ret = GetExitCodeProcess(pi.hProcess, &dwret);
ok(ret, "GetExitCodeProcess error %u\n", GetLastError());
ok(ret, "GetExitCodeProcess error %lu\n", GetLastError());
@@ -2643,6 +2722,8 @@ static void test_TerminateJobObject(void)
ret = pAssignProcessToJobObject(job, pi.hProcess);
ok(!ret, "AssignProcessToJobObject unexpectedly succeeded\n");
Expand All @@ -157,41 +157,41 @@ index 52c3036fe59..1b72f8f4466 100644

CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
@@ -2850,11 +2931,15 @@ static void test_KillOnJobClose(void)
@@ -2841,11 +2922,15 @@ static void test_KillOnJobClose(void)
return;
}
ok(ret, "SetInformationJobObject error %u\n", GetLastError());
ok(ret, "SetInformationJobObject error %lu\n", GetLastError());
+ test_assigned_proc(job, 0);
+ test_accounting(job, 0, 0, 0);

create_process("wait", &pi);

ret = pAssignProcessToJobObject(job, pi.hProcess);
ok(ret, "AssignProcessToJobObject error %u\n", GetLastError());
ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError());
+ test_assigned_proc(job, 1, pi.dwProcessId);
+ test_accounting(job, 1, 1, 0);

CloseHandle(job);

@@ -2964,6 +3049,8 @@ static HANDLE test_AddSelfToJob(void)
@@ -2955,6 +3040,8 @@ static HANDLE test_AddSelfToJob(void)

ret = pAssignProcessToJobObject(job, GetCurrentProcess());
ok(ret, "AssignProcessToJobObject error %u\n", GetLastError());
ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError());
+ test_assigned_proc(job, 1, GetCurrentProcessId());
+ test_accounting(job, 1, 1, 0);

return job;
}
@@ -2985,6 +3072,8 @@ static void test_jobInheritance(HANDLE job)
@@ -2976,6 +3063,8 @@ static void test_jobInheritance(HANDLE job)
ret = pIsProcessInJob(pi.hProcess, job, &out);
ok(ret, "IsProcessInJob error %u\n", GetLastError());
ok(ret, "IsProcessInJob error %lu\n", GetLastError());
ok(out, "IsProcessInJob returned out=%u\n", out);
+ test_assigned_proc(job, 2, GetCurrentProcessId(), pi.dwProcessId);
+ test_accounting(job, 2, 2, 0);

wait_and_close_child_process(&pi);
}
@@ -3018,6 +3107,8 @@ static void test_BreakawayOk(HANDLE parent_job)
@@ -3009,6 +3098,8 @@ static void test_BreakawayOk(HANDLE parent_job)
ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, CREATE_BREAKAWAY_FROM_JOB, NULL, NULL, &si, &pi);
ok(!ret, "CreateProcessA expected failure\n");
expect_eq_d(ERROR_ACCESS_DENIED, GetLastError());
Expand All @@ -200,24 +200,24 @@ index 52c3036fe59..1b72f8f4466 100644

if (ret)
{
@@ -3057,6 +3148,8 @@ static void test_BreakawayOk(HANDLE parent_job)
@@ -3048,6 +3139,8 @@ static void test_BreakawayOk(HANDLE parent_job)
ret = pIsProcessInJob(pi.hProcess, job, &out);
ok(ret, "IsProcessInJob error %u\n", GetLastError());
ok(ret, "IsProcessInJob error %lu\n", GetLastError());
ok(!out, "IsProcessInJob returned out=%u\n", out);
+ test_assigned_proc(job, 1, GetCurrentProcessId());
+ test_accounting(job, 2, 1, 0);

ret = pIsProcessInJob(pi.hProcess, parent_job, &out);
ok(ret, "IsProcessInJob error %u\n", GetLastError());
@@ -3074,6 +3167,8 @@ static void test_BreakawayOk(HANDLE parent_job)
ok(ret, "IsProcessInJob error %lu\n", GetLastError());
@@ -3065,6 +3158,8 @@ static void test_BreakawayOk(HANDLE parent_job)
ret = pIsProcessInJob(pi.hProcess, job, &out);
ok(ret, "IsProcessInJob error %u\n", GetLastError());
ok(ret, "IsProcessInJob error %lu\n", GetLastError());
ok(!out, "IsProcessInJob returned out=%u\n", out);
+ test_assigned_proc(job, 1, GetCurrentProcessId());
+ test_accounting(job, 2, 1, 0);

wait_and_close_child_process(&pi);

--
2.30.2
2.35.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From e5ed00ac26224e2f7cc6e2ee769d254ead973ef2 Mon Sep 17 00:00:00 2001
From b7da069fa1681f8ef532fa77ff27ca6002f48dfa Mon Sep 17 00:00:00 2001
From: Fabian Maurer <dark.shadow4@web.de>
Date: Fri, 10 Apr 2020 18:47:18 +0200
Subject: [PATCH] kernelbase: Implement sortkey generation on official tables
Expand All @@ -10,10 +10,10 @@ Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
2 files changed, 413 insertions(+), 123 deletions(-)

diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c
index 8f48b89334c..1ce19b5b418 100644
index ad644cf5a3e..3f608996bba 100644
--- a/dlls/kernel32/tests/locale.c
+++ b/dlls/kernel32/tests/locale.c
@@ -2560,6 +2560,13 @@ static void test_lcmapstring_unicode(lcmapstring_wrapper func_ptr, const char *f
@@ -2564,6 +2564,13 @@ static void test_lcmapstring_unicode(lcmapstring_wrapper func_ptr, const char *f
lstrlenW(symbols_stripped) + 1, ret);
ok(!lstrcmpW(buf, symbols_stripped), "%s string comparison mismatch\n", func_name);

Expand All @@ -22,12 +22,12 @@ index 8f48b89334c..1ce19b5b418 100644
+ ret = func_ptr(LCMAP_SORTKEY, lower_case, -1, buf, 2);
+ ok(ret == 0, "Expected a failure\n");
+ ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
+ "%s unexpected error code %d\n", func_name, GetLastError());;
+ "%s unexpected error code %ld\n", func_name, GetLastError());
+
/* test srclen = 0 */
SetLastError(0xdeadbeef);
ret = func_ptr(0, upper_case, 0, buf, ARRAY_SIZE(buf));
@@ -2989,6 +2996,135 @@ static void test_sorting(void)
@@ -2993,6 +3000,135 @@ static void test_sorting(void)
}
}

Expand Down Expand Up @@ -163,8 +163,8 @@ index 8f48b89334c..1ce19b5b418 100644
static void test_FoldStringA(void)
{
int ret, i, j;
@@ -7194,6 +7330,7 @@ START_TEST(locale)
test_NLSVersion();
@@ -7248,6 +7384,7 @@ START_TEST(locale)
test_locale_nls();
test_geo_name();
test_sorting();
+ test_unicode_sorting();
Expand Down Expand Up @@ -596,5 +596,5 @@ index 2f2154a0e7c..c16535a5f1a 100644
}

--
2.34.1
2.35.1

Original file line number Diff line number Diff line change
@@ -1,59 +1,53 @@
From 9ecf6543f498cfc6c1cfb44033746cfd1ba16587 Mon Sep 17 00:00:00 2001
From f2347ae7216626d248cfaf9445862561b2b5eef7 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 1 Jul 2019 09:58:55 +1000
Subject: [PATCH] loader: Add Keyboard Layouts registry enteries.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
loader/wine.inf.in | 215 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 215 insertions(+)
loader/wine.inf.in | 209 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 209 insertions(+)

diff --git a/loader/wine.inf.in b/loader/wine.inf.in
index 6e0cb212531..fc929859be3 100644
index ff601e41b26..6ffb8c56d87 100644
--- a/loader/wine.inf.in
+++ b/loader/wine.inf.in
@@ -39,6 +39,7 @@ AddReg=\
@@ -63,6 +63,7 @@ AddReg=\
Debugger,\
DirectX,\
Fonts,\
+ KeyboardLayouts,\
MCI,\
Misc,\
Nls,\
@@ -63,6 +64,7 @@ AddReg=\
OLE,\
@@ -87,6 +88,7 @@ AddReg=\
Debugger,\
DirectX,\
Fonts,\
+ KeyboardLayouts,\
MCI,\
Misc,\
Nls,\
@@ -90,6 +92,7 @@ AddReg=\
OLE,\
@@ -113,6 +115,7 @@ AddReg=\
Debugger,\
DirectX,\
Fonts,\
+ KeyboardLayouts,\
MCI,\
Misc,\
Nls,\
@@ -138,6 +141,7 @@ AddReg=\
OLE,\
@@ -160,6 +163,7 @@ AddReg=\
CurrentVersionWow64,\
Debugger,\
DirectX,\
+ KeyboardLayouts,\
MCI,\
Misc,\
Tapi,\
@@ -1087,6 +1091,217 @@ HKLM,System\CurrentControlSet\Control\Nls\Locale\Alternate Sorts,"00021004",,"a"
HKLM,System\CurrentControlSet\Control\Nls\Locale\Alternate Sorts,"00021404",,"9"
HKLM,System\CurrentControlSet\Control\Nls\Locale\Alternate Sorts,"00030404",,"9"
@@ -597,6 +601,211 @@ HKCU,Software\Microsoft\Windows\Shell\Associations\UrlAssociations\ftp\UserChoic
HKCU,Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice,"ProgId",,"http"
HKCU,Software\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice,"ProgId",,"https"

+HKLM,System\CurrentControlSet\Control\Nls\Normalization,"1",,"normnfc.nls"
+HKLM,System\CurrentControlSet\Control\Nls\Normalization,"2",,"normnfd.nls"
+HKLM,System\CurrentControlSet\Control\Nls\Normalization,"5",,"normnfkc.nls"
+HKLM,System\CurrentControlSet\Control\Nls\Normalization,"6",,"normnfkd.nls"
+HKLM,System\CurrentControlSet\Control\Nls\Normalization,"d",,"normidna.nls"
+
+[KeyboardLayouts]
+HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts,,16
+HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000401,,16
Expand Down Expand Up @@ -263,5 +257,5 @@ index 6e0cb212531..fc929859be3 100644
HKLM,"Software\Microsoft\OLE","EnableDCOM",,"Y"
HKLM,"Software\Microsoft\OLE","EnableRemoteConnect",,"N"
--
2.25.1
2.35.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From fb1dbda120ff9777832d125ad31fee292fdd2123 Mon Sep 17 00:00:00 2001
From dc71919fd156f8fabcb47594cb13ee3210ff571c Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 9 Jul 2019 14:13:28 +1000
Subject: [PATCH] user32: Do not enumerate the registry in
Expand All @@ -9,21 +9,21 @@ not the complete list from the registry.
---
dlls/user32/input.c | 1 -
dlls/user32/tests/input.c | 35 +++++++++++++++++++++++++++++++++++
dlls/win32u/input.c | 33 +--------------------------------
3 files changed, 36 insertions(+), 33 deletions(-)
dlls/win32u/input.c | 35 ++---------------------------------
3 files changed, 37 insertions(+), 34 deletions(-)

diff --git a/dlls/user32/input.c b/dlls/user32/input.c
index 08a00c0e647..ae496e5d703 100644
index 6cf60abeae2..3907430dd22 100644
--- a/dlls/user32/input.c
+++ b/dlls/user32/input.c
@@ -809,7 +809,6 @@ BOOL WINAPI BlockInput(BOOL fBlockIt)
return FALSE;
@@ -802,7 +802,6 @@ static void CALLBACK TrackMouseEventProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent,
}
}

-
/***********************************************************************
* RegisterHotKey (USER32.@)
*/
* TrackMouseEvent [USER32]
*
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
index 79f3dfc3dc0..b3c1bd560ae 100644
--- a/dlls/user32/tests/input.c
Expand Down Expand Up @@ -78,10 +78,10 @@ index 79f3dfc3dc0..b3c1bd560ae 100644
if(pGetMouseMovePointsEx)
test_GetMouseMovePointsEx(argv[0]);
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c
index 90a77639d1a..1fe2fb88911 100644
index 72af32fd471..a18f81fc331 100644
--- a/dlls/win32u/input.c
+++ b/dlls/win32u/input.c
@@ -621,11 +621,7 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
@@ -821,11 +821,7 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
*/
UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
{
Expand All @@ -94,7 +94,7 @@ index 90a77639d1a..1fe2fb88911 100644
HKL layout;

TRACE_(keyboard)( "size %d, layouts %p.\n", size, layouts );
@@ -639,33 +635,6 @@ UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
@@ -839,33 +835,6 @@ UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
if (size && layouts)
{
layouts[count - 1] = layout;
Expand Down Expand Up @@ -129,5 +129,5 @@ index 90a77639d1a..1fe2fb88911 100644

return count;
--
2.33.0
2.34.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 214c0a64d5f0f3733c3e370f2a75329153617b2f Mon Sep 17 00:00:00 2001
From bef93835ceb4a482c348b0aa6e62ce4fee5e3f35 Mon Sep 17 00:00:00 2001
From: Zhenbo Li <litimetal@gmail.com>
Date: Tue, 1 Jul 2014 19:45:43 +0800
Subject: [PATCH] mshtml: Add IHTMLLocation::hash property's getter
Expand All @@ -10,10 +10,10 @@ Subject: [PATCH] mshtml: Add IHTMLLocation::hash property's getter
2 files changed, 61 insertions(+), 3 deletions(-)

diff --git a/dlls/mshtml/htmllocation.c b/dlls/mshtml/htmllocation.c
index 7d102044c..a6d689397 100644
index 8f7800ff2a3..2b42939a39f 100644
--- a/dlls/mshtml/htmllocation.c
+++ b/dlls/mshtml/htmllocation.c
@@ -526,8 +526,15 @@ static HRESULT WINAPI HTMLLocation_get_search(IHTMLLocation *iface, BSTR *p)
@@ -524,8 +524,15 @@ static HRESULT WINAPI HTMLLocation_get_search(IHTMLLocation *iface, BSTR *p)
static HRESULT WINAPI HTMLLocation_put_hash(IHTMLLocation *iface, BSTR v)
{
HTMLLocation *This = impl_from_IHTMLLocation(iface);
Expand All @@ -32,7 +32,7 @@ index 7d102044c..a6d689397 100644

static HRESULT WINAPI HTMLLocation_get_hash(IHTMLLocation *iface, BSTR *p)
diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c
index e473ee0f2..242ebbeee 100644
index ff050863b6f..2c118d89d1d 100644
--- a/dlls/mshtml/tests/htmldoc.c
+++ b/dlls/mshtml/tests/htmldoc.c
@@ -5963,6 +5963,56 @@ static void test_Persist(IHTMLDocument2 *doc, IMoniker *mon)
Expand All @@ -51,7 +51,7 @@ index e473ee0f2..242ebbeee 100644
+
+ location = NULL;
+ hres = IHTMLDocument2_get_location(doc, &location);
+ ok(hres == S_OK, "get_location failed: %08x\n", hres);
+ ok(hres == S_OK, "get_location failed: %08lx\n", hres);
+ ok(location != NULL, "location == NULL\n");
+
+ SET_EXPECT(TranslateUrl);
Expand All @@ -70,7 +70,7 @@ index e473ee0f2..242ebbeee 100644
+
+ str = SysAllocString(new_hash);
+ hres = IHTMLLocation_put_hash(location, str);
+ ok (hres == S_OK, "put_hash failed: %08x\n", hres);
+ ok (hres == S_OK, "put_hash failed: %08lx\n", hres);
+ SysFreeString(str);
+
+ CHECK_CALLED(TranslateUrl);
Expand All @@ -82,7 +82,7 @@ index e473ee0f2..242ebbeee 100644
+
+ /* Check the result */
+ hres = IHTMLLocation_get_hash(location, &str);
+ ok(hres == S_OK, "get_hash failed: %08x\n", hres);
+ ok(hres == S_OK, "get_hash failed: %08lx\n", hres);
+ ok(!wcscmp(str, new_hash), "expected %s, got %s\n", debugstr_w(new_hash), debugstr_w(str));
+ SysFreeString(str);
+
Expand All @@ -93,15 +93,15 @@ index e473ee0f2..242ebbeee 100644
BOOL is_hash, DWORD dwl_flags)
{
@@ -6148,7 +6198,7 @@ static void test_load_history(IHTMLDocument2 *doc)
ok(hres == S_OK, "Could not get IPersistHistory iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IPersistHistory iface: %08lx\n", hres);

prev_url = nav_url;
- nav_url = L"http://test.winehq.org/tests/winehq_snapshot/#test";
+ nav_url = L"http://test.winehq.org/tests/winehq_snapshot/#hash_test";
nav_serv_url = L"http://test.winehq.org/tests/winehq_snapshot/";

SET_EXPECT(Exec_ShellDocView_138);
@@ -7915,6 +7965,7 @@ static void test_HTMLDocument_http(BOOL with_wbapp)
@@ -8017,6 +8067,7 @@ static void test_HTMLDocument_http(BOOL with_wbapp)
nav_url = nav_serv_url = L"http://test.winehq.org/tests/winehq_snapshot/"; /* for valid prev nav_url */
if(support_wbapp) {
test_put_href(doc, FALSE, L"#test", L"http://test.winehq.org/tests/winehq_snapshot/#test", FALSE, TRUE, 0);
Expand All @@ -110,5 +110,5 @@ index e473ee0f2..242ebbeee 100644
test_refresh(doc);
}
--
2.25.0
2.34.1

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ index 274db8c22b..ba02e811cc 100644
+ break;
+ case WM_KEYUP:
+ {
+ TRACE("Processing key %ld\n", lpmsg->wParam);
+ TRACE("Processing key %I64d\n", lpmsg->wParam);
+ if (lpmsg->wParam == VK_F5)
+ hres = IOleCommandTarget_Exec(&This->IOleCommandTarget_iface, NULL, OLECMDID_REFRESH, 0, NULL, NULL);
+
Expand All @@ -38,7 +38,7 @@ index 274db8c22b..ba02e811cc 100644
+ FIXME("Unsupported message %04x\n", lpmsg->message);
+ }
+
+ TRACE("result 0x%08x\n", hres);
+ TRACE("result 0x%08lx\n", hres);
+ return hres;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From f4dee57bb2912eb76741eaf74ee07397409167df Mon Sep 17 00:00:00 2001
From 0d226ed6deed34649926c32dffe7086d2ce4f06b Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 11 Sep 2020 17:55:59 +1000
Subject: [PATCH] include: Remove interfaces already define in msxml6.idl
Expand All @@ -14,10 +14,10 @@ Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
6 files changed, 30 insertions(+), 121 deletions(-)

diff --git a/dlls/msxml3/factory.c b/dlls/msxml3/factory.c
index 445cfbf730d..b8452ff4b4e 100644
index c2d3cd30c60..243ee379712 100644
--- a/dlls/msxml3/factory.c
+++ b/dlls/msxml3/factory.c
@@ -35,6 +35,7 @@
@@ -31,6 +31,7 @@
#include "ole2.h"
#include "msxml.h"
#include "msxml2.h"
Expand All @@ -26,7 +26,7 @@ index 445cfbf730d..b8452ff4b4e 100644

/* undef the #define in msxml2 so that we can access the v.2 version
diff --git a/dlls/msxml3/tests/saxreader.c b/dlls/msxml3/tests/saxreader.c
index ab814c5f764..e8441311776 100644
index d8101c4ce94..d19ad28fba9 100644
--- a/dlls/msxml3/tests/saxreader.c
+++ b/dlls/msxml3/tests/saxreader.c
@@ -29,6 +29,7 @@
Expand All @@ -38,7 +38,7 @@ index ab814c5f764..e8441311776 100644
#include "ocidl.h"
#include "dispex.h"
diff --git a/dlls/msxml3/tests/schema.c b/dlls/msxml3/tests/schema.c
index d1622ffc7da..964e368bf84 100644
index cf55f53dbc9..fd7abca151d 100644
--- a/dlls/msxml3/tests/schema.c
+++ b/dlls/msxml3/tests/schema.c
@@ -32,6 +32,11 @@
Expand All @@ -52,7 +52,7 @@ index d1622ffc7da..964e368bf84 100644
+
#include "wine/test.h"

#define EXPECT_HR(hr,hr_exp) \
#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c)
diff --git a/dlls/msxml3/uuid.c b/dlls/msxml3/uuid.c
index 4abbe5e4763..333d4f3d3c7 100644
--- a/dlls/msxml3/uuid.c
Expand Down Expand Up @@ -259,10 +259,10 @@ index 916e0e8ab3d..1d1ba7a5248 100644
helpstring("SAXAttributes"),
progid("Msxml2.SAXAttributes"),
diff --git a/include/msxml6.idl b/include/msxml6.idl
index 5bfb21d04ae..bfea408ab21 100644
index 4948de39f1f..e6a0a5feda5 100644
--- a/include/msxml6.idl
+++ b/include/msxml6.idl
@@ -2946,18 +2946,6 @@ coclass DOMDocument60
@@ -3048,18 +3048,6 @@ coclass DOMDocument60
[default, source] dispinterface XMLDOMDocumentEvents;
}

Expand All @@ -281,7 +281,7 @@ index 5bfb21d04ae..bfea408ab21 100644
[
helpstring("SAX XML Reader 6.0"),
progid("Msxml2.SAXXMLReader.6.0"),
@@ -3063,6 +3051,18 @@ coclass XSLTemplate60
@@ -3165,6 +3153,18 @@ coclass XSLTemplate60
[default] interface IXSLTemplate;
}

Expand All @@ -301,5 +301,5 @@ index 5bfb21d04ae..bfea408ab21 100644
helpstring("XML HTTP 6.0"),
progid("Msxml2.XMLHTTP.6.0"),
--
2.29.2
2.34.1

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From a1b46c58e7663a0c17d5dd2fbb3cc82fde40a06c Mon Sep 17 00:00:00 2001
From 7acf9c0e6c7f4bf86b1946778366b529a42fa660 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 1 Jun 2017 06:04:53 +0200
Subject: [PATCH] ntdll: Fix holes in ELF mappings. (v2)
Expand All @@ -10,10 +10,10 @@ Based on a patch by Andrew Wesie.
2 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index 209a2647d16..2fbb5922359 100644
index 0c1c91750ea..c4fcf43543f 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -1021,6 +1021,16 @@ static inline BOOL is_write_watch_range( const void *addr, size_t size )
@@ -1210,6 +1210,16 @@ static inline BOOL is_write_watch_range( const void *addr, size_t size )
}


Expand All @@ -30,7 +30,7 @@ index 209a2647d16..2fbb5922359 100644
/***********************************************************************
* find_view_range
*
@@ -3051,6 +3061,19 @@ NTSTATUS virtual_handle_fault( void *addr, DWORD err, void *stack )
@@ -3416,6 +3426,19 @@ NTSTATUS virtual_handle_fault( void *addr, DWORD err, void *stack )
/* ignore fault if page is writable now */
if (get_unix_prot( get_page_vprot( page ) ) & PROT_WRITE) ret = STATUS_SUCCESS;
}
Expand All @@ -51,40 +51,40 @@ index 209a2647d16..2fbb5922359 100644
return ret;
}
diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c
index d85099455aa..be12af58311 100644
index 519e39c3df0..c29168646e8 100644
--- a/dlls/psapi/tests/psapi_main.c
+++ b/dlls/psapi/tests/psapi_main.c
@@ -195,6 +195,7 @@ todo_wine
@@ -194,6 +194,7 @@ static void test_EnumProcessModules(void)
static void test_GetModuleInformation(void)
{
HMODULE hMod = GetModuleHandleA(NULL);
+ DWORD *tmp, counter = 0;
MODULEINFO info;
DWORD ret;

@@ -214,10 +215,21 @@ static void test_GetModuleInformation(void)
@@ -213,10 +214,21 @@ static void test_GetModuleInformation(void)
GetModuleInformation(hpQV, hMod, &info, sizeof(info)-1);
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected error=ERROR_INSUFFICIENT_BUFFER but got %d\n", GetLastError());
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected error=ERROR_INSUFFICIENT_BUFFER but got %ld\n", GetLastError());

- SetLastError(0xdeadbeef);
ret = GetModuleInformation(hpQV, hMod, &info, sizeof(info));
ok(ret == 1, "failed with %d\n", GetLastError());
ok(ret == 1, "failed with %ld\n", GetLastError());
ok(info.lpBaseOfDll == hMod, "lpBaseOfDll=%p hMod=%p\n", info.lpBaseOfDll, hMod);
+
+ hMod = LoadLibraryA("shell32.dll");
+ ok(hMod != NULL, "Failed to load shell32.dll, error: %u\n", GetLastError());
+ ok(hMod != NULL, "Failed to load shell32.dll, error: %lu\n", GetLastError());
+
+ ret = GetModuleInformation(hpQV, hMod, &info, sizeof(info));
+ ok(ret == 1, "failed with %d\n", GetLastError());
+ ok(ret == 1, "failed with %lu\n", GetLastError());
+ info.SizeOfImage /= sizeof(DWORD);
+ for (tmp = (DWORD *)hMod; info.SizeOfImage; info.SizeOfImage--)
+ counter ^= *tmp++;
+ trace("xor of shell32: %08x\n", counter);
+ trace("xor of shell32: %08lx\n", counter);
+
+ FreeLibrary(hMod);
}

static BOOL check_with_margin(SIZE_T perf, SIZE_T sysperf, int margin)
--
2.28.0
2.34.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 11107a30f5ddc2065d2b254fad2d10bc158a1ebb Mon Sep 17 00:00:00 2001
From 80cb1bf9077b1e754fc2f3426229733c3417c397 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Tue, 19 Aug 2014 22:10:49 -0600
Subject: [PATCH] ntdll: Implement retrieving DOS attributes in
Expand All @@ -10,18 +10,18 @@ Subject: [PATCH] ntdll: Implement retrieving DOS attributes in
2 files changed, 50 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index d621ae6e712..3ddff238d74 100644
index c68c5975e63..84efc670ca4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -65,6 +65,7 @@ AC_ARG_WITH(usb, AS_HELP_STRING([--without-usb],[do not use the libusb lib
@@ -64,6 +64,7 @@ AC_ARG_WITH(unwind, AS_HELP_STRING([--without-unwind],[do not use the libunwi
AC_ARG_WITH(usb, AS_HELP_STRING([--without-usb],[do not use the libusb library]))
AC_ARG_WITH(v4l2, AS_HELP_STRING([--without-v4l2],[do not use v4l2 (video capture)]))
AC_ARG_WITH(vkd3d, AS_HELP_STRING([--without-vkd3d],[do not use vkd3d (Direct3D 12 support)]))
AC_ARG_WITH(vulkan, AS_HELP_STRING([--without-vulkan],[do not use Vulkan]))
+AC_ARG_WITH(xattr, AS_HELP_STRING([--without-xattr],[do not use xattr (security attributes support)]))
AC_ARG_WITH(xcomposite,AS_HELP_STRING([--without-xcomposite],[do not use the Xcomposite extension]),
[if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_Xcomposite_h=no; fi])
AC_ARG_WITH(xcursor, AS_HELP_STRING([--without-xcursor],[do not use the Xcursor extension]),
@@ -642,6 +643,17 @@ AC_CHECK_HEADERS([libprocstat.h],,,
@@ -634,6 +635,17 @@ AC_CHECK_HEADERS([libprocstat.h],,,
#include <sys/queue.h>
#endif])

Expand All @@ -40,7 +40,7 @@ index d621ae6e712..3ddff238d74 100644

AC_SUBST(DLLFLAGS,"")
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index e459087af76..0b6e5d3b6a7 100644
index a29b5cbb980..1ae4645c6fb 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -98,6 +98,9 @@
Expand Down Expand Up @@ -118,5 +118,5 @@ index e459087af76..0b6e5d3b6a7 100644
}

--
2.33.0
2.34.1

Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
From 06af804bd6e75332dd2be2005b443e285bc4f2dc Mon Sep 17 00:00:00 2001
From 49f8ae15c8065c9133e0c08eaba68049cdb85e0b Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Wed, 20 Aug 2014 00:08:52 -0600
Subject: [PATCH] ntdll: Implement storing DOS attributes in
NtSetInformationFile.

---
dlls/ntdll/tests/file.c | 8 ++---
dlls/ntdll/unix/file.c | 76 +++++++++++++++++++++++++++++------------
2 files changed, 59 insertions(+), 25 deletions(-)
dlls/ntdll/unix/file.c | 74 ++++++++++++++++++++++++++++++-----------
2 files changed, 58 insertions(+), 24 deletions(-)

diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index 19ae5f2ac21..cb578ceee9e 100644
index 4014b395b56..ad718fab828 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -1400,7 +1400,7 @@ static void test_file_basic_information(void)
@@ -1401,7 +1401,7 @@ static void test_file_basic_information(void)
memset(&fbi, 0, sizeof(fbi));
res = pNtQueryInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation);
ok ( res == STATUS_SUCCESS, "can't get attributes\n");
- todo_wine ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_SYSTEM, "attribute %x not FILE_ATTRIBUTE_SYSTEM\n", fbi.FileAttributes );
+ ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_SYSTEM, "attribute %x not FILE_ATTRIBUTE_SYSTEM (ok in old linux without xattr)\n", fbi.FileAttributes );
- todo_wine ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_SYSTEM, "attribute %lx not FILE_ATTRIBUTE_SYSTEM\n", fbi.FileAttributes );
+ ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_SYSTEM, "attribute %lx not FILE_ATTRIBUTE_SYSTEM (ok in old linux without xattr)\n", fbi.FileAttributes );

/* Then HIDDEN */
memset(&fbi, 0, sizeof(fbi));
@@ -1413,7 +1413,7 @@ static void test_file_basic_information(void)
@@ -1414,7 +1414,7 @@ static void test_file_basic_information(void)
memset(&fbi, 0, sizeof(fbi));
res = pNtQueryInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation);
ok ( res == STATUS_SUCCESS, "can't get attributes\n");
- todo_wine ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_HIDDEN, "attribute %x not FILE_ATTRIBUTE_HIDDEN\n", fbi.FileAttributes );
+ ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_HIDDEN, "attribute %x not FILE_ATTRIBUTE_HIDDEN (ok in old linux without xattr)\n", fbi.FileAttributes );
- todo_wine ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_HIDDEN, "attribute %lx not FILE_ATTRIBUTE_HIDDEN\n", fbi.FileAttributes );
+ ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_HIDDEN, "attribute %lx not FILE_ATTRIBUTE_HIDDEN (ok in old linux without xattr)\n", fbi.FileAttributes );

/* Check NORMAL last of all (to make sure we can clear attributes) */
memset(&fbi, 0, sizeof(fbi));
@@ -1470,7 +1470,7 @@ static void test_file_all_information(void)
@@ -1471,7 +1471,7 @@ static void test_file_all_information(void)
memset(&fai_buf.fai, 0, sizeof(fai_buf.fai));
res = pNtQueryInformationFile(h, &io, &fai_buf.fai, sizeof fai_buf, FileAllInformation);
ok ( res == STATUS_SUCCESS, "can't get attributes, res %x\n", res);
- todo_wine ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_SYSTEM, "attribute %x not FILE_ATTRIBUTE_SYSTEM\n", fai_buf.fai.BasicInformation.FileAttributes );
+ ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_SYSTEM, "attribute %x not FILE_ATTRIBUTE_SYSTEM (ok in old linux without xattr)\n", fai_buf.fai.BasicInformation.FileAttributes );
- todo_wine ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_SYSTEM, "attribute %lx not FILE_ATTRIBUTE_SYSTEM\n", fai_buf.fai.BasicInformation.FileAttributes );
+ ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_SYSTEM, "attribute %lx not FILE_ATTRIBUTE_SYSTEM (ok in old linux without xattr)\n", fai_buf.fai.BasicInformation.FileAttributes );

/* Then HIDDEN */
memset(&fai_buf.fai.BasicInformation, 0, sizeof(fai_buf.fai.BasicInformation));
@@ -1483,7 +1483,7 @@ static void test_file_all_information(void)
@@ -1484,7 +1484,7 @@ static void test_file_all_information(void)
memset(&fai_buf.fai, 0, sizeof(fai_buf.fai));
res = pNtQueryInformationFile(h, &io, &fai_buf.fai, sizeof fai_buf, FileAllInformation);
ok ( res == STATUS_SUCCESS, "can't get attributes\n");
- todo_wine ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_HIDDEN, "attribute %x not FILE_ATTRIBUTE_HIDDEN\n", fai_buf.fai.BasicInformation.FileAttributes );
+ ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_HIDDEN, "attribute %x not FILE_ATTRIBUTE_HIDDEN (ok in old linux without xattr)\n", fai_buf.fai.BasicInformation.FileAttributes );
- todo_wine ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_HIDDEN, "attribute %lx not FILE_ATTRIBUTE_HIDDEN\n", fai_buf.fai.BasicInformation.FileAttributes );
+ ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_HIDDEN, "attribute %lx not FILE_ATTRIBUTE_HIDDEN (ok in old linux without xattr)\n", fai_buf.fai.BasicInformation.FileAttributes );

/* Check NORMAL last of all (to make sure we can clear attributes) */
memset(&fai_buf.fai.BasicInformation, 0, sizeof(fai_buf.fai.BasicInformation));
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index a2cae9708db..9a1bd50c695 100644
index a3520898d57..cd53ca36238 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -374,6 +374,26 @@ NTSTATUS errno_to_status( int err )
@@ -362,6 +362,26 @@ NTSTATUS errno_to_status( int err )
#define XATTR_USER_PREFIX "user."
#endif

Expand All @@ -80,7 +80,7 @@ index a2cae9708db..9a1bd50c695 100644
static int xattr_get( const char *path, const char *name, void *value, size_t size )
{
#if defined(HAVE_ATTR_XATTR_H)
@@ -1520,6 +1540,39 @@ static int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULON
@@ -1508,6 +1528,39 @@ static int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULON
}


Expand Down Expand Up @@ -120,19 +120,18 @@ index a2cae9708db..9a1bd50c695 100644
/* get the stat info and file attributes for a file (by name) */
static int get_file_info( const char *path, struct stat *st, ULONG *attr )
{
@@ -4356,7 +4409,6 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
@@ -4359,7 +4412,6 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
case FileBasicInformation:
if (len >= sizeof(FILE_BASIC_INFORMATION))
{
- struct stat st;
const FILE_BASIC_INFORMATION *info = ptr;
LARGE_INTEGER mtime, atime;

@@ -4369,26 +4421,8 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
if (atime.QuadPart || mtime.QuadPart)
@@ -4373,25 +4425,7 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
status = set_file_times( fd, &mtime, &atime );

- if (status == STATUS_SUCCESS && info->FileAttributes)
if (status == STATUS_SUCCESS && info->FileAttributes)
- {
- if (fstat( fd, &st ) == -1) status = errno_to_status( errno );
- else
Expand All @@ -152,11 +151,10 @@ index a2cae9708db..9a1bd50c695 100644
- if (fchmod( fd, st.st_mode ) == -1) status = errno_to_status( errno );
- }
- }
+ if (status == STATUS_SUCCESS && info->FileAttributes)
+ status = fd_set_file_info( fd, info->FileAttributes );

if (needs_close) close( fd );
}
--
2.30.2
2.35.1

Loading