Make tests/test-captive.sh stable.

This commit is contained in:
Richard W.M. Jones 2019-10-19 18:33:03 +01:00
parent f1625484a3
commit 1c50b60365
2 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,30 @@
From 05e478255b23a7149e5189fe718dad53a4488701 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sat, 19 Oct 2019 18:31:24 +0100
Subject: [PATCH] tests/test-captive.sh: Revert sleep back to 5 seconds.
For unknown reasons this makes the test very prone to failure on slow
or heavily loaded machines.
Reverts sleep change from
commit 38165d0f8f5a4eb898d756a561811c2fe042fe4d.
---
tests/test-captive.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/test-captive.sh b/tests/test-captive.sh
index 88c0d81..b62d5fc 100755
--- a/tests/test-captive.sh
+++ b/tests/test-captive.sh
@@ -44,7 +44,7 @@ rm -f $files
cleanup_fn rm -f $files
nbdkit -U $sock example1 --run '
- sleep 1; echo nbd=$nbd; echo port=$port; echo socket=$unixsocket
+ sleep 5; echo nbd=$nbd; echo port=$port; echo socket=$unixsocket
' > captive.out
# Check the output.
--
2.23.0

View File

@ -41,6 +41,9 @@ Source1: http://libguestfs.org/download/nbdkit/%{source_directory}/%{name
Source2: libguestfs.keyring
%endif
# Make tests/test-captive.sh stable.
Patch1: 0001-tests-test-captive.sh-Revert-sleep-back-to-5-seconds.patch
%if 0%{patches_touch_autotools}
BuildRequires: autoconf, automake, libtool
%endif