pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmocore/+/39430?usp=email )
Change subject: tests/osmo_io: Introduce small sleeps waiting for read completion
......................................................................
tests/osmo_io: Introduce small sleeps waiting for read completion
Sometimes test_file() fails during jenkins run because it finished the
main loop iterations without having received a read 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 read callback in a timely fashion.
Related: OS#6708
Change-Id: If27e3885aa17edbb7f2428cf6b5b30fb0f987d7d
---
M tests/osmo_io/osmo_io_test.c
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/30/39430/1
diff --git a/tests/osmo_io/osmo_io_test.c b/tests/osmo_io/osmo_io_test.c
index 95d78b0..553368c 100644
--- a/tests/osmo_io/osmo_io_test.c
+++ b/tests/osmo_io/osmo_io_test.c
@@ -126,6 +126,7 @@
if (file_bytes_read == sizeof(TESTDATA) && file_eof_read)
break;
osmo_select_main(1);
+ usleep(100 * 1000);
}
fflush(stdout);
OSMO_ASSERT(file_bytes_read == sizeof(TESTDATA));
--
To view, visit
https://gerrit.osmocom.org/c/libosmocore/+/39430?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: If27e3885aa17edbb7f2428cf6b5b30fb0f987d7d
Gerrit-Change-Number: 39430
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>