From nobody Wed Feb 16 15:59:15 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C353319D1409; Wed, 16 Feb 2022 15:59:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JzN1b4G2zz3wGF; Wed, 16 Feb 2022 15:59:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645027155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3DO8wZfh2W2NiVVJp9/iZugyyCkiV7gKbg/+LfIm8Sk=; b=l9uAAYitWvHR6jw0zcBwl1/0rB2Iqwb9MOf9+ll6Ta3ylMA5liOlrv8Wx6Oqd9AFpkPes8 rGZOrWtua0+03lp4mcDEhhbMxT51zQqGwcvTvW7r5VmYxPMFT/gL+YG7zEEhBO/ElkbFoA KxGIrcGMVVSJzuhsCpC39bK35/kEhE8O9whElw8U04F7jtfO+0nejnf4mRbvXQaY/k93TC 4ApPsBgRKTUtsvXljnlK07eU5XP9aUbXnhHSzhrrbHd310WMWaCnSSQh7AAP86Eg+yhlPv xk7KZf37MteLBO8ldR/Lx/6Haf4FbnDfXfu9DySvagZ2kJ+1nQSHiqxgsz/F0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 68E93191CA; Wed, 16 Feb 2022 15:59:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 21GFxFQ0088027; Wed, 16 Feb 2022 15:59:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21GFxFkY088026; Wed, 16 Feb 2022 15:59:15 GMT (envelope-from git) Date: Wed, 16 Feb 2022 15:59:15 GMT Message-Id: <202202161559.21GFxFkY088026@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric van Gyzen Subject: git: 4e71258227d6 - main - newfs_msdos: connect the ATF test from NetBSD List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vangyzen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e71258227d6a0d7ae5adadb0f3672bfce2bc906 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645027155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3DO8wZfh2W2NiVVJp9/iZugyyCkiV7gKbg/+LfIm8Sk=; b=eG7rgFWdGP7Vc8LZtwCe9UPdNRCW+KNgtLltH6NhPNP4BE0jaCVPKIkjFDR1wI9/PDumJx /pIgJTEw3dMa3D1nB6kR/m/Bi/DsvTIRcjxsGgqTKik3nyvKTbNZ8MfaDyqiDIzqZ+kgsg HR+vrCWna8kQFA0dBDht+I4ZTdGVqyTW31tBQbJ8d1LKFP3+wfs5nIh4qp+h1mhUn8TQ6L mi2lxiGEzbMNEG+KWU33GfeXpCaeAZIvVzippkM75kk1vNKtzm7Tv+023q45hnujpVI5rx C/71cjxJ01yeQ0a5qW86ibwbEJIdBzNuUTeAzHiS2vK1Gd8xM4AMzOS0/oqOSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645027155; a=rsa-sha256; cv=none; b=LwjFWHyQx2h4y2xcXlYz0HNOxSHIJORk23vVV5/TaV+W8W/RAO6c61nw+WZkvFQiZgxW6l +LStYwNpMTviZNqBFSID6/opAb2HG+xtnOCS44MzpoKlfvUOoNr+nBc0zaNttu5xHor3gI toqXJvCvkZ/9owI+h4yzayazMqMXjRJuuHAB0gJIt90lpQHWxtzaUNedsZog40iBsLzR/4 WPQX8uOrnFolIRk1keuwCi5WMF+I9fajtItgsfzG17PHtn+b6W4ZyB8NOZkSL5iQEqhOZh gnvViE76A3Gs+sinZ992wFSs6V0PPH63pMQMU//v1h27XySyhVAUekCJReZTfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by vangyzen: URL: https://cgit.FreeBSD.org/src/commit/?id=4e71258227d6a0d7ae5adadb0f3672bfce2bc906 commit 4e71258227d6a0d7ae5adadb0f3672bfce2bc906 Author: Eric van Gyzen AuthorDate: 2022-01-31 20:43:04 +0000 Commit: Eric van Gyzen CommitDate: 2022-02-16 15:56:16 +0000 newfs_msdos: connect the ATF test from NetBSD NetBSD has an ATF test for newfs_msdos. Connect it to the build. Adapt it for FreeBSD. This would have caught the bug fixed by my previous commit. Reviewed by: delphij, emaste MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D34116 --- contrib/netbsd-tests/sbin/newfs_msdos/t_create.sh | 14 ++++++++++++-- etc/mtree/BSD.tests.dist | 2 ++ sbin/newfs_msdos/Makefile | 5 +++++ sbin/newfs_msdos/tests/Makefile | 6 ++++++ 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/contrib/netbsd-tests/sbin/newfs_msdos/t_create.sh b/contrib/netbsd-tests/sbin/newfs_msdos/t_create.sh index dc431166a469..61ed927b8889 100755 --- a/contrib/netbsd-tests/sbin/newfs_msdos/t_create.sh +++ b/contrib/netbsd-tests/sbin/newfs_msdos/t_create.sh @@ -31,11 +31,21 @@ validfat32_head() { } validfat32_body() { - atf_check -s eq:0 -o ignore -e ignore \ + if true; then + # FreeBSD + exp_err=empty + fsck=fsck_msdosfs + else + # NetBSD + exp_err=ignore + fsck=fsck_msdos + fi + + atf_check -s eq:0 -o ignore -e $exp_err \ newfs_msdos -b 512 -C 33m -F 32 msdos.img # fsck_msdos/newfs_msdos have been fixed # atf_expect_fail "PR bin/46743" - atf_check -s eq:0 -o not-match:FIXED -e empty fsck_msdos -p msdos.img + atf_check -s eq:0 -o not-match:FIXED -e empty $fsck -p msdos.img atf_expect_pass } diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 08ad8e41a527..ec487eb1124a 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -442,6 +442,8 @@ .. mdconfig .. + newfs_msdos + .. nvmecontrol .. pfctl diff --git a/sbin/newfs_msdos/Makefile b/sbin/newfs_msdos/Makefile index d12cf0245df2..0123f4dd7a8a 100644 --- a/sbin/newfs_msdos/Makefile +++ b/sbin/newfs_msdos/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + PACKAGE=runtime PROG= newfs_msdos MAN= newfs_msdos.8 @@ -11,4 +13,7 @@ WARNS?= 3 .endif CSTD= c11 +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + .include diff --git a/sbin/newfs_msdos/tests/Makefile b/sbin/newfs_msdos/tests/Makefile new file mode 100644 index 000000000000..3f112c7f4710 --- /dev/null +++ b/sbin/newfs_msdos/tests/Makefile @@ -0,0 +1,6 @@ +TESTSRC=${SRCTOP}/contrib/netbsd-tests/sbin/newfs_msdos + +NETBSD_ATF_TESTS_SH+= create + +.include +.include