[PATCH v2 0/1] MR8303: msvcrt/tests: Add broken to new j modifier tests.
Followup to ec8fda8372. [Test pattern page](https://test.winehq.org/data/patterns.html#msvcrt:scanf) [Testbot run with this patch](https://testbot.winehq.org/JobDetails.pl?Key=158655). -- v2: msvcrt/tests: Add broken to new j modifier tests. https://gitlab.winehq.org/wine/wine/-/merge_requests/8303
From: Bernhard Übelacker <bernhardu(a)mailbox.org> Followup to ec8fda8372. --- dlls/msvcrt/tests/scanf.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/tests/scanf.c b/dlls/msvcrt/tests/scanf.c index b41f0d1d119..ed1122ce100 100644 --- a/dlls/msvcrt/tests/scanf.c +++ b/dlls/msvcrt/tests/scanf.c @@ -353,8 +353,12 @@ static void test_sscanf( void ) result64 = 0; ret = p_sscanf("0xfefefefefefefefe", "%jx", &result64); - ok(ret == 1, "got %d\n", ret); - ok(result64 == 0xfefefefefefefefell, "got 0x%s\n", wine_dbgstr_longlong(result64)); + ok(ret == 1 || + broken(ret == 0 && p_sprintf(buffer, "%jx", 0xfefell) <= 2) /* <= Win10-1709 */, + "got %d\n", ret); + ok(result64 == 0xfefefefefefefefell || + broken(ret == 0 && p_sprintf(buffer, "%jx", 0xfefell) <= 2) /* <= Win10-1709 */, + "got 0x%s\n", wine_dbgstr_longlong(result64)); } static void test_sscanf_s(void) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/8303
On Fri Jun 13 20:50:31 2025 +0000, Bernhard Übelacker wrote:
changed this line in [version 2 of the diff](/wine/wine/-/merge_requests/8303/diffs?diff_id=185477&start_sha=c48fd887e9f9c0bfbb9599af9fd3fd8007847526#d97fbb5d4da79b50fd7f8ef4912f25c724c94cf2_357_356) Before removing the test, would making the broken depend on if sprintf supports the j modifier an improvement?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/8303#note_106547
On Fri Jun 13 20:52:59 2025 +0000, Bernhard Übelacker wrote:
Before removing the test, would making the broken depend on if sprintf supports the j modifier an improvement? It's not perfect since printf and scanf behavior are likely to be related. I'm going to approve it since it looks like a reasonable compromise.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/8303#note_106576
This merge request was approved by Piotr Caban. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8303
participants (2)
-
Bernhard Übelacker -
Piotr Caban (@piotr)