apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r584234 - in /apr/apr/branches/1.2.x/test: testdso.c testdup.c testfile.c testflock.c testglobalmutex.c testmmap.c testoc.c testpipe.c testpoll.c testproc.c testshm.c testsock.c testsockets.c
Date Fri, 12 Oct 2007 19:16:54 GMT
Author: wrowe
Date: Fri Oct 12 12:16:52 2007
New Revision: 584234

URL: http://svn.apache.org/viewvc?rev=584234&view=rev
Log:
Solve three sets of issues, three possible changes, in one
batch commit;

 * P64 architectures require us to use ABTS_SIZE_EQUAL

 * We need to localize to TESTBINPATH for win32

 * When we are done with apr_file_t's in testdup, close them

Backports: 582544 + 584023

Modified:
    apr/apr/branches/1.2.x/test/testdso.c
    apr/apr/branches/1.2.x/test/testdup.c
    apr/apr/branches/1.2.x/test/testfile.c
    apr/apr/branches/1.2.x/test/testflock.c
    apr/apr/branches/1.2.x/test/testglobalmutex.c
    apr/apr/branches/1.2.x/test/testmmap.c
    apr/apr/branches/1.2.x/test/testoc.c
    apr/apr/branches/1.2.x/test/testpipe.c
    apr/apr/branches/1.2.x/test/testpoll.c
    apr/apr/branches/1.2.x/test/testproc.c
    apr/apr/branches/1.2.x/test/testshm.c
    apr/apr/branches/1.2.x/test/testsock.c
    apr/apr/branches/1.2.x/test/testsockets.c

Modified: apr/apr/branches/1.2.x/test/testdso.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/test/testdso.c?rev=584234&r1=584233&r2=584234&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/test/testdso.c (original)
+++ apr/apr/branches/1.2.x/test/testdso.c Fri Oct 12 12:16:52 2007
@@ -15,6 +15,7 @@
  */
 
 
+#include "apr.h"
 #include "testutil.h"
 #include "apr_general.h"
 #include "apr_pools.h"
@@ -22,7 +23,6 @@
 #include "apr_dso.h"
 #include "apr_strings.h"
 #include "apr_file_info.h"
-#include "apr.h"
 #if APR_HAVE_UNISTD_H
 #include <unistd.h>
 #endif
@@ -34,7 +34,7 @@
 #elif defined(BEOS) || defined(__MVS__)
 # define MOD_NAME "mod_test.so"
 #elif defined(WIN32)
-# define MOD_NAME "mod_test.dll"
+# define MOD_NAME TESTBINPATH "mod_test.dll"
 #elif defined(DARWIN)
 # define MOD_NAME ".libs/mod_test.so" 
 # define LIB_NAME ".libs/libmod_test.dylib" 

Modified: apr/apr/branches/1.2.x/test/testdup.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/test/testdup.c?rev=584234&r1=584233&r2=584234&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/test/testdup.c (original)
+++ apr/apr/branches/1.2.x/test/testdup.c Fri Oct 12 12:16:52 2007
@@ -76,7 +76,7 @@
 
     rv = apr_file_write(file3, TEST, &txtlen);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-    ABTS_INT_EQUAL(tc, sizeof(TEST), txtlen);
+    ABTS_SIZE_EQUAL(tc, sizeof(TEST), txtlen);
 
     fpos = 0;
     rv = apr_file_seek(file1, APR_SET, &fpos);
@@ -128,6 +128,8 @@
     rv = apr_file_dup2(errfile, saveerr, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     ABTS_PTR_NOTNULL(tc, errfile);
+
+    apr_file_close(saveerr);
 }
 
 static void test_dup2_readwrite(abts_case *tc, void *data)
@@ -161,7 +163,7 @@
     txtlen = sizeof(TEST2);
     rv = apr_file_write(errfile, TEST2, &txtlen);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-    ABTS_INT_EQUAL(tc, sizeof(TEST2), txtlen);
+    ABTS_SIZE_EQUAL(tc, sizeof(TEST2), txtlen);
 
     fpos = 0;
     rv = apr_file_seek(testfile, APR_SET, &fpos);
@@ -178,6 +180,8 @@
     rv = apr_file_dup2(errfile, saveerr, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     ABTS_PTR_NOTNULL(tc, errfile);
+
+    apr_file_close(saveerr);
 }
 
 abts_suite *testdup(abts_suite *suite)

Modified: apr/apr/branches/1.2.x/test/testfile.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/test/testfile.c?rev=584234&r1=584233&r2=584234&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/test/testfile.c (original)
+++ apr/apr/branches/1.2.x/test/testfile.c Fri Oct 12 12:16:52 2007
@@ -85,7 +85,7 @@
     APR_ASSERT_SUCCESS(tc, "Opening test file " FILENAME, rv);
     rv = apr_file_read(filetest, str, &nbytes);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-    ABTS_INT_EQUAL(tc, strlen(TESTSTR), nbytes);
+    ABTS_SIZE_EQUAL(tc, strlen(TESTSTR), nbytes);
     ABTS_STR_EQUAL(tc, TESTSTR, str);
 
     apr_file_close(filetest);
@@ -103,7 +103,7 @@
 
     rv = apr_file_read(filetest, str, &nbytes);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-    ABTS_INT_EQUAL(tc, 0, nbytes);
+    ABTS_SIZE_EQUAL(tc, 0, nbytes);
 
     apr_file_close(filetest);
 }
@@ -232,7 +232,7 @@
 
     rv = apr_file_read(filetest, str, &nbytes);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-    ABTS_INT_EQUAL(tc, strlen(TESTSTR), nbytes);
+    ABTS_SIZE_EQUAL(tc, strlen(TESTSTR), nbytes);
     ABTS_STR_EQUAL(tc, TESTSTR, str);
 
     memset(str, 0, nbytes + 1);
@@ -242,7 +242,7 @@
     
     rv = apr_file_read(filetest, str, &nbytes);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-    ABTS_INT_EQUAL(tc, strlen(TESTSTR) - 5, nbytes);
+    ABTS_SIZE_EQUAL(tc, strlen(TESTSTR) - 5, nbytes);
     ABTS_STR_EQUAL(tc, TESTSTR + 5, str);
 
     apr_file_close(filetest);
@@ -257,13 +257,13 @@
     offset = -5;
     rv = apr_file_seek(filetest, SEEK_END, &offset);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-    ABTS_INT_EQUAL(tc, strlen(TESTSTR) - 5, nbytes);
+    ABTS_SIZE_EQUAL(tc, strlen(TESTSTR) - 5, nbytes);
 
     memset(str, 0, nbytes + 1);
     nbytes = 256;
     rv = apr_file_read(filetest, str, &nbytes);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-    ABTS_INT_EQUAL(tc, 5, nbytes);
+    ABTS_SIZE_EQUAL(tc, 5, nbytes);
     ABTS_STR_EQUAL(tc, TESTSTR + strlen(TESTSTR) - 5, str);
 
     apr_file_close(filetest);
@@ -428,7 +428,7 @@
 
     rv = apr_file_write(f, buf, &nbytes);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-    ABTS_INT_EQUAL(tc, APR_BUFFERSIZE, nbytes);
+    ABTS_SIZE_EQUAL(tc, APR_BUFFERSIZE, nbytes);
 
     rv = apr_file_close(f);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -440,7 +440,7 @@
     nbytes = sizeof buf;
     rv = apr_file_read(f, buf, &nbytes);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-    ABTS_INT_EQUAL(tc, APR_BUFFERSIZE, nbytes);
+    ABTS_SIZE_EQUAL(tc, APR_BUFFERSIZE, nbytes);
 
     rv = apr_file_close(f);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -471,28 +471,28 @@
     nbytes = strlen(s);
     rv = apr_file_write(f, s, &nbytes);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-    ABTS_INT_EQUAL(tc, strlen(s), nbytes);
+    ABTS_SIZE_EQUAL(tc, strlen(s), nbytes);
     
     for (i = 0; i < 7980; i++) {
         s = "0";
         nbytes = strlen(s);
         rv = apr_file_write(f, s, &nbytes);
         ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-        ABTS_INT_EQUAL(tc, strlen(s), nbytes);
+        ABTS_SIZE_EQUAL(tc, strlen(s), nbytes);
     }
     
     s = "end456789\n";
     nbytes = strlen(s);
     rv = apr_file_write(f, s, &nbytes);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-    ABTS_INT_EQUAL(tc, strlen(s), nbytes);
+    ABTS_SIZE_EQUAL(tc, strlen(s), nbytes);
 
     for (i = 0; i < 10000; i++) {
         s = "1";
         nbytes = strlen(s);
         rv = apr_file_write(f, s, &nbytes);
         ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-        ABTS_INT_EQUAL(tc, strlen(s), nbytes);
+        ABTS_SIZE_EQUAL(tc, strlen(s), nbytes);
     }
     
     rv = apr_file_close(f);
@@ -513,7 +513,7 @@
     nbytes = sizeof(buf);
     rv = apr_file_read(f, buf, &nbytes);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-    ABTS_INT_EQUAL(tc, nbytes, sizeof(buf));
+    ABTS_SIZE_EQUAL(tc, nbytes, sizeof(buf));
 
     cur = -((apr_off_t)nbytes - 7980);
     rv = apr_file_seek(f, APR_CUR, &cur);
@@ -645,7 +645,7 @@
     APR_ASSERT_SUCCESS(tc, "writev_full of size 5 to file",
                        apr_file_writev_full(f, vec, 5, &nbytes));
 
-    ABTS_INT_EQUAL(tc, strlen(LINE1)*3 + strlen(LINE2)*2, nbytes);
+    ABTS_SIZE_EQUAL(tc, strlen(LINE1)*3 + strlen(LINE2)*2, nbytes);
 
     APR_ASSERT_SUCCESS(tc, "close for writing",
                        apr_file_close(f));
@@ -743,7 +743,7 @@
     nbytes = strlen(s);
     rv = apr_file_write(f, s, &nbytes);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-    ABTS_INT_EQUAL(tc, strlen(s), nbytes);
+    ABTS_SIZE_EQUAL(tc, strlen(s), nbytes);
 
     rv = apr_file_close(f);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);

Modified: apr/apr/branches/1.2.x/test/testflock.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/test/testflock.c?rev=584234&r1=584233&r2=584234&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/test/testflock.c (original)
+++ apr/apr/branches/1.2.x/test/testflock.c Fri Oct 12 12:16:52 2007
@@ -44,7 +44,7 @@
 
     args[0] = "tryread" EXTENSION;
     args[1] = NULL;
-    rv = apr_proc_create(&proc, "./tryread" EXTENSION, args, NULL, procattr, p);
+    rv = apr_proc_create(&proc, TESTBINPATH "tryread" EXTENSION, args, NULL, procattr,
p);
     APR_ASSERT_SUCCESS(tc, "Couldn't launch program", rv);
 
     ABTS_ASSERT(tc, "wait for child process",

Modified: apr/apr/branches/1.2.x/test/testglobalmutex.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/test/testglobalmutex.c?rev=584234&r1=584233&r2=584234&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/test/testglobalmutex.c (original)
+++ apr/apr/branches/1.2.x/test/testglobalmutex.c Fri Oct 12 12:16:52 2007
@@ -41,7 +41,7 @@
     args[0] = "globalmutexchild" EXTENSION;
     args[1] = (const char*)apr_itoa(p, (int)mech);
     args[2] = NULL;
-    rv = apr_proc_create(proc, "./globalmutexchild" EXTENSION, args, NULL,
+    rv = apr_proc_create(proc, TESTBINPATH "globalmutexchild" EXTENSION, args, NULL,
             procattr, p);
     APR_ASSERT_SUCCESS(tc, "Couldn't launch program", rv);
 }

Modified: apr/apr/branches/1.2.x/test/testmmap.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/test/testmmap.c?rev=584234&r1=584233&r2=584234&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/test/testmmap.c (original)
+++ apr/apr/branches/1.2.x/test/testmmap.c Fri Oct 12 12:16:52 2007
@@ -40,7 +40,7 @@
 static apr_file_t *thefile = NULL;
 static char *file1;
 static apr_finfo_t finfo;
-static int fsize;
+static apr_size_t fsize;
 
 static void create_filename(abts_case *tc, void *data)
 {
@@ -102,7 +102,7 @@
     
     ABTS_PTR_NOTNULL(tc, themmap);
     ABTS_PTR_NOTNULL(tc, themmap->mm);
-    ABTS_INT_EQUAL(tc, fsize, themmap->size);
+    ABTS_SIZE_EQUAL(tc, fsize, themmap->size);
 
     /* Must use nEquals since the string is not guaranteed to be NULL terminated */
     ABTS_STR_NEQUAL(tc, themmap->mm, TEST_STRING, fsize);

Modified: apr/apr/branches/1.2.x/test/testoc.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/test/testoc.c?rev=584234&r1=584233&r2=584234&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/test/testoc.c (original)
+++ apr/apr/branches/1.2.x/test/testoc.c Fri Oct 12 12:16:52 2007
@@ -73,7 +73,7 @@
                              APR_NO_PIPE);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
-    rv = apr_proc_create(&newproc, "./occhild" EXTENSION, args, NULL, procattr, p);
+    rv = apr_proc_create(&newproc, TESTBINPATH "occhild" EXTENSION, args, NULL, procattr,
p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     ABTS_PTR_NOTNULL(tc, newproc.in);
     ABTS_PTR_EQUAL(tc, NULL, newproc.out);

Modified: apr/apr/branches/1.2.x/test/testpipe.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/test/testpipe.c?rev=584234&r1=584233&r2=584234&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/test/testpipe.c (original)
+++ apr/apr/branches/1.2.x/test/testpipe.c Fri Oct 12 12:16:52 2007
@@ -94,7 +94,7 @@
     if (!rv) {
         rv = apr_file_read(readp, buf, &nbytes);
         ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_TIMEUP(rv));
-        ABTS_INT_EQUAL(tc, 0, nbytes);
+        ABTS_SIZE_EQUAL(tc, 0, nbytes);
     }
 }
 
@@ -113,14 +113,14 @@
     ABTS_PTR_NOTNULL(tc, writep);
 
     rv = apr_file_write(writep, buf, &nbytes);
-    ABTS_INT_EQUAL(tc, strlen("this is a test"), nbytes);
+    ABTS_SIZE_EQUAL(tc, strlen("this is a test"), nbytes);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     nbytes = 256;
     input = apr_pcalloc(p, nbytes + 1);
     rv = apr_file_read(readp, input, &nbytes);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-    ABTS_INT_EQUAL(tc, strlen("this is a test"), nbytes);
+    ABTS_SIZE_EQUAL(tc, strlen("this is a test"), nbytes);
     ABTS_STR_EQUAL(tc, "this is a test", input);
 }
 
@@ -151,7 +151,7 @@
 
     args[0] = "readchild" EXTENSION;
     args[1] = NULL;
-    rv = apr_proc_create(&proc, "./readchild" EXTENSION, args, NULL, procattr, p);
+    rv = apr_proc_create(&proc, TESTBINPATH "readchild" EXTENSION, args, NULL, procattr,
p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     rv = apr_file_pipe_timeout_set(proc.in, apr_time_from_sec(10));

Modified: apr/apr/branches/1.2.x/test/testpoll.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/test/testpoll.c?rev=584234&r1=584233&r2=584234&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/test/testpoll.c (original)
+++ apr/apr/branches/1.2.x/test/testpoll.c Fri Oct 12 12:16:52 2007
@@ -90,7 +90,7 @@
 
     rv = apr_socket_sendto(sockarray[which], sas[which], 0, "hello", &len);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-    ABTS_INT_EQUAL(tc, strlen("hello"), len);
+    ABTS_SIZE_EQUAL(tc, strlen("hello"), len);
 }
 
 static void recv_msg(apr_socket_t **sockarray, int which, apr_pool_t *p, 
@@ -107,7 +107,7 @@
 
     rv = apr_socket_recvfrom(recsa, sockarray[which], 0, buffer, &buflen);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-    ABTS_INT_EQUAL(tc, strlen("hello"), buflen);
+    ABTS_SIZE_EQUAL(tc, strlen("hello"), buflen);
     ABTS_STR_EQUAL(tc, "hello", buffer);
 }
 

Modified: apr/apr/branches/1.2.x/test/testproc.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/test/testproc.c?rev=584234&r1=584233&r2=584234&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/test/testproc.c (original)
+++ apr/apr/branches/1.2.x/test/testproc.c Fri Oct 12 12:16:52 2007
@@ -50,7 +50,7 @@
     args[0] = "proc_child" EXTENSION;
     args[1] = NULL;
     
-    rv = apr_proc_create(&newproc, "../proc_child" EXTENSION, args, NULL, 
+    rv = apr_proc_create(&newproc, "../" TESTBINPATH "proc_child" EXTENSION, args, NULL,

                          attr, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
@@ -59,7 +59,7 @@
     length = strlen(TESTSTR);
     rv = apr_file_write(testfile, TESTSTR, &length);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-    ABTS_INT_EQUAL(tc, strlen(TESTSTR), length);
+    ABTS_SIZE_EQUAL(tc, strlen(TESTSTR), length);
 
     testfile = newproc.out;
     length = 256;
@@ -126,7 +126,7 @@
     args[0] = "proc_child";
     args[1] = NULL;
 
-    rv = apr_proc_create(&newproc, "../proc_child" EXTENSION, args, NULL, 
+    rv = apr_proc_create(&newproc, "../" TESTBINPATH "proc_child" EXTENSION, args, NULL,

                          attr, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 

Modified: apr/apr/branches/1.2.x/test/testshm.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/test/testshm.c?rev=584234&r1=584233&r2=584234&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/test/testshm.c (original)
+++ apr/apr/branches/1.2.x/test/testshm.c Fri Oct 12 12:16:52 2007
@@ -83,7 +83,7 @@
     ABTS_PTR_NOTNULL(tc, shm);
 
     retsize = apr_shm_size_get(shm);
-    ABTS_INT_EQUAL(tc, SHARED_SIZE, retsize);
+    ABTS_SIZE_EQUAL(tc, SHARED_SIZE, retsize);
 
     rv = apr_shm_destroy(shm);
     APR_ASSERT_SUCCESS(tc, "Error destroying shared memory block", rv);
@@ -177,7 +177,7 @@
     ABTS_PTR_NOTNULL(tc, shm);
 
     retsize = apr_shm_size_get(shm);
-    ABTS_INT_EQUAL(tc, SHARED_SIZE, retsize);
+    ABTS_SIZE_EQUAL(tc, SHARED_SIZE, retsize);
 
     boxes = apr_shm_baseaddr_get(shm);
     ABTS_PTR_NOTNULL(tc, boxes);
@@ -187,7 +187,7 @@
     APR_ASSERT_SUCCESS(tc, "Couldn't create attr1", rv);
     args[0] = apr_pstrdup(p, "testshmproducer" EXTENSION);
     args[1] = NULL;
-    rv = apr_proc_create(&pidproducer, "./testshmproducer" EXTENSION, args,
+    rv = apr_proc_create(&pidproducer, TESTBINPATH "testshmproducer" EXTENSION, args,
                          NULL, attr1, p);
     APR_ASSERT_SUCCESS(tc, "Couldn't launch producer", rv);
 
@@ -195,7 +195,7 @@
     ABTS_PTR_NOTNULL(tc, attr2);
     APR_ASSERT_SUCCESS(tc, "Couldn't create attr2", rv);
     args[0] = apr_pstrdup(p, "testshmconsumer" EXTENSION);
-    rv = apr_proc_create(&pidconsumer, "./testshmconsumer" EXTENSION, args, 
+    rv = apr_proc_create(&pidconsumer, TESTBINPATH "testshmconsumer" EXTENSION, args,

                          NULL, attr2, p);
     APR_ASSERT_SUCCESS(tc, "Couldn't launch consumer", rv);
 

Modified: apr/apr/branches/1.2.x/test/testsock.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/test/testsock.c?rev=584234&r1=584233&r2=584234&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/test/testsock.c (original)
+++ apr/apr/branches/1.2.x/test/testsock.c Fri Oct 12 12:16:52 2007
@@ -43,7 +43,7 @@
     args[0] = "sockchild" EXTENSION;
     args[1] = arg1;
     args[2] = NULL;
-    rv = apr_proc_create(proc, "./sockchild" EXTENSION, args, NULL,
+    rv = apr_proc_create(proc, TESTBINPATH "sockchild" EXTENSION, args, NULL,
                          procattr, p);
     APR_ASSERT_SUCCESS(tc, "Couldn't launch program", rv);
 }
@@ -133,7 +133,7 @@
     apr_socket_send(sock2, DATASTR, &length);
 
     /* Make sure that the client received the data we sent */
-    ABTS_INT_EQUAL(tc, strlen(DATASTR), wait_child(tc, &proc));
+    ABTS_SIZE_EQUAL(tc, strlen(DATASTR), wait_child(tc, &proc));
 
     rv = apr_socket_close(sock2);
     APR_ASSERT_SUCCESS(tc, "Problem closing connected socket", rv);
@@ -167,7 +167,7 @@
 
     /* Make sure that the server received the data we sent */
     ABTS_STR_EQUAL(tc, DATASTR, datastr);
-    ABTS_INT_EQUAL(tc, strlen(datastr), wait_child(tc, &proc));
+    ABTS_SIZE_EQUAL(tc, strlen(datastr), wait_child(tc, &proc));
 
     rv = apr_socket_close(sock2);
     APR_ASSERT_SUCCESS(tc, "Problem closing connected socket", rv);

Modified: apr/apr/branches/1.2.x/test/testsockets.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/test/testsockets.c?rev=584234&r1=584233&r2=584234&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/test/testsockets.c (original)
+++ apr/apr/branches/1.2.x/test/testsockets.c Fri Oct 12 12:16:52 2007
@@ -148,12 +148,12 @@
     len = STRLEN;
     rv = apr_socket_sendto(sock2, to, 0, sendbuf, &len);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-    ABTS_INT_EQUAL(tc, STRLEN, len);
+    ABTS_SIZE_EQUAL(tc, STRLEN, len);
 
     len = 80;
     rv = apr_socket_recvfrom(from, sock, 0, recvbuf, &len);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-    ABTS_INT_EQUAL(tc, STRLEN, len);
+    ABTS_SIZE_EQUAL(tc, STRLEN, len);
     ABTS_STR_EQUAL(tc, "APR_INET, SOCK_DGRAM", recvbuf);
 
     apr_sockaddr_ip_get(&ip_addr, from);



Mime
View raw message