From a6faa1b82dd6fa68174cb341084855eae2fd4df3 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Mon, 30 Jan 2023 20:38:40 +0200 Subject: [PATCH] [CRT_APITEST] Fix test for strlen The direction flag in eflags is preserved on x64, but not on x86. --- modules/rostests/apitests/crt/strlen.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/rostests/apitests/crt/strlen.c b/modules/rostests/apitests/crt/strlen.c index 7f0c9d7e6fe..c8103f5d891 100644 --- a/modules/rostests/apitests/crt/strlen.c +++ b/modules/rostests/apitests/crt/strlen.c @@ -48,7 +48,12 @@ Test_strlen(PFN_STRLEN pstrlen) eflags = __readeflags(); __writeeflags(eflags | EFLAGS_DF); len = pstrlen(teststr + 4); - ok((__readeflags() & EFLAGS_DF) != 0, "Direction flag in ELFAGS was changed."); + +#ifdef _M_AMD64 + ok((__readeflags() & EFLAGS_DF) != 0, "Direction flag in ELFAGS was changed.\n"); +#else + ok((__readeflags() & EFLAGS_DF) == 0, "Direction flag in ELFAGS was not changed.\n"); +#endif __writeeflags(eflags); /* Only test this for the exported versions, intrinsics might do it