summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.in3
-rw-r--r--test/Makefile.win6
-rw-r--r--test/testrand2.c59
-rw-r--r--test/teststr.c6
4 files changed, 23 insertions, 51 deletions
diff --git a/test/Makefile.in b/test/Makefile.in
index 1c0c324d1..545536102 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -29,7 +29,8 @@ TARGETS = $(PROGRAMS)
LOCAL_LIBS=../lib@APR_LIBNAME@.la
CLEAN_TARGETS = testfile.tmp mod_test.slo proc_child@EXEEXT@ occhild@EXEEXT@ \
-readchild@EXEEXT@ tryread@EXEEXT@ sockchid@EXEEXT@
+ readchild@EXEEXT@ tryread@EXEEXT@ sockchild@EXEEXT@ \
+ globalmutexchild@EXEEXT@ lfstests/large.bin
CLEAN_SUBDIRS = internal
INCDIR=../include
diff --git a/test/Makefile.win b/test/Makefile.win
index 2772edff1..7e5644e9b 100644
--- a/test/Makefile.win
+++ b/test/Makefile.win
@@ -6,7 +6,8 @@ PROGRAMS = \
sendfile.exe \
proc_child.exe \
tryread.exe \
- occhild.exe\
+ occhild.exe \
+ readchild.exe \
sockchild.exe \
testlockperf.exe \
testshmproducer.exe \
@@ -40,6 +41,9 @@ tryread.exe: tryread.obj $(LOCAL_LIBS)
occhild.exe: occhild.obj $(LOCAL_LIBS)
$(LINK) occhild.obj $(LOCAL_LIBS) $(ALL_LIBS)
+readchild.exe: readchild.obj $(LOCAL_LIBS)
+ $(LINK) readchild.obj $(LOCAL_LIBS) $(ALL_LIBS)
+
proc_child.exe: proc_child.obj $(LOCAL_LIBS)
$(LINK) /debug /subsystem:console /machine:I386 \
proc_child.obj $(LOCAL_LIBS) $(ALL_LIBS)
diff --git a/test/testrand2.c b/test/testrand2.c
index 2d2e8a625..8d5b7b07c 100644
--- a/test/testrand2.c
+++ b/test/testrand2.c
@@ -1,55 +1,16 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
+/* Copyright 2000-2004 The Apache Software Foundation
*
- * Copyright (c) 2000-2003 The Apache Software Foundation. All rights
- * reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
#include "apr_general.h"
diff --git a/test/teststr.c b/test/teststr.c
index 2121da41a..99aa8af41 100644
--- a/test/teststr.c
+++ b/test/teststr.c
@@ -150,6 +150,7 @@ static void snprintf_underflow(abts_case *tc, void *data)
static void string_error(abts_case *tc, void *data)
{
char buf[128], *rv;
+ apr_status_t n;
buf[0] = '\0';
rv = apr_strerror(APR_ENOENT, buf, sizeof buf);
@@ -159,6 +160,11 @@ static void string_error(abts_case *tc, void *data)
rv = apr_strerror(APR_TIMEUP, buf, sizeof buf);
ABTS_PTR_EQUAL(tc, buf, rv);
ABTS_STR_EQUAL(tc, "The timeout specified has expired", buf);
+
+ /* throw some randomish numbers at it to check for robustness */
+ for (n = 1; n < 1000000; n *= 2) {
+ apr_strerror(n, buf, sizeof buf);
+ }
}
#define SIZE 180000