On Mon Feb 5 20:11:42 2024 +0000, Paul Gofman wrote:
I am reproducing this result with ucrtbase only when adding ported test_gmtime() to ucrtbase/tests/misc.c in the end, with invalid parameter handler set in the previous tests. The attached test (on top of the present patchset) succeeds for me on Windows 10. This test has _set_invalid_parameter_handler(NULL); before the added tests. So unless I am missing something this specific behaviour with *secs < 0 succeeding is related to the presence of invalid parameter handler and not to actual acceptance of *secs < 0 result. We are currently missing such handling in ucrtbase time functions but that looks unrelated? [test.patch](/uploads/fb6429ea32d7760cab1ee9d82bc22129/test.patch)
Sorry, it looks like I my test just crashes on = _gmtime32(NULL); without the handler, and _gmtime32 may actually succeed, I need to look more.