From 7e1972796b1706a668643830f3e5aa9960a85a70 Mon Sep 17 00:00:00 2001 From: Joe Watkins Date: Sun, 16 Jun 2019 07:02:28 +0200 Subject: [PATCH] gettimeofday cannot be used to reliably implement high precision process synchronization The use of gettimeofday in time_sleep_until is technically incorrect, it's not possible to use gettimeofday in this way reliably on any platform: It relies on operating system global structures, which may be modified by any other process on the system at any time. While in practice, users may be ignoring this flaw, it entirely depends on the other software running on the system to which the application is deployed, there is no possible way to write a test that will always pass on any system, therefore it must be marked XFAIL. --- ext/standard/tests/misc/time_sleep_until_basic.phpt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/standard/tests/misc/time_sleep_until_basic.phpt b/ext/standard/tests/misc/time_sleep_until_basic.phpt index cac7133e95..7f35677d1e 100644 --- a/ext/standard/tests/misc/time_sleep_until_basic.phpt +++ b/ext/standard/tests/misc/time_sleep_until_basic.phpt @@ -32,3 +32,5 @@ Michele Orselli mo@ideato.it --EXPECT-- bool(true) bool(true) +--XFAIL-- +gettimeofday cannot be used to reliably implement high precision process synchronization -- 2.40.0