Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/core/test_poll_blocking.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void test_timeout_without_fds() {

int64_t duration = timeval_delta_ms(&begin, &end);
printf(" -> duration: %lld ms\n", duration);
assert(duration >= TIMEOUT_MS);
assert(duration >= TIMEOUT_MS - 1);
}

// Check if timeout works with fds without events
Expand All @@ -58,7 +58,7 @@ void test_timeout_with_fds_without_events() {

int64_t duration = timeval_delta_ms(&begin, &end);
printf(" -> duration: %lld ms\n", duration);
assert(duration >= TIMEOUT_MS);
assert(duration >= TIMEOUT_MS - 1);

close(pipe_a[0]); close(pipe_a[1]);
}
Expand Down Expand Up @@ -96,7 +96,7 @@ void test_unblock_poll() {

int64_t duration = timeval_delta_ms(&begin, &end);
printf(" -> duration: %lld ms\n", duration);
assert(duration >= TIMEOUT_MS);
assert(duration >= TIMEOUT_MS - 1);

pthread_join(tid, NULL);

Expand All @@ -115,7 +115,7 @@ void *do_poll_in_thread(void * arg) {

int64_t duration = timeval_delta_ms(&begin, &end);
printf(" -> duration: %lld ms\n", duration);
assert((duration >= TIMEOUT_MS) && (duration < 4000));
assert((duration >= TIMEOUT_MS - 1) && (duration < 4000));

return NULL;
}
Expand Down
4 changes: 2 additions & 2 deletions test/core/test_poll_blocking_asyncify.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void test_timeout_without_fds() {

int64_t duration = timeval_delta_ms(&begin, &end);
printf(" -> duration: %lld ms\n", duration);
assert(duration >= 1000);
assert(duration >= 1000 - 1);
}

int pipe_shared[2];
Expand Down Expand Up @@ -69,7 +69,7 @@ void test_unblock_poll() {

int64_t duration = timeval_delta_ms(&begin, &end);
printf(" -> duration: %lld ms\n", duration);
assert(duration >= 1000);
assert(duration >= 1000 - 1);

close(pipe_a[0]); close(pipe_a[1]);
close(pipe_shared[0]); close(pipe_shared[1]);
Expand Down
8 changes: 4 additions & 4 deletions test/core/test_select_blocking.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void test_timeout_without_fds() {

int64_t duration = timeval_delta_ms(&begin, &end);
printf(" -> duration: %lld ms\n", duration);
assert(duration >= TIMEOUT_MS);
assert(duration >= TIMEOUT_MS - 1);
}

// Check if timeout works with fds without events
Expand All @@ -61,7 +61,7 @@ void test_timeout_with_fds_without_events() {

int64_t duration = timeval_delta_ms(&begin, &end);
printf(" -> duration: %lld ms\n", duration);
assert(duration >= TIMEOUT_MS);
assert(duration >= TIMEOUT_MS - 1);

close(pipe_a[0]); close(pipe_a[1]);
}
Expand Down Expand Up @@ -100,7 +100,7 @@ void test_unblock_select() {

int64_t duration = timeval_delta_ms(&begin, &end);
printf(" -> duration: %lld ms\n", duration);
assert(duration >= TIMEOUT_MS);
assert(duration >= TIMEOUT_MS - 1);

pthread_join(tid, NULL);

Expand All @@ -126,7 +126,7 @@ void *do_select_in_thread(void * arg) {

int64_t duration = timeval_delta_ms(&begin, &end);
printf(" -> duration: %lld ms\n", duration);
assert((duration >= TIMEOUT_MS) && (duration < 4000));
assert((duration >= TIMEOUT_MS - 1) && (duration < 4000));

return NULL;
}
Expand Down