From owner-freebsd-testing@freebsd.org Tue Aug 7 15:08:42 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 38EFD1061A2F for ; Tue, 7 Aug 2018 15:08:42 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) (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 8F283738D9; Tue, 7 Aug 2018 15:08:41 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lj1-x231.google.com with SMTP id p6-v6so13739216ljc.5; Tue, 07 Aug 2018 08:08:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=MK0/1VM7FC2VD1cc2a2tnKsYHERN4RIuWhOe33Mt31Y=; b=QMoaZ1ag/vC1j3UDMJyOycv9iDx/vQIZz7UV+RpnMNjgRGxW+ZvkVo0/HJimzrMMpk gEBrSCe9L5/kvH4bH7hLRcCRUV4SIYcY/fRuJ9FBAxWxEvGoje/rGhJxDM0EoIETddgF AUbLFDd6w3NVJ2EuhPM0DG4EuRBb73DVCnKN+OyG8Sxdu5NOJpDGS53+XNAw2LX07/OZ agdZFoCi1jhRSppG7OxzXuLGx+x0ahAz2/EdaJOFhDVDr+ohM8VuDLLZ/LE1QKaH/Us/ fJ1rfkdl5iEAArC/UCVu8adR2tdkdAj01yJPAgKrVAc3bytv12oeadbM7Tfjli8178fF rqzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=MK0/1VM7FC2VD1cc2a2tnKsYHERN4RIuWhOe33Mt31Y=; b=oxhtOzg2XU7wKr4CNlIhXKP48xYlS1pBF3FMWQ3dIy94B+XQwgmJDtIJa5VNNVPmad 8eTelWn+hhffDLjPspPFLqmAGm2Gff3seDPMDI3LL9xILcz8gfR6UiNXIUJb9kHkhEc1 wrSSOT5Kx5Ktvf2GhvDM/ApXervJ3jwLysDzYp+fPdlYm/wpNi5jWrbAhDeW56YAJRNB LqLxWaceiArWxeJb24+ju916QVNssxkoMGTlxLwHX3QnGBkAlgAtjlDqACpCzqAhXxbP LgTlWAsnZ349HGFoaDS2SY6x8RoBVpuS2qyAFdhxhfK5xvzVf0gA10kF37MaZa45Dtgc a1WQ== X-Gm-Message-State: AOUpUlEozRCfMUkuDLfxwC/3SnIn70Gz+A2A31bHAWd9c6ViQ90e9QBT fG1ddqxUfDgPwYFK42eOs1JPZAg/fI1pwSpYJHT8mg== X-Google-Smtp-Source: AAOMgpdcqO2fvIHkdAWTkap+c58yfMt2oRNPmDoGMODfL9xxWCZtbrqolswR4RRwcO5zTHa6ncafJ1E9Db6nDpBp3DY= X-Received: by 2002:a2e:4401:: with SMTP id r1-v6mr17020189lja.21.1533654519723; Tue, 07 Aug 2018 08:08:39 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 2002:ab3:7851:0:0:0:0:0 with HTTP; Tue, 7 Aug 2018 08:08:39 -0700 (PDT) In-Reply-To: <20180807150349.GF77150@raichu> References: <20180806191406.GA77150@raichu> <20180807150349.GF77150@raichu> From: Alan Somers Date: Tue, 7 Aug 2018 09:08:39 -0600 X-Google-Sender-Auth: 4lFQR0DqG1jKjjOOMiDPAghg5lU Message-ID: Subject: Re: Skipping tests that are unimplemented in 32-bit emulation To: Mark Johnston Cc: "freebsd-testing@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 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 15:08:42 -0000 On Tue, Aug 7, 2018 at 9:03 AM, Mark Johnston wrote: > On Mon, Aug 06, 2018 at 02:18:35PM -0600, Alan Somers wrote: > > On Mon, Aug 6, 2018 at 1:14 PM, Mark Johnston wrote: > > > > > On Sun, Jul 29, 2018 at 11:23:33AM -0600, Alan Somers wrote: > > > > I recently tried running the i386 test suite in a chroot on an amd64 > > > > system. 162 tests failed, and 33 were broken. Some of the failures > were > > > > due to system calls that haven't been implemented in 32-bit > emulation. > > > > setfib(2) is an example. I think it's unlikely that anybody will > ever > > > need > > > > 32-bit emulation for setfib(2), so perhaps we should just skip the > test? > > > > What's the best way to do that? I can come up with two ways: > > > > > > > > 1) At runtime, check the hw.machine sysctl and see if it matches some > > > > compile time preprocessor constant. I don't know what constant to > use, > > > > though. Checking __amd64__ would only work for i386 binaries on > amd64 > > > > kernels, and not something else like mips binaries on mips64 kernels > (I > > > > don't know if we support that, but I don't want to rule it out). > > > > > > > > 2) At buildtime, put an "allowed_architectures=i386" metadata > property > > > into > > > > the Kyuafile for that test program. This would require support in > > > > /usr/share/mk/bsd.test.mk. It would also require patching Kyua > itself, > > > > because currently "Kyua config" returns the architecture for which > it was > > > > built, not the one on which it's running. > > > > > > > > Thoughts? > > > > > > I don't have any particular suggestions, but I'd personally rather > avoid > > > a solution that requires tests to opt-in to running under 32-bit > > > emulation, which I think excludes 2). I'd be happy to help annotate > > > any failing tests as required. It bugs me that the test suite > currently > > > doesn't cover such relatively complicated functions as > > > freebsd32_copy_msg_out(). > > > > I don't think that 2 would necessarily be opt-in, because an undefined > > value for allowed_architectures is interpreted as meaning "all". It > could > > be opt-out instead. But it could still be a little awkward. Option 1 > > could be accomplished for atf-c testcases by comparing the value of > > __LP64__ to a hardcoded list of known 64-bit processors as returned by > > uname(3). But I don't know how to implement 1 for atf-sh programs. An > > atf-sh program would need to know the architecture of any binary that it > > might invoke. Is there anything in /etc indicating what architecture the > > image was built for? Should we just use "file /lib/libc.so.*"? > > Could we instead build and install a /usr/tests32 suite on systems that > can support it, and use a top-level Kyuafile and kyua.conf that overrides > the "architecture" variable? > It's not enough to build and install the atf-c tests in 32-bit mode. We would need an entire 32-bit chroot in order to run the atf-sh tests in 32-bit mode.