Commit Graph

17 Commits

Author SHA1 Message Date
Pleuvens
011a1ac1a3
test: switch to new-style ASSERT_EQ macros (#4159)
Switch from old-style ASSERT macro to new-style ASSERT_EQ,... macros.

Using new-style macros makes it easier to debug test failures

Fixes: https://github.com/libuv/libuv/issues/2974
2023-10-06 19:50:15 +02:00
Ben Noordhuis
c8a1e6132b
unix,win: add uv_clock_gettime() (#3971)
Fixes: https://github.com/libuv/libuv/issues/1674
2023-04-27 22:13:46 +02:00
Ben Noordhuis
cdee607d48 test: relax uv_hrtime() test assumptions
Expecting `uv_sleep(45)` to wake up within 80 ms is not a reasonable
assumption: the operating system may not reschedule the process within
that time frame when the system is overloaded.

The test fails intermittently on our own CI and packagers have reported
similar failures.

Fixes: https://github.com/libuv/libuv/issues/2117
PR-URL: https://github.com/libuv/libuv/pull/2186
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2019-02-21 13:02:44 +01:00
Bert Belder
9584df25dc
src,test: fix idiosyncratic comment style
Back in the day I wrote comments in a really unusual way. Nowadays it
makes my eyes bleed, and clang-format doesn't know how to deal with it.

PR-URL: https://github.com/libuv/libuv/pull/1853
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-05-29 11:56:49 -07:00
Ben Noordhuis
68b0c85c09 test: allow 80 ms intervals in hrtime test
The hrtimer functionality on my FreeBSD 9 system is fairly coarse, it's usually
just over the 60 ms that we tested for before this commit.
2012-07-03 22:33:10 +02:00
Bert Belder
9a3dff35c0 test: make the test-hrtime less likely to time out 2012-06-14 22:41:41 +02:00
Ben Noordhuis
59cda86709 unix, test: make NANOSEC a 64 bits unsigned int
Avoids accidental overflow / truncation when it's used in 32 bits arithmetic.
2012-06-07 17:00:01 +02:00
Shigeki Ohtsu
e2aa39aecf test: change uv_hrtime() test to iterate upto 100 2012-06-07 15:42:35 +02:00
Bert Belder
3d2d97dbae Make test-hrtime a little better 2011-07-19 15:01:11 +02:00
Ben Noordhuis
1a53b89847 test-hrtime: fix printf() compiler warning. 2011-07-13 18:06:05 +02:00
Ryan Dahl
ce8ff3031c src/ and include/ directories
Helps #71 but does not update the MSVC files.
2011-07-07 07:52:57 -07:00
Ben Noordhuis
09bd08ed97 Assert that uv_hrtime() actually sleeps for several microseconds. 2011-07-01 12:28:24 -04:00
Ryan Dahl
fa514948fc Move around uv_hrtime in the header 2011-06-28 14:30:10 +02:00
Ryan Dahl
7b56134f73 Rename uv_get_hrtime, uv_get_exepath to uv_hrtime, uv_exepath 2011-06-28 14:26:28 +02:00
Robert Mustacchi
6eefdaf966 Fixes #61. Failure in test-hrtime 2011-06-19 14:03:01 +02:00
Bert Belder
debae03771 Declare variables first 2011-06-17 23:00:38 +02:00
Ryan Dahl
24baf36075 Add test for uv_get_hrtime 2011-06-17 11:47:35 +02:00