NetBSD Problem Report #59683

From www@netbsd.org  Thu Oct  2 13:06:00 2025
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 8A62C1A9239
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  2 Oct 2025 13:06:00 +0000 (UTC)
Message-Id: <20251002130559.3346D1A923C@mollari.NetBSD.org>
Date: Thu,  2 Oct 2025 13:05:59 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: t_nullmnt should check vfs.generic.fstypes for skip condition
X-Send-Pr-Version: www-1.0

>Number:         59683
>Category:       misc
>Synopsis:       t_nullmnt should check vfs.generic.fstypes for skip condition
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    martin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 02 13:10:00 +0000 2025
>Closed-Date:    Tue Oct 07 10:48:00 +0000 2025
>Last-Modified:  Tue Oct 07 10:48:00 +0000 2025
>Originator:     Taylor R Campbell
>Release:        current, 11, 10
>Organization:
Test NullBSD Skipper LLC
>Environment:
>Description:

	This change adapted t_nullmnt to skip rather than fail on
	kernels without nullfs support:

changeset:   1192671:a7894420e1cd
branch:      trunk
user:        martin <martin@NetBSD.org>
date:        Mon Jun 02 18:50:40 2025 +0000
files:       tests/lib/libc/kevent_nullmnt/t_nullmnt.sh
description:
Skip the tests when the nullmount fails (kernel w/o file-system NULLFS)


diff -r 17520c1b785c -r a7894420e1cd tests/lib/libc/kevent_nullmnt/t_nullmnt.sh
--- a/tests/lib/libc/kevent_nullmnt/t_nullmnt.sh	Mon Jun 02 18:08:15 2025 +0000
+++ b/tests/lib/libc/kevent_nullmnt/t_nullmnt.sh	Mon Jun 02 18:50:40 2025 +0000
@@ -11,7 +11,8 @@ nullmnt_common()
 {    
 	mkdir ${curdir}/lower_dir
 	mkdir ${curdir}/upper_dir
-	mount -t null ${curdir}/lower_dir ${curdir}/upper_dir
+	mount -t null ${curdir}/lower_dir ${curdir}/upper_dir || \
+		atf_skip "nullfs not supported"
 	rm -f ${curdir}/lower_dir/afile
 	touch ${curdir}/lower_dir/afile


	Rather than check whether `mount -t null' works at all as the
	condition for skipping, it should check whether `null' appears
	in sysctl vfs.generic.fstypes -- and it should fail if `mount
	-t null' fails in that case.


>How-To-Repeat:

	code inspection


>Fix:

	case " "$(sysctl vfs.generic.fstypes)" " in
	*" null "*)
		;;
	*)	atf_skip "nullfs not supported on this kernel"
		;;
	esac


>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: misc-bug-people->martin
Responsible-Changed-By: riastradh@NetBSD.org
Responsible-Changed-When: Thu, 02 Oct 2025 13:18:00 +0000
Responsible-Changed-Why:
martin, can I trouble you do do this?


State-Changed-From-To: open->needs-pullups
State-Changed-By: martin@NetBSD.org
State-Changed-When: Thu, 02 Oct 2025 13:48:33 +0000
State-Changed-Why:
fixed in head, will request pullups after some test rounds


From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/59683 CVS commit: src/tests/lib/libc/kevent_nullmnt
Date: Thu, 2 Oct 2025 13:47:03 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Thu Oct  2 13:47:03 UTC 2025

 Modified Files:
 	src/tests/lib/libc/kevent_nullmnt: t_nullmnt.sh

 Log Message:
 PR 59683: check for availability of null FS support via
 vfs.generic.fstypes, fail if the mount fails for other reasons.


 To generate a diff of this commit:
 cvs rdiff -u -r1.8 -r1.9 src/tests/lib/libc/kevent_nullmnt/t_nullmnt.sh

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: misc/59683 (t_nullmnt should check vfs.generic.fstypes for skip condition)
Date: Fri, 03 Oct 2025 12:58:55 +0700

 Since that test is mounting, and not using rump,
 it should probably also skip unless

 	[ "$(id -u)" = 0 ] || [ "$(sysctl -n vfs.generic.usermount)" != 0 ]

 kre

State-Changed-From-To: needs-pullups->pending-pullups
State-Changed-By: kre@NetBSD.org
State-Changed-When: Sat, 04 Oct 2025 20:10:30 +0000
State-Changed-Why:
[pullup-10 #1171] [pullup-11 #47]


From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/59683 CVS commit: [netbsd-11] src/tests/lib/libc/kevent_nullmnt
Date: Mon, 6 Oct 2025 16:11:12 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Mon Oct  6 16:11:12 UTC 2025

 Modified Files:
 	src/tests/lib/libc/kevent_nullmnt [netbsd-11]: t_nullmnt.sh

 Log Message:
 Pull up following revision(s) (requested by kre in ticket #47):

 	tests/lib/libc/kevent_nullmnt/t_nullmnt.sh: revision 1.9

 PR 59683: check for availability of null FS support via
 vfs.generic.fstypes, fail if the mount fails for other reasons.


 To generate a diff of this commit:
 cvs rdiff -u -r1.8 -r1.8.2.1 src/tests/lib/libc/kevent_nullmnt/t_nullmnt.sh

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/59683 CVS commit: [netbsd-10] src/tests/lib/libc/kevent_nullmnt
Date: Mon, 6 Oct 2025 16:23:00 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Mon Oct  6 16:23:00 UTC 2025

 Modified Files:
 	src/tests/lib/libc/kevent_nullmnt [netbsd-10]: t_nullmnt.sh

 Log Message:
 Pull up following revision(s) (requested by kre in ticket #1171):

 	tests/lib/libc/kevent_nullmnt/t_nullmnt.sh: revision 1.7-1.9

 t_nullmnt: Need privileges for mount.
 (unless vfs.generic.usermount=1 but let's keep it simple)

 PR 59683: check for availability of null FS support via
 vfs.generic.fstypes, fail if the mount fails for other reasons.


 To generate a diff of this commit:
 cvs rdiff -u -r1.6 -r1.6.2.1 src/tests/lib/libc/kevent_nullmnt/t_nullmnt.sh

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: kre@NetBSD.org
State-Changed-When: Tue, 07 Oct 2025 10:48:00 +0000
State-Changed-Why:
Pullups completed


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.