Date: Sat, 13 Dec 2025 14:38:19 +0000 From: Jose Luis Duran <jlduran@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 2f29d0f3e6d2 - main - mtree: tests: Import NetBSD's mtree test suite Message-ID: <693d7a5b.327b7.650dbe8c@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=2f29d0f3e6d25599c188c94bf1e395d9cbeb2a4d commit 2f29d0f3e6d25599c188c94bf1e395d9cbeb2a4d Author: Jose Luis Duran <jlduran@FreeBSD.org> AuthorDate: 2025-12-09 15:45:01 +0000 Commit: Jose Luis Duran <jlduran@FreeBSD.org> CommitDate: 2025-12-13 14:37:20 +0000 mtree: tests: Import NetBSD's mtree test suite Manually import latest mtree test suite from NetBSD. MFC after: 1 week --- contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh | 40 +++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh b/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh old mode 100755 new mode 100644 index 5daefd84e928..5e4177c792a5 --- a/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh +++ b/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh @@ -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.10 2023/12/02 16:18:17 christos Exp $ # # Copyright (c) 2009, 2012 The NetBSD Foundation, Inc. # All rights reserved. @@ -447,6 +447,42 @@ mtree_specspec_type_body() fi } +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 @@ -459,6 +495,7 @@ atf_init_test_cases() atf_add_test_case mtree_merge atf_add_test_case mtree_nonemptydir atf_add_test_case mtree_specspec_type + atf_add_test_case mtree_onlyfile atf_add_test_case netbsd6_create atf_add_test_case netbsd6_check @@ -469,4 +506,5 @@ atf_init_test_cases() atf_add_test_case netbsd6_ignore atf_add_test_case netbsd6_merge atf_add_test_case netbsd6_nonemptydir + atf_add_test_case netbsd6_onlyfile }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?693d7a5b.327b7.650dbe8c>
