From nobody Wed Mar 02 21:57:27 2022 X-Original-To: dev-commits-src-branches@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 58D3919E0B20; Wed, 2 Mar 2022 21:57:29 +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 4K87JR6ySwz3KH6; Wed, 2 Mar 2022 21:57:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646258248; 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=kJy03oW66O6aDTWELU+YYO5Tk1QHo9UQC60kgQm9mgQ=; b=gncX9qBChRj1+xFEotJVyXTqHvxrv780FMnqY/KlXQkOdx60ckP9jAp9+ZdcJy6GbCbpNd PYqtSVwuCXTcafxYovYLwsGXsw73+6rUGdSQSa3TcaoqbGpwtFQQ8lXQxOojduwK4hrnoa WQ0NMXMnB4BvVEay9/2F27lekBCm73+KFkxWxnYwsAM08ahfzU1+NbQpSEDHz2m8Crif8w z4WKcQuVa85V1hxinTWdBDbru2gGeO18fif7Eh8JUehKxkpqyol9acYBqs8qdtVQucOAoj JeVlzhz1EgOtxq3H3y/LZgt203Sj/wlfs9I1Lzzx67g49Gnc0vOK7L8cy2CfXA== 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 32CB43468; Wed, 2 Mar 2022 21:57:27 +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 222LvRHp065242; Wed, 2 Mar 2022 21:57:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 222LvRxj065241; Wed, 2 Mar 2022 21:57:27 GMT (envelope-from git) Date: Wed, 2 Mar 2022 21:57:27 GMT Message-Id: <202203022157.222LvRxj065241@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric van Gyzen Subject: git: c14635226bab - stable/13 - newfs_msdos: connect the ATF test from NetBSD List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: c14635226bab394fb29d0444711967244f461693 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646258248; 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=kJy03oW66O6aDTWELU+YYO5Tk1QHo9UQC60kgQm9mgQ=; b=is24SYlhY6v8KDwufsnrWVI08Ansy9qIMG5NW6Ud1+REj+qqLe39dZd2PY5ne6DGHjttpC vQ6HdvZKuAPI46EdTx0Ffy5zJYP+BMJBIUfhjVC+v+uzHZZqxXM9UZlPIvtsdDJ5411a5I 538VfI1WGZgrur4KNgzrTRoEod0ujoy9v+iS0adfzSPy1HmxM87gxpsfEAw4ifddQc6lsl jPF7i2ZyhtrazSJN1FKbWGsy8/8E83NNnbVqqNCpzohfLAmPRm/9MTKZfj5+K6U/bQFbFE iX0f/yuSHIjUyTTRWhNrfJHT2ZC3uoXUFEdTBUmWtBHQSpkKEq9jJECqJDMV/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646258248; a=rsa-sha256; cv=none; b=CcCqGgvTURobjUb/GyeaeW6g8PYv6Y0oZI+IksDm3ZNQVD2sKe7janIrWYGC7/u5dZ7adJ L0bmvhp2gyG5ZUDMNBrrEB4Yn2xVYRIEnezxWEEsSspt+ZDC/qq3Qei2I32dboe1P0vo0g fqHocA2M+1Lf7SMUKKXmmCctNM2gdb+OLmcbTi1NclE5H0iRCVhPsUlYMH4Y6keW6LbmTR Qi1IoayMtDkKQ5gdWDEAU729b2nLavzE5VDgNYq3t6tdTzrRJ3NXCEXFSrhQBqewye98AD /4tskOQT+XT8er5137vH3tz2pxeSO3zJbbZgyYHOxJ1GBL/5/54EBd656xhvlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by vangyzen: URL: https://cgit.FreeBSD.org/src/commit/?id=c14635226bab394fb29d0444711967244f461693 commit c14635226bab394fb29d0444711967244f461693 Author: Eric van Gyzen AuthorDate: 2022-01-31 20:43:04 +0000 Commit: Eric van Gyzen CommitDate: 2022-03-02 21:56:30 +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 (cherry picked from commit 4e71258227d6a0d7ae5adadb0f3672bfce2bc906) --- 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 b21256c8563c..e3195c47ee88 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