Hi,

Failed testsuite 1541 in curl is quite simple, it's related to the clock
accuracy of Gnu Mach.

It checks for the total time of requesting a page under http
protocol[0][1]. More than 0 is needed.

Failed log
```
 1541: data FAILED:
--- log/check-expected  2025-03-01 16:42:29.000000000 +0800
+++ log/check-generated 2025-03-01 16:42:29.000000000 +0800
@@ -1,7 +1,7 @@
 CURLINFO_CONNECT_TIME_T on 1st header is OK[LF]
 CURLINFO_PRETRANSFER_TIME_T on 1st header is OK[LF]
 CURLINFO_STARTTRANSFER_TIME_T on 1st header is OK[LF]
-CURLINFO_TOTAL_TIME_T on 1st header is OK[LF]
+CURLINFO_TOTAL_TIME_T on 1st header is WRONG: 0[LF]
 CURLINFO_APPCONNECT_TIME_T on 1st header is OK[LF]
 CURLINFO_SPEED_DOWNLOAD_T on 1st header is OK[LF]
 HTTP/1.1 200 OK swsclose[CR][LF]
```

It's just too fast and our GNU Mach clock is not accurate enough:

On Hurd:
```
1speaker@debian:~/curl/tests$ curl -s -w '%{time_total}\n' http://localhost -o 
/dev/null
0.000000
1speaker@debian:~/curl/tests$ curl -s -w '%{time_total}\n' https://example.com 
-o /dev/null
1.040000
```

On GNU/Linux:
```
:) tmp.MgdVm6fFhU > curl -s -w '%{time_total}\n' https://curl.se -o /dev/null
1.101230
:) tmp.MgdVm6fFhU > curl -s -w '%{time_total}\n' http://localhost -o /dev/null
0.000711
```

Well to be honest I haven't came out of a good idea of fixing it on the
upstream. Maybe adding the support of high accuracy clock in GNU Mach is
more realistic? It may be worth to be added into the TODO list in the
wiki page.

[0]: https://github.com/curl/curl/blob/master/tests/libtest/lib1541.c#L93
[1]: https://github.com/curl/curl/blob/master/tests/libtest/lib1541.c#L65

Best,
Zhaoming


Reply via email to