From owner-freebsd-testing@FreeBSD.ORG Thu Jul 24 01:20:41 2014 Return-Path: Delivered-To: freebsd-testing@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2636E2EC; Thu, 24 Jul 2014 01:20:41 +0000 (UTC) Received: from mail-ie0-x22d.google.com (mail-ie0-x22d.google.com [IPv6:2607:f8b0:4001:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E164B2FF7; Thu, 24 Jul 2014 01:20:40 +0000 (UTC) Received: by mail-ie0-f173.google.com with SMTP id tr6so1695225ieb.4 for ; Wed, 23 Jul 2014 18:20:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=nVyFrYgGfl/WFded2jCQRwDF8mLl7vM/MFqmyYmnlis=; b=v6SHKA1Hl/R/ZXoPlcffoKOEtN1IzxpDsOJD6mgUYbm4Po7YrASPmeiRU3xOgaedSM zvGO6yUIso6yQdiah/gUckGUMm3FxwELYH1Ys0uEwj7ofC0FJjSly+Ad1U+dZ9384exK ukSEWuiBxiKcm8GLbHtxn3Qbw7YNH6SuRELox5HZhoo0tzNpU73Joa7afmd1yN5XKbBU ItjYBVAYpfHV8ID/kdol8m4EhQ1MwL77ctnhwdAweJp9tTnGb2lF28YdCRl+Fr3yx0Qp fJEDQCOkrW9nD1qPKKkDSlWwd5yWvLClD5/NltqVWAwdzsMGiyrhN06RUpHd5952VkN4 C6Fw== MIME-Version: 1.0 X-Received: by 10.50.138.72 with SMTP id qo8mr9563764igb.2.1406164840300; Wed, 23 Jul 2014 18:20:40 -0700 (PDT) Received: by 10.50.213.102 with HTTP; Wed, 23 Jul 2014 18:20:40 -0700 (PDT) In-Reply-To: References: Date: Wed, 23 Jul 2014 18:20:40 -0700 Message-ID: Subject: Re: Location of test kernel drivers in tree? From: Garrett Cooper To: Julio Merino Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-testing@freebsd.org" X-BeenThere: freebsd-testing@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Testing on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jul 2014 01:20:41 -0000 On Wed, Jul 23, 2014 at 6:11 PM, Julio Merino wrote: > On Tue, Jul 22, 2014 at 7:07 PM, Garrett Cooper wrote: >> Hi all, >> I need to do some KPI verification and hook that into ATF / kyua. >> Since we don't have RUMP [yet] from NetBSD, I would typically write a >> simple, one-off test driver, hook it into the kernel build and have a >> piece of C or shell code that pokes directly at the driver to get >> access to kernel interfaces. >> I was wondering if it made sense to put all test drivers into >> sys/tests//..., e.g. >> sys/tests/test_memguard/{Makefile,test_memguard.c}, etc. Is there an >> alternative approach that others use to solve this problem? > > I don't have an answer to alternative solutions, but keeping the > helper modules inside tests/sys/ (I think you got that backwards in > your email?) is a good idea. I was thinking of sys/tests (with associated build machinery under sys/modules/tests) because the kernel and world [*] build vary wildly by design. > (Instead of tests/sys//, I'd probably do > tests/sys///... though, to keep the > helpers next to the only tests that need them. Unless the helper is > really generic and usable by many tests.) Most definitely! Thanks :)!! -Garrett * There's MODULES_WITH_WORLD [see make.conf(5)], which is off by default, so technically modules can be built with world, but I'm not sure how well it works when you have to have to use opt_* headers.