Commit 4b82dd7b authored by Axel Haslam's avatar Axel Haslam Committed by Greg Kroah-Hartman

greybus: loopback_test: Use timeout argument

Patch "c3b0a32 Loopback_test: use poll instead of inotify"
added a optional argument for the user to specify a timeout value,
but did not use this parameter in the actual poll function. The
default of 30 seconds is always used.

Fix this by actually using the the poll_timeout parameter so the user
can run long tests.
Signed-off-by: default avatarAxel Haslam <ahaslam@baylibre.com>
Reviewed-by: default avatarPatrick Titiano <ptitiano@baylibre.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 7fe93014
...@@ -714,7 +714,7 @@ static int wait_for_complete(struct loopback_test *t) ...@@ -714,7 +714,7 @@ static int wait_for_complete(struct loopback_test *t)
int i; int i;
while (1) { while (1) {
ret = poll(t->fds, t->poll_count, DEFAULT_POLL_TIMEOUT_SEC * 1000); ret = poll(t->fds, t->poll_count, t->poll_timeout * 1000);
if (ret == 0) { if (ret == 0) {
fprintf(stderr, "Poll timmed out!\n"); fprintf(stderr, "Poll timmed out!\n");
return -1; return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment