pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/39423?usp=email )
Change subject: tests/osmo_io: Introduce small sleeps waiting for write completion ......................................................................
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(-)
Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved
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));