Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/usr.sbin/mtree Add test mtree -O with same hash value ...



details:   https://anonhg.NetBSD.org/src/rev/87f8dc58522d
branches:  trunk
changeset: 826469:87f8dc58522d
user:      nakayama <nakayama%NetBSD.org@localhost>
date:      Thu Sep 07 04:05:21 2017 +0000

description:
Add test mtree -O with same hash value in directory and leaf.

diffstat:

 tests/usr.sbin/mtree/t_mtree.sh |  40 +++++++++++++++++++++++++++++++++++++++-
 1 files changed, 39 insertions(+), 1 deletions(-)

diffs (66 lines):

diff -r b258e5700f4a -r 87f8dc58522d tests/usr.sbin/mtree/t_mtree.sh
--- a/tests/usr.sbin/mtree/t_mtree.sh   Thu Sep 07 04:04:13 2017 +0000
+++ b/tests/usr.sbin/mtree/t_mtree.sh   Thu Sep 07 04:05:21 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_mtree.sh,v 1.7 2017/01/14 20:45:16 christos Exp $
+# $NetBSD: t_mtree.sh,v 1.8 2017/09/07 04:05:21 nakayama Exp $
 #
 # Copyright (c) 2009, 2012 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -412,6 +412,42 @@
 }
 
 
+atf_test_case mtree_onlyfile
+atf_test_case netbsd6_onlyfile
+onlyfile_head()
+{
+       atf_set "descr" "Test -O with same hash value in directory and leaf"
+}
+
+onlyfile_body()
+{
+       mkdir -p ab/no
+       echo ./ab/no >onlyfile
+       mtree -F ${FLAVOR} -c -n -O onlyfile >output
+       if [ ! -s output ]; then
+               atf_fail "mtree did not find path in onlyfile"
+       fi
+}
+
+mtree_onlyfile_head()
+{
+       FLAVOR=mtree onlyfile_head
+}
+netbsd6_onlyfile_head()
+{
+       FLAVOR=netbsd6 onlyfile_head
+}
+
+mtree_onlyfile_body()
+{
+       FLAVOR=mtree onlyfile_body
+}
+netbsd6_onlyfile_body()
+{
+       FLAVOR=netbsd6 onlyfile_body
+}
+
+
 atf_init_test_cases()
 {
        atf_add_test_case mtree_create
@@ -423,6 +459,7 @@
        atf_add_test_case mtree_ignore
        atf_add_test_case mtree_merge
        atf_add_test_case mtree_nonemptydir
+       atf_add_test_case mtree_onlyfile
 
        atf_add_test_case netbsd6_create
        atf_add_test_case netbsd6_check
@@ -433,4 +470,5 @@
        atf_add_test_case netbsd6_ignore
        atf_add_test_case netbsd6_merge
        atf_add_test_case netbsd6_nonemptydir
+       atf_add_test_case netbsd6_onlyfile
 }



Home | Main Index | Thread Index | Old Index