You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2007/10/07 00:44:49 UTC
svn commit: r582544 - in /apr/apr/trunk/test: testcond.c 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
Author: wrowe
Date: Sat Oct 6 15:44:46 2007
New Revision: 582544
URL: http://svn.apache.org/viewvc?rev=582544&view=rev
Log:
Solve two sets of issues, only two possible changes, in one
batch commit;
* P64 architectures require us to use ABTS_SIZE_EQUAL
* We need to localize to TESTBINPATH for win32
Modified:
apr/apr/trunk/test/testcond.c
apr/apr/trunk/test/testdso.c
apr/apr/trunk/test/testdup.c
apr/apr/trunk/test/testfile.c
apr/apr/trunk/test/testflock.c
apr/apr/trunk/test/testglobalmutex.c
apr/apr/trunk/test/testmmap.c
apr/apr/trunk/test/testoc.c
apr/apr/trunk/test/testpipe.c
apr/apr/trunk/test/testpoll.c
apr/apr/trunk/test/testproc.c
apr/apr/trunk/test/testshm.c
apr/apr/trunk/test/testsock.c
apr/apr/trunk/test/testsockets.c
Modified: apr/apr/trunk/test/testcond.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testcond.c?rev=582544&r1=582543&r2=582544&view=diff
==============================================================================
--- apr/apr/trunk/test/testcond.c (original)
+++ apr/apr/trunk/test/testcond.c Sat Oct 6 15:44:46 2007
@@ -375,8 +375,8 @@
rv = apr_file_read_full(out, &ch, 1, &nbytes);
ABTS_SUCCESS(rv);
- ABTS_INT_EQUAL(tc, 1, nbytes);
- ABTS_INT_EQUAL(tc, 1, (ch == '.'));
+ ABTS_SIZE_EQUAL(tc, 1, nbytes);
+ ABTS_TRUE(tc, ch == '.');
} while (1);
/* naive fairness test */
@@ -392,7 +392,7 @@
rv = apr_file_write_full(in, &ch, 1, &nbytes);
ABTS_SUCCESS(rv);
- ABTS_INT_EQUAL(tc, 1, nbytes);
+ ABTS_SIZE_EQUAL(tc, 1, nbytes);
rv = apr_thread_mutex_lock(box->mutex);
ABTS_SUCCESS(rv);
Modified: apr/apr/trunk/test/testdso.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testdso.c?rev=582544&r1=582543&r2=582544&view=diff
==============================================================================
--- apr/apr/trunk/test/testdso.c (original)
+++ apr/apr/trunk/test/testdso.c Sat Oct 6 15:44:46 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/trunk/test/testdup.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testdup.c?rev=582544&r1=582543&r2=582544&view=diff
==============================================================================
--- apr/apr/trunk/test/testdup.c (original)
+++ apr/apr/trunk/test/testdup.c Sat Oct 6 15:44:46 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);
@@ -161,7 +161,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);
Modified: apr/apr/trunk/test/testfile.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testfile.c?rev=582544&r1=582543&r2=582544&view=diff
==============================================================================
--- apr/apr/trunk/test/testfile.c (original)
+++ apr/apr/trunk/test/testfile.c Sat Oct 6 15:44:46 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);
@@ -329,6 +329,7 @@
static void test_buffer_set_get(abts_case *tc, void *data)
{
apr_status_t rv;
+ apr_size_t bufsize;
apr_file_t *filetest = NULL;
char * buffer;
@@ -337,21 +338,21 @@
APR_UREAD | APR_UWRITE | APR_GREAD, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- rv = apr_file_buffer_size_get(filetest);
- ABTS_INT_EQUAL(tc, APR_BUFFERSIZE, rv);
+ bufsize = apr_file_buffer_size_get(filetest);
+ ABTS_SIZE_EQUAL(tc, APR_BUFFERSIZE, bufsize);
buffer = apr_pcalloc(p, 10240);
rv = apr_file_buffer_set(filetest, buffer, 10240);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- rv = apr_file_buffer_size_get(filetest);
- ABTS_INT_EQUAL(tc, 10240, rv);
+ bufsize = apr_file_buffer_size_get(filetest);
+ ABTS_SIZE_EQUAL(tc, 10240, bufsize);
rv = apr_file_buffer_set(filetest, buffer, 12);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- rv = apr_file_buffer_size_get(filetest);
- ABTS_INT_EQUAL(tc, 12, rv);
+ bufsize = apr_file_buffer_size_get(filetest);
+ ABTS_SIZE_EQUAL(tc, 12, bufsize);
apr_file_close(filetest);
}
@@ -457,7 +458,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);
@@ -469,7 +470,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);
@@ -500,28 +501,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);
@@ -542,7 +543,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);
@@ -674,7 +675,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));
@@ -772,7 +773,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/trunk/test/testflock.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testflock.c?rev=582544&r1=582543&r2=582544&view=diff
==============================================================================
--- apr/apr/trunk/test/testflock.c (original)
+++ apr/apr/trunk/test/testflock.c Sat Oct 6 15:44:46 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/trunk/test/testglobalmutex.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testglobalmutex.c?rev=582544&r1=582543&r2=582544&view=diff
==============================================================================
--- apr/apr/trunk/test/testglobalmutex.c (original)
+++ apr/apr/trunk/test/testglobalmutex.c Sat Oct 6 15:44:46 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/trunk/test/testmmap.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testmmap.c?rev=582544&r1=582543&r2=582544&view=diff
==============================================================================
--- apr/apr/trunk/test/testmmap.c (original)
+++ apr/apr/trunk/test/testmmap.c Sat Oct 6 15:44:46 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/trunk/test/testoc.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testoc.c?rev=582544&r1=582543&r2=582544&view=diff
==============================================================================
--- apr/apr/trunk/test/testoc.c (original)
+++ apr/apr/trunk/test/testoc.c Sat Oct 6 15:44:46 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/trunk/test/testpipe.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testpipe.c?rev=582544&r1=582543&r2=582544&view=diff
==============================================================================
--- apr/apr/trunk/test/testpipe.c (original)
+++ apr/apr/trunk/test/testpipe.c Sat Oct 6 15:44:46 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/trunk/test/testpoll.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testpoll.c?rev=582544&r1=582543&r2=582544&view=diff
==============================================================================
--- apr/apr/trunk/test/testpoll.c (original)
+++ apr/apr/trunk/test/testpoll.c Sat Oct 6 15:44:46 2007
@@ -91,7 +91,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,
@@ -108,7 +108,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/trunk/test/testproc.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testproc.c?rev=582544&r1=582543&r2=582544&view=diff
==============================================================================
--- apr/apr/trunk/test/testproc.c (original)
+++ apr/apr/trunk/test/testproc.c Sat Oct 6 15:44:46 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/trunk/test/testshm.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testshm.c?rev=582544&r1=582543&r2=582544&view=diff
==============================================================================
--- apr/apr/trunk/test/testshm.c (original)
+++ apr/apr/trunk/test/testshm.c Sat Oct 6 15:44:46 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/trunk/test/testsock.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testsock.c?rev=582544&r1=582543&r2=582544&view=diff
==============================================================================
--- apr/apr/trunk/test/testsock.c (original)
+++ apr/apr/trunk/test/testsock.c Sat Oct 6 15:44:46 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/trunk/test/testsockets.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testsockets.c?rev=582544&r1=582543&r2=582544&view=diff
==============================================================================
--- apr/apr/trunk/test/testsockets.c (original)
+++ apr/apr/trunk/test/testsockets.c Sat Oct 6 15:44:46 2007
@@ -148,7 +148,7 @@
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);
/* fill the "from" sockaddr with a random address to ensure that
* recvfrom sets it up properly. */
@@ -157,7 +157,7 @@
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);