Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jan 2018 22:59:24 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r327565 - head/usr.bin/find/tests
Message-ID:  <201801042259.w04MxONi024383@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Thu Jan  4 22:59:24 2018
New Revision: 327565
URL: https://svnweb.freebsd.org/changeset/base/327565

Log:
  find: Speed up tests by using touch -d instead of sleep for timestamps
  
  I have verified that the tests still detect the absence of the r327362 fix.

Modified:
  head/usr.bin/find/tests/find_test.sh

Modified: head/usr.bin/find/tests/find_test.sh
==============================================================================
--- head/usr.bin/find/tests/find_test.sh	Thu Jan  4 22:38:01 2018	(r327564)
+++ head/usr.bin/find/tests/find_test.sh	Thu Jan  4 22:59:24 2018	(r327565)
@@ -36,10 +36,9 @@ find_newer_link_body()
 {
 	atf_check -s exit:0 mkdir test
 	atf_check -s exit:0 ln -s file1 test/link
-	atf_check -s exit:0 sleep 1.1
-	atf_check -s exit:0 touch test/file2
-	atf_check -s exit:0 sleep 1.1
-	atf_check -s exit:0 touch test/file1
+	atf_check -s exit:0 touch -d 2017-12-31T10:00:00Z -h test/link
+	atf_check -s exit:0 touch -d 2017-12-31T11:00:00Z test/file2
+	atf_check -s exit:0 touch -d 2017-12-31T12:00:00Z test/file1
 
 	# find(1) should evaluate 'link' as a symlink rather than its target
 	# (with -P / without -L flags).  Since link was created first, the



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801042259.w04MxONi024383>