backport patch: Switch to destroy_and_wait() in various places
From Author: Joe Orton <jorton@redhat.com> Signed-off-by: Guangzhong Yao <yaoguangzhong@xfusion.com>
This commit is contained in:
parent
2da5ff7467
commit
9ded978bcf
@ -0,0 +1,118 @@
|
||||
From be7ff12178dcba9641c28dcbea0803632c81ad7d Mon Sep 17 00:00:00 2001
|
||||
From: Joe Orton <jorton@redhat.com>
|
||||
Date: Thu, 13 Jan 2022 10:50:48 +0000
|
||||
Subject: [PATCH] * test/*.c: Switch to destroy_and_wait() in various places,
|
||||
no functional change.
|
||||
|
||||
---
|
||||
test/acl3744.c | 5 +----
|
||||
test/largefile.c | 5 ++---
|
||||
test/oldacl.c | 5 +----
|
||||
test/redirect.c | 8 ++------
|
||||
test/xmlreq.c | 6 ++----
|
||||
5 files changed, 8 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/test/acl3744.c b/test/acl3744.c
|
||||
index 5f0bf8b..be2edba 100644
|
||||
--- a/test/acl3744.c
|
||||
+++ b/test/acl3744.c
|
||||
@@ -36,10 +36,7 @@ static int test_acl(const char *uri, ne_acl_entry *es, int nume)
|
||||
|
||||
ON(ne_acl3744_set(sess, uri, es, nume));
|
||||
|
||||
- CALL(await_server());
|
||||
- ne_session_destroy(sess);
|
||||
-
|
||||
- return OK;
|
||||
+ return destroy_and_wait(sess);
|
||||
}
|
||||
|
||||
static int grant_all(void)
|
||||
diff --git a/test/largefile.c b/test/largefile.c
|
||||
index e99e960..eb8eb38 100644
|
||||
--- a/test/largefile.c
|
||||
+++ b/test/largefile.c
|
||||
@@ -181,9 +181,8 @@ static int read_large_response(void)
|
||||
ne_request_destroy(req);
|
||||
|
||||
CALL(any_2xx_request(sess, "/bar"));
|
||||
- CALL(await_server());
|
||||
- ne_session_destroy(sess);
|
||||
- return OK;
|
||||
+
|
||||
+ return destroy_and_wait(sess);
|
||||
}
|
||||
|
||||
ne_test tests[] = {
|
||||
diff --git a/test/oldacl.c b/test/oldacl.c
|
||||
index 2e72caa..5c0a671 100644
|
||||
--- a/test/oldacl.c
|
||||
+++ b/test/oldacl.c
|
||||
@@ -36,10 +36,7 @@ static int test_acl(const char *uri, ne_acl_entry *es, int nume)
|
||||
|
||||
ON(ne_acl_set(sess, uri, es, nume));
|
||||
|
||||
- CALL(await_server());
|
||||
- ne_session_destroy(sess);
|
||||
-
|
||||
- return OK;
|
||||
+ return destroy_and_wait(sess);
|
||||
}
|
||||
|
||||
static int grant_all(void)
|
||||
diff --git a/test/redirect.c b/test/redirect.c
|
||||
index 682097d..69e39f9 100644
|
||||
--- a/test/redirect.c
|
||||
+++ b/test/redirect.c
|
||||
@@ -99,11 +99,9 @@ static int check_redir(struct redir_args *args, const char *expect)
|
||||
ONV(strcmp(unp, expect), ("redirected to `%s' not `%s'", unp, expect));
|
||||
ne_free(unp);
|
||||
|
||||
- ne_session_destroy(sess);
|
||||
- CALL(await_server());
|
||||
if (full_expect) ne_free(full_expect);
|
||||
|
||||
- return OK;
|
||||
+ return destroy_and_wait(sess);
|
||||
}
|
||||
|
||||
#define DEST "http://foo.com/blah/blah/bar"
|
||||
@@ -191,10 +189,8 @@ static int no_redirect(void)
|
||||
ONN("redirect non-NULL after non-redir req", ne_redirect_location(sess));
|
||||
|
||||
CALL(process_redir(sess, "/foo", &loc));
|
||||
- CALL(await_server());
|
||||
|
||||
- ne_session_destroy(sess);
|
||||
- return OK;
|
||||
+ return destroy_and_wait(sess);
|
||||
}
|
||||
|
||||
ne_test tests[] = {
|
||||
diff --git a/test/xmlreq.c b/test/xmlreq.c
|
||||
index 1c3344d..ff5d54b 100644
|
||||
--- a/test/xmlreq.c
|
||||
+++ b/test/xmlreq.c
|
||||
@@ -75,8 +75,7 @@ static int success(void)
|
||||
|
||||
ne_xml_destroy(parser);
|
||||
ne_request_destroy(req);
|
||||
- ne_session_destroy(sess);
|
||||
- return await_server();
|
||||
+ return destroy_and_wait(sess);
|
||||
}
|
||||
|
||||
static int failure(void)
|
||||
@@ -105,8 +104,7 @@ static int failure(void)
|
||||
|
||||
ne_xml_destroy(parser);
|
||||
ne_request_destroy(req);
|
||||
- ne_session_destroy(sess);
|
||||
- return await_server();
|
||||
+ return destroy_and_wait(sess);
|
||||
}
|
||||
|
||||
static int types(void)
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: neon
|
||||
Version: 0.30.2
|
||||
Release: 11
|
||||
Release: 12
|
||||
Summary: An HTTP and WebDAV client library
|
||||
License: LGPLv2+
|
||||
URL: http://www.webdav.org/neon/
|
||||
@ -10,6 +10,7 @@ Source0: http://www.webdav.org/neon/neon-%{version}.tar.gz
|
||||
Patch0: neon-0.27.0-multilib.patch
|
||||
Patch1: neon-0.30.2-sysuioh.patch
|
||||
Patch2: neon-0.30.2-lockprintf.patch
|
||||
Patch3: neon-0.30.2-test-.c-Switch-to-destroy_and_wait-in-various-places.patch
|
||||
|
||||
BuildRequires: gcc git openssl-devel expat-devel gdb-headless
|
||||
Requires: ca-certificates
|
||||
@ -83,6 +84,9 @@ sed -ri "/^dependency_libs/{s,-l[^ ']*,,g}" \
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%changelog
|
||||
* Thu Dec 29 2022 Guangzhong Yao <yaoguangzhong@xfusion.com> - 0.30.2-12
|
||||
- DESC: backport Switch to destroy_and_wait() in various places
|
||||
|
||||
* Sat Dec 24 2022 Wei Chen <chenwei@xfusion.com> - 0.30.2-11
|
||||
- DESC: fix invalid changelog information
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user