From 337f4eb0180c07ef457bc9c408ed63beed3873c7 Mon Sep 17 00:00:00 2001 From: Avi Kivity <avi@cloudius-systems.com> Date: Wed, 15 Jan 2014 19:28:17 +0200 Subject: [PATCH] tst-kill: fix timeout test The timeout test sets a 2 second timeout and a 1 second alarm, and expects the timeout to happen first. Change the timeout to 0.5 seconds. Signed-off-by: Avi Kivity <avi@cloudius-systems.com> Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com> --- tests/tst-kill.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tst-kill.cc b/tests/tst-kill.cc index 6d3541c33..1d2105787 100644 --- a/tests/tst-kill.cc +++ b/tests/tst-kill.cc @@ -100,9 +100,9 @@ int main(int ac, char** av) report(sr != SIG_ERR, "set SIGALRM handlerto SIG_IGN"); struct timeval tv = {0}; - tv.tv_sec = 2; + tv.tv_usec = 500000; auto res = setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)); - report(res == 0, "set socket receive timeout 2 seconds"); + report(res == 0, "set socket receive timeout 0.5 seconds"); alarm(1); -- GitLab