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