summaryrefslogtreecommitdiffstats
path: root/regress/libexec
diff options
context:
space:
mode:
authorjan <jan@openbsd.org>2020-01-16 19:01:50 +0000
committerjan <jan@openbsd.org>2020-01-16 19:01:50 +0000
commit0a47a91cbebba6289d90e7b3895da7b629548b51 (patch)
treeb7a5cd62cf53345dd903611a297579dfc2d24bfc /regress/libexec
parentUsually, -width Fl (which is 10n) is too wide and hence ugly. (diff)
downloadwireguard-openbsd-0a47a91cbebba6289d90e7b3895da7b629548b51.tar.xz
wireguard-openbsd-0a47a91cbebba6289d90e7b3895da7b629548b51.zip
Add a file put sub test for ftpd(8) regression test.
Diffstat (limited to 'regress/libexec')
-rw-r--r--regress/libexec/ftpd/Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/regress/libexec/ftpd/Makefile b/regress/libexec/ftpd/Makefile
index d2f0eabf995..c0a1562823b 100644
--- a/regress/libexec/ftpd/Makefile
+++ b/regress/libexec/ftpd/Makefile
@@ -1,13 +1,14 @@
-# $OpenBSD: Makefile,v 1.2 2019/12/26 15:41:50 bluhm Exp $
+# $OpenBSD: Makefile,v 1.3 2020/01/16 19:01:50 jan Exp $
.PHONY: setup-ftpd
REGRESS_TARGETS = run-ftpd-get
+REGRESS_TARGETS += run-ftpd-put
REGRESS_TARGETS += run-ftpd-ls
REGRESS_ROOT_TARGETS = ${REGRESS_TARGETS}
REGRESS_CLEANUP = cleanup-ftpd
REGRESS_SETUP = setup-ftpd
-CLEANFILES = ftpd.regress
+CLEANFILES = ftpd.regress ftpd.regress.local
TCPSERVER = /usr/local/bin/tcpserver
FTPD ?= /usr/libexec/ftpd
@@ -42,6 +43,7 @@ setup-ftpd:
# prepare test files
${SUDO} dd if=/dev/random of="${FTPDIR}/ftpd.regress" count=1 bs=1m
${SUDO} chown ftp:ftp "${FTPDIR}/ftpd.regress"
+ dd if=/dev/random of="ftpd.regress.local" count=1 bs=1m
run-ftpd-get:
@echo '\n======== $@ ========'
@@ -49,6 +51,12 @@ run-ftpd-get:
cmp ${FTPDIR}/ftpd.regress ftpd.regress
rm ftpd.regress
+run-ftpd-put:
+ @echo '\n======== $@ ========'
+ echo put ftpd.regress.local | ftp -a 127.0.0.1
+ cmp ${FTPDIR}/ftpd.regress.local ftpd.regress.local
+ ${SUDO} rm ${FTPDIR}/ftpd.regress.local
+
run-ftpd-ls:
@echo '\n======== $@ ========'
echo ls | ftp -a 127.0.0.1 | grep -q 'ftpd.regress'