https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a6faa1b82dd6fa68174cb341084855eae2fd4df3

commit a6faa1b82dd6fa68174cb341084855eae2fd4df3
Author:     Timo Kreuzer <[email protected]>
AuthorDate: Mon Jan 30 20:38:40 2023 +0200
Commit:     Timo Kreuzer <[email protected]>
CommitDate: Tue Jan 31 18:39:21 2023 +0100

    [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

Reply via email to