Francois Gouget : ntdll/tests: Fix the XState AllFeatureSize check on old CPUs.
Alexandre Julliard
julliard at winehq.org
Fri May 28 16:22:28 CDT 2021
Module: wine
Branch: master
Commit: dc94b03799363a94b6f93a8e46413803f4ec00dd
URL: https://source.winehq.org/git/wine.git/?a=commit;h=dc94b03799363a94b6f93a8e46413803f4ec00dd
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Fri May 28 18:12:34 2021 +0200
ntdll/tests: Fix the XState AllFeatureSize check on old CPUs.
On old CPUs lacking XSAVEC, Windows 8+ does not set AllFeatureSize and
AllFeatures.
Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=51188
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/tests/virtual.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/tests/virtual.c b/dlls/ntdll/tests/virtual.c
index e657a424fcd..5f155b1a147 100644
--- a/dlls/ntdll/tests/virtual.c
+++ b/dlls/ntdll/tests/virtual.c
@@ -952,12 +952,14 @@ static void test_user_shared_data(void)
ok(xstate.OptimizedSave, "Got zero OptimizedSave with compaction enabled.\n");
ok(!xstate.AlignedFeatures, "Got unexpected AlignedFeatures %s.\n",
wine_dbgstr_longlong(xstate.AlignedFeatures));
- ok(xstate.AllFeatureSize >= 512 + sizeof(XSTATE), "Got unexpected AllFeatureSize %u.\n",
- xstate.AllFeatureSize);
+ ok(xstate.AllFeatureSize >= 512 + sizeof(XSTATE)
+ || !xstate.AllFeatureSize /* win8 on CPUs without XSAVEC */,
+ "Got unexpected AllFeatureSize %u.\n", xstate.AllFeatureSize);
for (i = 0; i < ARRAY_SIZE(feature_sizes); ++i)
{
- ok(xstate.AllFeatures[i] == feature_sizes[i] || !xstate.AllFeatures[i],
+ ok(xstate.AllFeatures[i] == feature_sizes[i]
+ || !xstate.AllFeatures[i] /* win8+ on CPUs without XSAVEC */,
"Got unexpected AllFeatures[%u] %u, expected %u.\n", i,
xstate.AllFeatures[i], feature_sizes[i]);
ok(xstate.Features[i].Size == feature_sizes[i], "Got unexpected Features[%u].Size %u, expected %u.\n", i,
More information about the wine-cvs
mailing list