From c6c305e01c9ae9adcf3e8608fa43868d4c43e57e Mon Sep 17 00:00:00 2001 From: jan Date: Sun, 9 May 2021 14:05:42 +0000 Subject: [PATCH] Add subtest for SIZE command in ftpd regression tests --- regress/libexec/ftpd/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/regress/libexec/ftpd/Makefile b/regress/libexec/ftpd/Makefile index 7c80000a385..baf6ea4f7da 100644 --- a/regress/libexec/ftpd/Makefile +++ b/regress/libexec/ftpd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.9 2021/05/09 13:16:33 jan Exp $ +# $OpenBSD: Makefile,v 1.10 2021/05/09 14:05:42 jan Exp $ .PHONY: setup-ftpd @@ -9,6 +9,7 @@ REGRESS_TARGETS += run-ftpd-nlist REGRESS_TARGETS += run-ftpd-delete REGRESS_TARGETS += run-ftpd-mkdir REGRESS_TARGETS += run-ftpd-rename +REGRESS_TARGETS += run-ftpd-size REGRESS_ROOT_TARGETS = ${REGRESS_TARGETS} REGRESS_CLEANUP = cleanup-ftpd REGRESS_SETUP = setup-ftpd @@ -78,6 +79,10 @@ run-ftpd-rename: test ! -f ${FTPDIR}/ftpd.regress test -f ${FTPDIR}/ftpd.regress.new +run-ftpd-size: + test $$(echo "binary\nsize ftpd.regress" | ftp -a 127.0.0.1 | cut -f 2)\ + -eq $$(stat -f %z ${FTPDIR}/ftpd.regress) + cleanup-ftpd: ${SUDO} pkill tcpserver || true ${SUDO} pkill ftpd || true -- 2.20.1