From owner-freebsd-testing@FreeBSD.ORG Wed Jan 22 00:02:51 2014 Return-Path: Delivered-To: freebsd-testing@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EB943D3; Wed, 22 Jan 2014 00:02:51 +0000 (UTC) Received: from mail-we0-x229.google.com (mail-we0-x229.google.com [IPv6:2a00:1450:400c:c03::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A4C5F178C; Wed, 22 Jan 2014 00:02:50 +0000 (UTC) Received: by mail-we0-f169.google.com with SMTP id u57so8820619wes.14 for ; Tue, 21 Jan 2014 16:02:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=WQC4ZbpYdtP9CgIA+zCIXk57eNyhuEDlA80mSdbdgWA=; b=YbBzU16q9m+hpEI+dd/Pr0K+2S7X780mrDlf7B8A5crYllClQcyR1/f3AONZkkKaKX vkcDTQjfV+JTzbA/1Mwnfyfz3G908BonD5eJtNs9XWmz6gWMI2m6b16kdvY7PRlW+lCW B3kP+LyZDHM254OVwSgZn2SiuaA9ZDN1uMb/e6tw+QO5f1OdkBMKmhEied0Nv23G9NMC dxQrJifD13/2mB+b8QwKxVUQ7zxUYhcCWBQyO71iG57vxIDrvk7ghQvr4Eir1/yhSAKz dz0VczjedAYiYu96okVzAddsgf5JzAe0LbtXxD/STef3+kx/noa6AQj+IxWoJqHta+PD 7jOg== MIME-Version: 1.0 X-Received: by 10.194.78.141 with SMTP id b13mr21140236wjx.32.1390348969092; Tue, 21 Jan 2014 16:02:49 -0800 (PST) Sender: asomers@gmail.com Received: by 10.194.22.35 with HTTP; Tue, 21 Jan 2014 16:02:49 -0800 (PST) In-Reply-To: References: Date: Tue, 21 Jan 2014 17:02:49 -0700 X-Google-Sender-Auth: Z7kbzWE0-JVRvdOC07Wpq9oL0o4 Message-ID: Subject: Re: PATCH: add ATF tests in sys From: Alan Somers To: Garrett Cooper Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-testing@freebsd.org" X-BeenThere: freebsd-testing@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Testing on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jan 2014 00:02:51 -0000 On Tue, Jan 21, 2014 at 4:56 PM, Garrett Cooper wro= te: > >> On Jan 21, 2014, at 14:45, Alan Somers wrote: >> >> I rewrote the unix seqpacket tests in ATF. The hard part is adding >> them to the build. The linked patch adds them in the directory >> sys/kern/tests and builds them as part of buildworld, not buildkernel. >> They get installed to /usr/tests/sys/kern, but the intermediate >> objects are stored in /usr/obj/sys/kern/tests. That means that you >> can't have different tests associated with different kernel configs. >> I think that this is desirable, because you wouldn't be able to >> install tests for different kernel configs anyway, given our chosen >> layout of /usr/tests. >> >> Please comment on the parts of this patch that deal with Makefiles. >> Is this the appropriate way to add sys tests to the build? Shouldn't >> I be building them in buildkernel instead of buildworld? I couldn't >> find a good way to do that. > > I bypassed that for simplicity and placed the tests in tests/sys/kern/...= etc. Shoehorning things into our overly complex kernel build system just s= eems like a really bad idea... Just make it load as a driver, loadable, and= dependent on kern.features to run..? > Cheers! > -Garrett I tried to place the tests as closely as possible to the source code that they're testing, according to https://wiki.freebsd.org/TestSuite/Structure#Makefiles_for_test_programs . I don't feel strongly about it either way, but I think Simon and jmmv do. FWIW, the tests run as a userland program, not in kernel mode. -Alan