pespin submitted this change.

View Change

Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved
tests/osmo_io: Introduce small sleeps waiting for write completion

Sometimes test_file() fails during jenkins run because it finished the
main loop iterations without having received a write complete cb.
This may be due to filesystem delays due to system load, it's difficult
to say since it only happens sporadically.
Add some small sleeps under each loop iteration (which can end up
waiting up to 10s after full set of iterations) to make sure we receive
the write callback in a timely fashion.

Related: OS#6708
Change-Id: I637f9a5a5f633843b09d4677a0fff48bb75672e9
---
M tests/osmo_io/osmo_io_test.c
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/tests/osmo_io/osmo_io_test.c b/tests/osmo_io/osmo_io_test.c
index d072ebe..95d78b0 100644
--- a/tests/osmo_io/osmo_io_test.c
+++ b/tests/osmo_io/osmo_io_test.c
@@ -108,6 +108,7 @@
if (file_bytes_write_compl == sizeof(TESTDATA))
break;
osmo_select_main(1);
+ usleep(100 * 1000);
}
fflush(stdout);
OSMO_ASSERT(file_bytes_write_compl == sizeof(TESTDATA));

To view, visit change 39423. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I637f9a5a5f633843b09d4677a0fff48bb75672e9
Gerrit-Change-Number: 39423
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann@sysmocom.de>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>