svn commit: r366277 - in stable/12: bin/cp bin/cp/tests etc/mtree

Kyle Evans kevans at FreeBSD.org
Wed Sep 30 00:56:09 UTC 2020


Author: kevans
Date: Wed Sep 30 00:56:08 2020
New Revision: 366277
URL: https://svnweb.freebsd.org/changeset/base/366277

Log:
  MFC r366059-r366060: cp(1): tests
  
  r366059:
  cp: add some basic tests
  
  There are some tests available in the NetBSD test suite, but we don't
  currently pass all of those; further investigation will go into that. For
  now, just add a basic test as well as a test that copies from /dev/null to a
  file.
  
  The /dev/null test confirms that the file gets created if it's empty, then
  that it truncates the file if it's non-empty. This matches some usage that
  was previously employed in the build and was replaced in r366042 by a
  simpler shell construct.
  
  I will also plan on coming back to expand these in due time.
  
  r366060:
  cp: tests: fix weird 20 insertion
  
  This slipped in at the last moment. =(

Added:
  stable/12/bin/cp/tests/
     - copied from r366060, head/bin/cp/tests/
Modified:
  stable/12/bin/cp/Makefile
  stable/12/etc/mtree/BSD.tests.dist
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/bin/cp/Makefile
==============================================================================
--- stable/12/bin/cp/Makefile	Wed Sep 30 00:53:55 2020	(r366276)
+++ stable/12/bin/cp/Makefile	Wed Sep 30 00:56:08 2020	(r366277)
@@ -1,9 +1,14 @@
 #	@(#)Makefile	8.1 (Berkeley) 5/31/93
 # $FreeBSD$
 
+.include <src.opts.mk>
+
 PACKAGE=runtime
 PROG=	cp
 SRCS=	cp.c utils.c
 CFLAGS+= -DVM_AND_BUFFER_CACHE_SYNCHRONIZED -D_ACL_PRIVATE
+
+HAS_TESTS=
+SUBDIR.${MK_TESTS}=	tests
 
 .include <bsd.prog.mk>

Modified: stable/12/etc/mtree/BSD.tests.dist
==============================================================================
--- stable/12/etc/mtree/BSD.tests.dist	Wed Sep 30 00:53:55 2020	(r366276)
+++ stable/12/etc/mtree/BSD.tests.dist	Wed Sep 30 00:56:08 2020	(r366277)
@@ -12,6 +12,8 @@
         ..
         chmod
         ..
+        cp
+        ..
         date
         ..
         dd


More information about the svn-src-stable-12 mailing list