* Be more lenient when checking the timeout. In my tests Haiku was up to

5ms off. Not really good...
* The test on non-shared unnamed semaphores doesn't request a shared
  semaphore anymore. It passes under Haiku, now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25363 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2008-05-08 01:44:46 +00:00
parent 3dfe682f55
commit 5a5ff85178

View File

@ -82,9 +82,9 @@ static void
_assert_time_equals(const char* test, bigtime_t expected,
bigtime_t actual, int lineNumber)
{
// allow 2% deviation
// allow 5% deviation
bigtime_t diff = actual > expected ? actual - expected : expected - actual;
if (diff <= expected / 50)
if (diff <= expected / 20)
return;
fprintf(stderr, "%s FAILED in line %d: expected time: %lld, actual: %lld\n",
@ -948,7 +948,7 @@ test_post_wait_unnamed_fork()
// init
TEST("sem_init()");
sem_t _sem;
assert_posix_success(sem_init(&_sem, 1, 1));
assert_posix_success(sem_init(&_sem, 0, 1));
sem_t* sem = &_sem;
TEST("sem_getvalue()");