Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/gen Provide clear explanation of test-case fa...
details: https://anonhg.NetBSD.org/src/rev/9d8ea8307ecb
branches: trunk
changeset: 782602:9d8ea8307ecb
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Thu Nov 08 16:33:26 2012 +0000
description:
Provide clear explanation of test-case failures.
diffstat:
tests/lib/libc/gen/t_sleep.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diffs (32 lines):
diff -r 73a6feac4ae2 -r 9d8ea8307ecb tests/lib/libc/gen/t_sleep.c
--- a/tests/lib/libc/gen/t_sleep.c Thu Nov 08 16:30:12 2012 +0000
+++ b/tests/lib/libc/gen/t_sleep.c Thu Nov 08 16:33:26 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_sleep.c,v 1.2 2012/11/08 04:58:44 pgoyette Exp $ */
+/* $NetBSD: t_sleep.c,v 1.3 2012/11/08 16:33:26 pgoyette Exp $ */
/*-
* Copyright (c) 2006 Frank Kardel
@@ -135,10 +135,9 @@
ATF_REQUIRE_MSG(rtc != -1 || kerrno == EINTR, "kevent: %s",
strerror(errno));
- if (rtc == 0)
- ATF_REQUIRE_MSG((delay->tv_sec * BILLION + delay->tv_nsec -
- tmo * MILLION) <= 0,
- "kevent - none queued - timing error");
+ if (delay->tv_sec * BILLION + delay->tv_nsec > tmo * MILLION)
+ ATF_REQUIRE_MSG(rtc > 0,
+ "kevent: ALARM did not cause EVFILT_TIMER event");
return 0;
}
@@ -264,7 +263,7 @@
delta3 *= round;
ATF_REQUIRE_MSG(delta3 <= FUZZ && delta3 >= -FUZZ,
- "Elapsed time %"PRId64" exceeds allowable fuzz %lld",
+ "Reschedule latency %"PRId64" exceeds allowable fuzz %lld",
delta3, FUZZ);
delta3 = (int64_t)tslp.tv_sec * 2 * BILLION;
Home |
Main Index |
Thread Index |
Old Index