summaryrefslogtreecommitdiffstats
path: root/tools/regression/execve
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2015-04-12 12:29:34 +0000
committerngie <ngie@FreeBSD.org>2015-04-12 12:29:34 +0000
commitbf56b0293159b2fe85c3d2595798953ba35f1148 (patch)
tree9472f7b79416ca4976e81e5cd4a73227062c1fa1 /tools/regression/execve
parent66cc740ed9057725932ec1479cb42919d01336bd (diff)
downloadFreeBSD-src-bf56b0293159b2fe85c3d2595798953ba35f1148.zip
FreeBSD-src-bf56b0293159b2fe85c3d2595798953ba35f1148.tar.gz
Integrate tools/regression/execve into the FreeBSD test suite as tests/sys/kern/execve
Diffstat (limited to 'tools/regression/execve')
-rw-r--r--tools/regression/execve/Makefile70
-rw-r--r--tools/regression/execve/doexec.c58
-rw-r--r--tools/regression/execve/execve.t27
-rw-r--r--tools/regression/execve/tests/badinterplen4
-rw-r--r--tools/regression/execve/tests/devnullscript4
-rw-r--r--tools/regression/execve/tests/goodaout.c47
-rw-r--r--tools/regression/execve/tests/goodscript4
-rw-r--r--tools/regression/execve/tests/nonexistshell4
-rw-r--r--tools/regression/execve/tests/scriptarg4
-rw-r--r--tools/regression/execve/tests/scriptarg-nospace4
10 files changed, 0 insertions, 226 deletions
diff --git a/tools/regression/execve/Makefile b/tools/regression/execve/Makefile
deleted file mode 100644
index 018678c..0000000
--- a/tools/regression/execve/Makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-# $FreeBSD$
-
-PROG= doexec
-MAN=
-
-RP= ./${PROG}
-TD= ${.CURDIR}/tests
-
-TESTSCRIPTS= nonexistshell devnullscript badinterplen goodscript \
- scriptarg scriptarg-nospace
-CLEANFILES= goodaout truncaout sparseaout empty ${TESTSCRIPTS}
-
-all: ${PROG} goodaout ${TESTSCRIPTS}
-
-.for x in ${TESTSCRIPTS}
-${x}: ${TD}/${x}
- ${CP} ${TD}/${x} .
- chmod +x ${x}
-.endfor
-
-regress: test-empty test-nonexist test-nonexistshell \
- test-devnullscript test-badinterplen test-goodscript \
- test-scriptarg test-scriptarg-nospace test-goodaout \
- test-truncaout test-sparseaout
-
-test-empty: ${PROG}
- rm -f empty
- touch empty
- chmod +x empty
- ${RP} empty | grep 'Exec format error'
-
-test-nonexist: ${PROG}
- ${RP} ${TD}/nonexistent | grep 'No such file or directory'
-
-test-nonexistshell: ${PROG} nonexistshell
- ${RP} nonexistshell | grep 'No such file or directory'
-
-test-devnullscript: ${PROG} devnullscript
- ${RP} devnullscript | grep 'Permission denied'
-
-test-badinterplen: ${PROG} badinterplen
- ${RP} badinterplen | grep 'No such file or directory'
-
-test-goodscript: ${PROG} goodscript
- ${RP} goodscript | grep 'succeeded'
-
-test-scriptarg: ${PROG} scriptarg
- ${RP} scriptarg 2>&1 | grep '+ echo succeeded'
-
-test-scriptarg-nospace: ${PROG} scriptarg-nospace
- ${RP} scriptarg-nospace 2>&1 | grep '+ echo succeeded'
-
-goodaout: ${TD}/goodaout.c
- ${CC} -static -o ${.TARGET} ${TD}/goodaout.c
-
-test-goodaout: ${PROG} goodaout
- ${RP} goodaout | grep 'succeeded'
-
-test-truncaout: ${PROG} goodaout
- truncate -s 16 truncaout
- chmod a+x truncaout
- ${RP} truncaout | grep 'Exec format error'
-
-test-sparseaout: ${PROG}
- /bin/rm -rf sparseaout
- truncate -s 20480 sparseaout
- chmod a+x sparseaout
- ${RP} sparseaout | grep 'Exec format error'
-
-.include <bsd.prog.mk>
diff --git a/tools/regression/execve/doexec.c b/tools/regression/execve/doexec.c
deleted file mode 100644
index 0aa82ec..0000000
--- a/tools/regression/execve/doexec.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/* $NetBSD: doexec.c,v 1.8 2003/07/26 19:38:48 salo Exp $ */
-
-/*
- * Copyright (c) 1993 Christopher G. Demetriou
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 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. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed for the
- * NetBSD Project. See http://www.NetBSD.org/ for
- * information about NetBSD.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-int
-main(argc, argv)
- int argc;
- char *argv[];
-{
- if (argc != 2) {
- fprintf(stderr, "usage: %s <progname>\n", argv[0]);
- exit(2);
- }
-
- unsetenv("LANG"); /* we compare C error strings */
- if (execve(argv[1], &argv[1], NULL) == -1) {
- printf("%s\n", strerror(errno));
- exit(1);
- }
-}
diff --git a/tools/regression/execve/execve.t b/tools/regression/execve/execve.t
deleted file mode 100644
index dd2be9a..0000000
--- a/tools/regression/execve/execve.t
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-# $FreeBSD$
-
-cd `dirname $0`
-cmd="./`basename $0 .t`"
-
-make >/dev/null 2>&1
-
-tests="test-empty test-nonexist test-nonexistshell \
- test-devnullscript test-badinterplen test-goodscript \
- test-scriptarg test-scriptarg-nospace test-goodaout \
- test-truncaout test-sparseaout"
-
-n=0
-
-echo "1..11"
-
-for atest in ${tests}
-do
- n=`expr ${n} + 1`
- if make ${atest}
- then
- echo "ok ${n} - ${atest}"
- else
- echo "not ok ${n} - ${atest}"
- fi
-done
diff --git a/tools/regression/execve/tests/badinterplen b/tools/regression/execve/tests/badinterplen
deleted file mode 100644
index 96c049f..0000000
--- a/tools/regression/execve/tests/badinterplen
+++ /dev/null
@@ -1,4 +0,0 @@
-#! 456789012345678 0123456789012345 789012345678 012345678901234 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890
-# $FreeBSD$
-
-echo succeeded
diff --git a/tools/regression/execve/tests/devnullscript b/tools/regression/execve/tests/devnullscript
deleted file mode 100644
index 73b1020..0000000
--- a/tools/regression/execve/tests/devnullscript
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /dev/null
-# $FreeBSD$
-
-echo succeeded
diff --git a/tools/regression/execve/tests/goodaout.c b/tools/regression/execve/tests/goodaout.c
deleted file mode 100644
index ebf476b..0000000
--- a/tools/regression/execve/tests/goodaout.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* $NetBSD: goodaout.c,v 1.8 2003/07/26 19:38:49 salo Exp $ */
-
-/*-
- * Copyright (c) 1993 Christopher G. Demetriou
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 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. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed for the
- * NetBSD Project. See http://www.NetBSD.org/ for
- * information about NetBSD.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-int
-main(argc, argv)
- int argc;
- char *argv[];
-{
- printf("succeeded\n");
- exit(0);
-}
diff --git a/tools/regression/execve/tests/goodscript b/tools/regression/execve/tests/goodscript
deleted file mode 100644
index 51270dc..0000000
--- a/tools/regression/execve/tests/goodscript
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/csh
-# $FreeBSD$
-
-echo succeeded
diff --git a/tools/regression/execve/tests/nonexistshell b/tools/regression/execve/tests/nonexistshell
deleted file mode 100644
index f9ee705..0000000
--- a/tools/regression/execve/tests/nonexistshell
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /foo/bar/baz
-# $FreeBSD$
-
-echo foo
diff --git a/tools/regression/execve/tests/scriptarg b/tools/regression/execve/tests/scriptarg
deleted file mode 100644
index 2700f1c..0000000
--- a/tools/regression/execve/tests/scriptarg
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/sh -x
-# $FreeBSD$
-
-echo succeeded
diff --git a/tools/regression/execve/tests/scriptarg-nospace b/tools/regression/execve/tests/scriptarg-nospace
deleted file mode 100644
index 6731ad5..0000000
--- a/tools/regression/execve/tests/scriptarg-nospace
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh -x
-# $FreeBSD$
-
-echo succeeded
OpenPOWER on IntegriCloud