Date: Sat, 20 Dec 2025 01:10:41 +0000 From: Jose Luis Duran <jlduran@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 9bbfffe39e87 - stable/15 - mtree: tests: Import NetBSD's mtree test suite Message-ID: <6945f791.34ded.5a667a92@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=9bbfffe39e87bc20818ea68efaf07399b83764bc commit 9bbfffe39e87bc20818ea68efaf07399b83764bc 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-20 01:06:52 +0000 mtree: tests: Import NetBSD's mtree test suite Manually import latest mtree test suite from NetBSD. MFC after: 1 week (cherry picked from commit 2f29d0f3e6d25599c188c94bf1e395d9cbeb2a4d) --- 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 }help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6945f791.34ded.5a667a92>
