Attention is currently required from: Frank Filz.

Lior Suliman would like Frank Filz to review this change.

View Change

multilock: Fixed a bug in the sleep command

The timeend - time(NULL) happened to be negative and that called
the pselect syscall with a negative number and the tool finished
with an error.

The case that ran was `simple_block`, when it got to the 2 second
sleep command it did it in two iterations and in the second
iteration the tv_secs was calculated to be minus 1 resulting in
an error from the pselect call.
Output:
Line 34: sleep 2
Waiting for clients
About to sleep for 2 secs
Waiting for clients
About to sleep for -1 secs <- Error
...
err: select failed with ERRNO 22 "Invalid argument"
Receive failed ERRNO 22 "Invalid argument"
Unexpected response
1 errors
FAIL

Change-Id: Ifddc3fe27ad72f21db6122a5084186051efc4fd2
Signed-off-by: Lior Suliman <liorsu@google.com>
---
M src/tools/multilock/ml_console.c
1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/79/555979/1

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

Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: Ifddc3fe27ad72f21db6122a5084186051efc4fd2
Gerrit-Change-Number: 555979
Gerrit-PatchSet: 1
Gerrit-Owner: Lior Suliman <liorsu@gmail.com>
Gerrit-Reviewer: Frank Filz <ffilzlnx@mindspring.com>
Gerrit-Attention: Frank Filz <ffilzlnx@mindspring.com>
Gerrit-MessageType: newchange