From owner-freebsd-testing@freebsd.org Tue Aug 7 17:09:51 2018 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 D34101064C6A for ; Tue, 7 Aug 2018 17:09:50 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 31DF977EBE; Tue, 7 Aug 2018 17:09:50 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pg1-x544.google.com with SMTP id x5-v6so8137011pgp.7; Tue, 07 Aug 2018 10:09:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=FueDaCPyobJgE+4SZ+pXxVAwr0gzczhuEskBELo3Rxw=; b=ZIl7mfpNk+A8g8zrGHSqAFm+bCA8uQ0riv3pmNzLvhHmsl3ze2TUvYAS36coQORPMY irGGKxTXTyREMzj3yts2UgJM0CsEZU1bUqew/otblbKkB33JDu2k9SzhvF3h9MHJzOvt zx4Uo1BWQg0RPenlX/lEYl2kD5pOeYjRiZmOr2R9S0j30GRmn4VLra34mQuQ3YQ57Zkk 5WigxgmWXc+Chv6dAZWXjzbP8y3vd4b2TCV1J8l0OJZrO0/W3PqMjzDviQ27ifQJfFgB e/xV5wsKu9WlkzQkq/hPClFJKk1mfe+jT3TEIeW0beqowUzkZjCvgeh+yv5r5Kz3aRaA t7iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=FueDaCPyobJgE+4SZ+pXxVAwr0gzczhuEskBELo3Rxw=; b=sfKV6cSAglXi9HGFy7e75VjASxJ3sOZdnCey16uBUf1ZFPfQdYYyepGl+nbh4zLfDH gS7Ic5sWHhSgxqihiwfkhnExQWL6s7d/ab9LpGggQUUr9yORuX1nvCBNr9YIOmKJxq8T N42oGWRH0EHNaPXnvVd9TL0X+taQHZufl5g8QvK+Lj8ymds42AujMaS11v+gdljXGdph ZTqJXsOs6ywqD8/KWfK6+MP0Kb6nKBqP7egK8HEG7SAoZ1xekiYPjj7c2JDAlcaUynME RQJLFtb9FhIWAiNSwiX3pGn/LPIkNeB+iLUkV7v94m6pnY4IBYUb91AKSuzpccIbN505 +pJA== X-Gm-Message-State: AOUpUlEbs2llLMyowe4JUHqi3eem7dK00CxcpRJhVzYlODJj8Nprtb6K DHC+XC5sFhTryrnsFkXYGh6rMaV6 X-Google-Smtp-Source: AAOMgpeqgCJs7ofjxzGuEOfV6f7CtEQ2Nfm2LXswDZnsDzYjEcxjMDrko9bc6ekVaQRZv04Li3NzTg== X-Received: by 2002:a62:4ece:: with SMTP id c197-v6mr22866465pfb.240.1533661788856; Tue, 07 Aug 2018 10:09:48 -0700 (PDT) Received: from raichu (toroon0560w-lp130-09-70-52-224-239.dsl.bell.ca. [70.52.224.239]) by smtp.gmail.com with ESMTPSA id y86-v6sm3541400pfk.84.2018.08.07.10.09.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Aug 2018 10:09:47 -0700 (PDT) Sender: Mark Johnston Date: Tue, 7 Aug 2018 13:09:44 -0400 From: Mark Johnston To: Alan Somers Cc: "freebsd-testing@freebsd.org" Subject: Re: Skipping tests that are unimplemented in 32-bit emulation Message-ID: <20180807170944.GJ77150@raichu> References: <20180806191406.GA77150@raichu> <20180807150349.GF77150@raichu> <20180807152402.GG77150@raichu> <20180807163405.GH77150@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: freebsd-testing@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Testing on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Aug 2018 17:09:51 -0000 On Tue, Aug 07, 2018 at 10:52:59AM -0600, Alan Somers wrote: > On Tue, Aug 7, 2018 at 10:34 AM, Mark Johnston wrote: > > > On Tue, Aug 07, 2018 at 10:11:45AM -0600, Alan Somers wrote: > > > On Tue, Aug 7, 2018 at 9:24 AM, Mark Johnston wrote: > > > > Oops, right. For 2), then, couldn't we define test_suite("FreeBSD32") > > > > in the kyuafiles for the 32-bit test suite and set a > > > > test_suite.FreeBSD32.compat32=true variable in kyua.conf? Then a test > > > > which uses, say, setfib(1) can query that variable and skip if it's > > set. > > > > > > > > > > Ok, but what will set the test_suite.FreeBSD32.compat32 variable? It > > can't > > > be set as part of the image build, because then it will have the wrong > > > value in jails and chroots. It needs to be set at runtime. > > > > For my suggestion to work, the 32-bit test suite must be built with > > TESTSUITE=FreeBSD32 instead of the default in suite.test.mk. This could > > be accomplished in a few ways: > > 1) Modify the amd64 build to additionally build a 32-bit copy of the > > test suite with TESTSUITE=FreeBSD32 and install it to /usr/tests32. > > Users that wish to run it would have to copy it into their > > chroot/jail. > > > 2) When building a 32-bit image for a chroot/jail, just remember to > > specify TESTSUITE=FreeBSD32 in the make(1) invocation. (I didn't > > actually verify that this does what I expect.) > > 3) Always define the test suite name to be FreeBSD32 or FreeBSD64 > > depending on the target architecture. Then, tests that need to be > > skipped when run under COMPAT32 would need to check for the > > "compat32" variable _and_ determine if the host kernel is 64-bit > > (e.g., by looking at the hw.machine sysctl). > > > > If you do 2) and just set test_suite.FreeBSD32.compat32 statically in > > /usr/local/etc/kyua.conf, then I don't see why you need any special > > runtime logic. Any tests that aren't supported by COMPAT32 can just be > > skipped when the compat32 kyua variable is set. > > > > Option 2) may avoid additional runtime logic, but at the expense of > creating an image that won't work correctly when run natively. Plus, you > would also have to copy all of test_suite.FreeBSD's Kyua variables to > test_suite.FreeBSD32. For example, test_suites.FreeBSD.disks. > I still think the simplest option is to build a single test suite, where > the few tests that can't run under emulation will call a helper function > that compares the build architecture to the current kernel and skip on a > mismatch. It eliminates extra configuration, uses just a single image, and > doesn't modify a large number of files. > > Are there any emulations besides amd64/i386 that we support? Like > mips64/mips for example? There is COMPAT_FREEBSD32 glue for mips and powerpc64 at least. I'm not sure how well-supported that is though.