Commit dc94b037 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

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=51188Signed-off-by: 's avatarFrancois Gouget <fgouget@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent abd3e8f3
...@@ -952,12 +952,14 @@ static void test_user_shared_data(void) ...@@ -952,12 +952,14 @@ static void test_user_shared_data(void)
ok(xstate.OptimizedSave, "Got zero OptimizedSave with compaction enabled.\n"); ok(xstate.OptimizedSave, "Got zero OptimizedSave with compaction enabled.\n");
ok(!xstate.AlignedFeatures, "Got unexpected AlignedFeatures %s.\n", ok(!xstate.AlignedFeatures, "Got unexpected AlignedFeatures %s.\n",
wine_dbgstr_longlong(xstate.AlignedFeatures)); wine_dbgstr_longlong(xstate.AlignedFeatures));
ok(xstate.AllFeatureSize >= 512 + sizeof(XSTATE), "Got unexpected AllFeatureSize %u.\n", ok(xstate.AllFeatureSize >= 512 + sizeof(XSTATE)
xstate.AllFeatureSize); || !xstate.AllFeatureSize /* win8 on CPUs without XSAVEC */,
"Got unexpected AllFeatureSize %u.\n", xstate.AllFeatureSize);
for (i = 0; i < ARRAY_SIZE(feature_sizes); ++i) 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, "Got unexpected AllFeatures[%u] %u, expected %u.\n", i,
xstate.AllFeatures[i], feature_sizes[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, ok(xstate.Features[i].Size == feature_sizes[i], "Got unexpected Features[%u].Size %u, expected %u.\n", i,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment