Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7573808imu; Mon, 3 Dec 2018 15:23:44 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vbx7Fk6L3nqyT0ORNwcqzK7dfY/A7sd3NPEd4Sq2ebjYrTdLG3l12CWkk94ct5Ghg+JY1f X-Received: by 2002:a62:1c7:: with SMTP id 190mr17868481pfb.46.1543879424099; Mon, 03 Dec 2018 15:23:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543879424; cv=none; d=google.com; s=arc-20160816; b=FLKNd0Z3m1CA+kwuJPVP48KL9qx6b3O+2vzwrIbnUbchxxC7goyXCmLUn0+swswo0C tGfAX4HrnI1XiKbW4D1rb2O7zHrPmFY8yVGj64PCXyuF/Kdv3ARYQuBZYYIkLLebo40p yx09Q/dCNRT1mTN+jPMQRz4up8Kx9NggFqIxHsSjXqsMIAqwDEs2xlox3oRCyf2rpb45 dEiVKbWWwsbLyy752bA8zmYCq7T54mo8IxzKwKAKK/GzLeO+KafLh2BRmDHi9egpnQde Iz/77OqEwBoOQGqHpfjg+DlNnb2d8hLaTIsM+qFVADp8FmTgMLYF2dYcnQNt9MI0TQek Ln3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=cYCFcJ1UdDdLdTFH8pPRXacbQNJ1dh92bXLqX6q3pYk=; b=L4Z7Jd4uKGm7mRfJhsVlAcbtiouKwz2LE6MQUYoqo0s5fL2OU7ZxHv5pXeBw8UeDkZ LQyC7k15G5LZFNMFlatTkhvciM1jchNwkKbMSbsDAK2BUGlj8+DbgjW3w0zo7GBgZJqo kTac9aSW99po4Aj3ByrM+9HTw/liSL0FlNdjIEGfS1MVnjRSQKfWM39kzGzCONxrxHjH PTM4zUpE6soEoS+/NrjQLif+EArvIQ+nXPTo2S0cspSBwNFSks1ZMP17rhoOiLWX3/yp 7tu3jAjjuQnVXodgIGkCvAf+OLVfWS9fjFidZ0LDKvi5z43hbMOCDt0aUYEX8DSLqcIa URgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=OevCFM8J; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g18si13260753pgg.522.2018.12.03.15.23.26; Mon, 03 Dec 2018 15:23:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=OevCFM8J; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725953AbeLCXWq (ORCPT + 99 others); Mon, 3 Dec 2018 18:22:46 -0500 Received: from mail-oi1-f194.google.com ([209.85.167.194]:38847 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725903AbeLCXWq (ORCPT ); Mon, 3 Dec 2018 18:22:46 -0500 Received: by mail-oi1-f194.google.com with SMTP id a77so12594445oii.5 for ; Mon, 03 Dec 2018 15:22:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cYCFcJ1UdDdLdTFH8pPRXacbQNJ1dh92bXLqX6q3pYk=; b=OevCFM8JY8gCnIyRJRNgg8mr7ASkqBVQ3bsPKtDpmve/0pVcAYergzBjl2Zx3GPEWO M5PEbu7wdzTPS3ZU0+8pZCGR95r3VCN7mI4WPbkYbBNdaV3jRVOCc8Ll7G3c3fhhUXda pUSbCJY2GXRaB3ryUyb6AuXTLAKUjsiaw51W/Q5HptR9P17ZP63WTLA+fbVK+nujVurN KVaS3GrsrmyKHT+ZAQg+gB6+s7XW3+MMnhtU4opSvHfkn8U7dOnJo9ViLpmL7VrQGkHv v67aj/Epz4Txzss+xyevySbDYkH+njx74aq4oUjGk6bVlj7QPcExSje//DAZUlQ3Yrej Uw7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cYCFcJ1UdDdLdTFH8pPRXacbQNJ1dh92bXLqX6q3pYk=; b=abtmCQaM8q5q/Yy2/2d9HBspSIpJnK3Q8RYBlkPtwZxNjjVthEFU9wS1w8EzEAVvD8 koqc4SjLaFBfC/lShFO3eanlYXx4I4ukm/4wLajhtIavKd1sHpF7h0jkKSXeH7PJs9bY oqd0pXWE2kdKhHBwHDsp24bmFXbkkAENRs6m2y+ydRNwXx945jrnFv4Hb6Eaqot+pnhB Pxy1++C5Oj21nPvy8mI2NQR6b9G3tHgQY0AyDlhXTddSPtD9uTbtqY1+bLTGs8BgXHL2 lcTF4yihUOqoqgqK6AaGksq66ktJmDrSj7USXNseSOpe07+mYoozRaXumnpOJqMs48VK nchg== X-Gm-Message-State: AA+aEWZp6ddsc/diSFg2edWRrTIDqa1/bgbUEZDonoMDwzRnKhVkci9g JBO35zNL2ZFs+GlvGU3QN61kBcsIRiwZXnao16VGZQ== X-Received: by 2002:aca:be41:: with SMTP id o62mr10616674oif.206.1543879363718; Mon, 03 Dec 2018 15:22:43 -0800 (PST) MIME-Version: 1.0 References: <20181128193636.254378-1-brendanhiggins@google.com> <20181128193636.254378-7-brendanhiggins@google.com> <20181130033704.GL18410@garbanzo.do-not-panic.com> <20181130182203.GS18410@garbanzo.do-not-panic.com> In-Reply-To: <20181130182203.GS18410@garbanzo.do-not-panic.com> From: Brendan Higgins Date: Mon, 3 Dec 2018 15:22:32 -0800 Message-ID: Subject: Re: [RFC v3 06/19] arch: um: enable running kunit from User Mode Linux To: mcgrof@kernel.org Cc: Rob Herring , Arnd Bergmann , Greg KH , Kees Cook , shuah@kernel.org, Joel Stanley , mpe@ellerman.id.au, joe@perches.com, brakmo@fb.com, rostedt@goodmis.org, Tim.Bird@sony.com, khilman@baylibre.com, Julia Lawall , linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, Linux Kernel Mailing List , jdike@addtoit.com, richard@nod.at, linux-um@lists.infradead.org, Daniel Vetter , dri-devel@lists.freedesktop.org, dan.j.williams@intel.com, linux-nvdimm@lists.01.org, kieran.bingham@ideasonboard.com, Frank Rowand , Knut Omang Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 30, 2018 at 10:22 AM Luis Chamberlain wrote: > > On Fri, Nov 30, 2018 at 08:05:34AM -0600, Rob Herring wrote: > > On Thu, Nov 29, 2018 at 9:37 PM Luis Chamberlain wrote: > > > > > > On Wed, Nov 28, 2018 at 03:26:03PM -0600, Rob Herring wrote: > > > > On Wed, Nov 28, 2018 at 1:37 PM Brendan Higgins > > > > wrote: > > > > > > > > > > Make minimum number of changes outside of the KUnit directories for > > > > > KUnit to build and run using UML. > > > > > > > > There's nothing in this patch limiting this to UML. > > > > > > Not that one, but the abort thing segv thing is, eventually. > > > To support other architectures we'd need to make a wrapper to that > > > hack which Brendan added, and then allow each os to implement > > > its own call, and add an asm-generic helper. I think Rob is referring to the description for this patch. This patch previously did what you suggested, Luis, (source the KUnit kconfig from arch/um/) but Kees asked me to change it to how it is now (which probably makes sense if we are saying KUnit is not intended to be tied to a particular architecture, no?), and I forgot to update the commit description, sorry. > > > > I've not looked into why this is needed, but can't you make the abort > > support optional and arches can select it when they support it. > > Its why I have asked for it to be properly documented. The patches in no > way illustrate *why* such thing is done. And if we are going to > potentially have other archs do something similar best to make it > explicit. Yeah, I should better document it. I should also probably not include any UML specific header files in kunit/test.h; that seems like I am asking to get more tightly coupled if I am not careful about exactly what things I depend on. I think Luis is right, I need to add a wrapper around the features needed for the hack to support abort() and then write a UML specific implementation. For the asm-generic case, we could probably just have abort() call BUG(), with that KUnit should work on most architectures, albeit with pretty reduced functionality. > > > At > > least before, the DT unittests didn't need this to run and shouldn't > > depend on it after converting to kunit. Fair enough.