You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jo...@apache.org on 2021/07/06 09:54:35 UTC

svn commit: r1891308 - /apr/apr/trunk/test/testsockets.c

Author: jorton
Date: Tue Jul  6 09:54:35 2021
New Revision: 1891308

URL: http://svn.apache.org/viewvc?rev=1891308&view=rev
Log:
* test/testsockets.c (sendto_receivefrom_helper): Add descriptive
  error message on failure case.

Modified:
    apr/apr/trunk/test/testsockets.c

Modified: apr/apr/trunk/test/testsockets.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testsockets.c?rev=1891308&r1=1891307&r2=1891308&view=diff
==============================================================================
--- apr/apr/trunk/test/testsockets.c (original)
+++ apr/apr/trunk/test/testsockets.c Tue Jul  6 09:54:35 2021
@@ -18,6 +18,7 @@
 #include "apr_errno.h"
 #include "apr_general.h"
 #include "apr_lib.h"
+#include "apr_strings.h"
 #include "testutil.h"
 
 #define STRLEN 21
@@ -128,7 +129,8 @@ static void sendto_receivefrom_helper(ab
     APR_ASSERT_SUCCESS(tc, "Could not set REUSEADDR on socket2", rv);
 
     rv = apr_socket_bind(sock, to);
-    APR_ASSERT_SUCCESS(tc, "Could not bind socket", rv);
+    APR_ASSERT_SUCCESS(tc, apr_psprintf(p, "Could not bind socket to %s:7772 (family %d)",
+                                        addr, family), rv);
     if (rv != APR_SUCCESS)
         return;
     rv = apr_mcast_hops(sock, 10);