From owner-freebsd-testing@freebsd.org Thu Mar 28 01:52:57 2019 Return-Path: Delivered-To: freebsd-testing@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7E4B1564A94 for ; Thu, 28 Mar 2019 01:52:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 53D4574B57 for ; Thu, 28 Mar 2019 01:52:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 124541564A93; Thu, 28 Mar 2019 01:52:56 +0000 (UTC) Delivered-To: testing@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E284E1564A92 for ; Thu, 28 Mar 2019 01:52:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D7E074B52 for ; Thu, 28 Mar 2019 01:52:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id BE8BF1BD95 for ; Thu, 28 Mar 2019 01:52:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x2S1qsn1012100 for ; Thu, 28 Mar 2019 01:52:54 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x2S1qsAn012099 for testing@freebsd.org; Thu, 28 Mar 2019 01:52:54 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: testing@freebsd.org Subject: [Bug 236841] Check geom_nop.ko module for sys/geom/class/nop/nop_test Date: Thu, 28 Mar 2019 01:52:54 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: tests X-Bugzilla-Version: 12.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ngie@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: testing@freebsd.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-testing@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Testing on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Mar 2019 01:52:57 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D236841 --- Comment #3 from Enji Cooper --- Ok, this partly boils down to a change introduced in r274631... $ git diff 2cfe78eed8ed3^..2cfe78eed8ed3 diff --git a/sbin/geom/core/geom.c b/sbin/geom/core/geom.c index 8c15c2143e1e..5d23d933ec94 100644 --- a/sbin/geom/core/geom.c +++ b/sbin/geom/core/geom.c @@ -640,6 +640,11 @@ get_class(int *argc, char ***argv) #endif /* !STATIC_GEOM_CLASSES */ set_class_name(); + + /* If we can't load or list, it's not a class. */ + if (!std_available("load") && !std_available("list")) + errx(EXIT_FAILURE, "Invalid class name."); + if (*argc < 1) usage(); } ... and this code: 1318 if (sysctlbyname("kern.module_path", paths, &len, NULL, 0) < 0) 1319 err(EXIT_FAILURE, "sysctl(kern.module_path)"); 1320 for (p =3D strtok(paths, ";"); p !=3D NULL; p =3D strtok(NULL,= ";")) { 1321 snprintf(name, sizeof(name), "%s/geom_%s.ko", p, class_name); 1322 /* 1323 * If geom_.ko file exists, "load" command is available. 1324 */ 1325 if (stat(name, &sb) =3D=3D 0) 1326 return (1); 1327 } 1328 return (0); If the module doesn't exist, it will fail with `EXIT_FAILURE`. Why doesn't the test get skipped though? It looks like all of the load_gnop calls are kosher: $ grep -c load_gnop tests/sys/geom/class/nop/nop_test.sh 8 $ grep -c atf_add_test_case tests/sys/geom/class/nop/nop_test.sh 7 $ --=20 You are receiving this mail because: You are the assignee for the bug.=