summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2015-10-18 05:49:58 +0000
committerngie <ngie@FreeBSD.org>2015-10-18 05:49:58 +0000
commit8b6c22e2879027d27992797f42655171328c46d2 (patch)
treebeee0b4861c261d00b00b793b95ba04988fdf468
parent5145e8ee6b08f444a75801e5448af27c3df60fbc (diff)
parente84cdeae2f06fd326af8175317ce7ef9a9ff562d (diff)
downloadFreeBSD-src-8b6c22e2879027d27992797f42655171328c46d2.zip
FreeBSD-src-8b6c22e2879027d27992797f42655171328c46d2.tar.gz
Integrate contrib/netbsd-tests/bin/dd into the FreeBSD test suite as
bin/dd/tests Ensure fdescfs is mounted on /dev/fd/ for the length testcase as it's used in validating the characters read from /dev/zero MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
-rw-r--r--bin/dd/Makefile6
-rw-r--r--bin/dd/tests/Makefile7
-rwxr-xr-xcontrib/netbsd-tests/bin/dd/t_dd.sh6
-rw-r--r--etc/mtree/BSD.tests.dist2
4 files changed, 21 insertions, 0 deletions
diff --git a/bin/dd/Makefile b/bin/dd/Makefile
index eb8ec85..5f07dbc 100644
--- a/bin/dd/Makefile
+++ b/bin/dd/Makefile
@@ -1,6 +1,8 @@
# @(#)Makefile 8.1 (Berkeley) 5/31/93
# $FreeBSD$
+.include <src.opts.mk>
+
PROG= dd
SRCS= args.c conv.c conv_tab.c dd.c misc.c position.c
@@ -24,4 +26,8 @@ test: ${PROG} gen
.endfor
@rm -f gen
+.if ${MK_TESTS} != "no"
+SUBDIR+= tests
+.endif
+
.include <bsd.prog.mk>
diff --git a/bin/dd/tests/Makefile b/bin/dd/tests/Makefile
new file mode 100644
index 0000000..dd04af9
--- /dev/null
+++ b/bin/dd/tests/Makefile
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+NETBSD_ATF_TESTS_SH= dd_test
+
+.include <netbsd-tests.test.mk>
+
+.include <bsd.test.mk>
diff --git a/contrib/netbsd-tests/bin/dd/t_dd.sh b/contrib/netbsd-tests/bin/dd/t_dd.sh
index d713ad9..62379c2 100755
--- a/contrib/netbsd-tests/bin/dd/t_dd.sh
+++ b/contrib/netbsd-tests/bin/dd/t_dd.sh
@@ -44,6 +44,12 @@ length_head() {
"the one expected to fail. (NetBSD PR bin/8521)"
}
length_body() {
+ # Begin FreeBSD
+ if ! df /dev/fd | grep -q '^fdescfs'; then
+ atf_skip "fdescfs is not mounted on /dev/fd"
+ fi
+ # End FreeBSD
+
test_dd_length 512 \
"dd if=/dev/zero of=/dev/fd/5 count=1 5>&1 >/dev/null 2>/dev/null"
test_dd_length 512 \
diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist
index c31eaaa..8d29323 100644
--- a/etc/mtree/BSD.tests.dist
+++ b/etc/mtree/BSD.tests.dist
@@ -12,6 +12,8 @@
..
date
..
+ dd
+ ..
expr
..
ls
OpenPOWER on IntegriCloud