attempt to improve test suite coverage

This commit is contained in:
Kamil Dudka 2009-12-05 19:48:31 +00:00
parent aec87c1fc1
commit caf63a251a
3 changed files with 68 additions and 19 deletions

View File

@ -0,0 +1,51 @@
diff --git a/tests/data/test1083 b/tests/data/test1083
index e441278..b0958b6 100644
--- a/tests/data/test1083
+++ b/tests/data/test1083
@@ -33,13 +33,13 @@ ipv6
http-ipv6
</server>
<name>
-HTTP-IPv6 GET with ip6-localhost --interface
+HTTP-IPv6 GET with localhost6 --interface
</name>
<command>
--g "http://%HOST6IP:%HTTP6PORT/1083" --interface ip6-localhost
+-g "http://%HOST6IP:%HTTP6PORT/1083" --interface localhost6
</command>
<precheck>
-perl -e "if ('%CLIENT6IP' ne '[::1]') {print 'Test requires default test server host address';} else {exec './server/resolve --ipv6 ip6-localhost'; print 'Cannot run precheck resolve';}"
+perl -e "if ('%CLIENT6IP' ne '[::1]') {print 'Test requires default test server host address';} else {exec './server/resolve --ipv6 localhost6'; print 'Cannot run precheck resolve';}"
</precheck>
</client>
diff --git a/tests/data/test241 b/tests/data/test241
index 46eae1f..4e1632c 100644
--- a/tests/data/test241
+++ b/tests/data/test241
@@ -30,13 +30,13 @@ ipv6
http-ipv6
</server>
<name>
-HTTP-IPv6 GET (using ip6-localhost)
+HTTP-IPv6 GET (using localhost6)
</name>
<command>
--g "http://ip6-localhost:%HTTP6PORT/241"
+-g "http://localhost6:%HTTP6PORT/241"
</command>
<precheck>
-./server/resolve --ipv6 ip6-localhost
+./server/resolve --ipv6 localhost6
</precheck>
</client>
@@ -48,7 +48,7 @@ HTTP-IPv6 GET (using ip6-localhost)
</strip>
<protocol>
GET /241 HTTP/1.1
-Host: ip6-localhost:%HTTP6PORT
+Host: localhost6:%HTTP6PORT
Accept: */*
</protocol>

View File

@ -1,20 +1,13 @@
diff --git a/tests/libtest/lib513.c b/tests/libtest/lib513.c
index b06a3c6..bf14650 100644
--- a/tests/libtest/lib513.c
+++ b/tests/libtest/lib513.c
@@ -12,12 +12,15 @@
diff --git a/tests/runtests.pl b/tests/runtests.pl
index a6597b9..c900ad8 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -209,7 +209,7 @@ my $sshdverstr; # for socks server, ssh daemon version string
my $sshderror; # for socks server, ssh daemon version error
#include "memdebug.h"
my $defserverlogslocktimeout = 20; # timeout to await server logs lock removal
-my $defpostcommanddelay = 0; # delay between command and postcheck sections
+my $defpostcommanddelay = 1; # delay between command and postcheck sections
+#include <unistd.h>
+
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
{
(void)ptr;
(void)size;
(void)nmemb;
(void)userp;
+ sleep(2);
return CURL_READFUNC_ABORT;
}
my $testnumcheck; # test number, set in singletest sub.

View File

@ -14,6 +14,7 @@ Patch101: curl-7.15.3-multilib.patch
Patch102: curl-7.16.0-privlibs.patch
Patch103: curl-7.19.4-debug.patch
Patch104: curl-7.19.7-s390-sleep.patch
Patch105: curl-7.19.7-localhost6.patch
Provides: webclient
URL: http://curl.haxx.se/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -96,6 +97,9 @@ use cURL's capabilities internally.
# http://curl.haxx.se/mail/lib-2009-12/0031.html
%patch104 -p1
# we have localhost6 instead of ip6-localhost as name for ::1
%patch105 -p1
autoconf
# Convert docs to UTF-8
@ -120,8 +124,9 @@ make %{?_smp_mflags}
%check
export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}
make %{?_smp_mflags} -C tests
cd tests && ./runtests.pl -a -k -p -v
cd tests
make %{?_smp_mflags}
./runtests.pl -a -p -v
%install
rm -rf $RPM_BUILD_ROOT