]> git.ipfire.org Git - thirdparty/qemu.git/commit
ide-test: fix timeouts
authorJohn Snow <jsnow@redhat.com>
Tue, 24 Nov 2015 19:36:11 +0000 (14:36 -0500)
committerJohn Snow <jsnow@redhat.com>
Wed, 25 Nov 2015 16:37:34 +0000 (11:37 -0500)
commit9c73517ca56d6611371376bd298b4b20f3ad6140
treedae9713f3ceaea6fa23655ed9c18577d4e954f01
parent73a27d9ac35e3da3a2cf0ebd0bcc2be6de19dd0a
ide-test: fix timeouts

Use explicit timeouts instead of trying to approximate it by counting
the cumulative duration of nsleep calls.

In practice, the timeout if inb() dwarfed the nsleep delays, and as a
result the real timeout value became a lot larger than 5 seconds.

So: change the semantics from "Not sooner than 5 seconds" to "no more
than 5 seconds" to ensure we don't hang the tester for very long.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 1448393771-15483-2-git-send-email-jsnow@redhat.com
tests/ide-test.c