Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5328875ybv; Tue, 11 Feb 2020 13:37:11 -0800 (PST) X-Google-Smtp-Source: APXvYqydIEvFD35sprVsLc44NQUHLVt0Wdst9jeE//CjN9S9UCNIQCByCE8maqlb6kaJ+hrMkMbz X-Received: by 2002:aca:5844:: with SMTP id m65mr4278864oib.136.1581457030896; Tue, 11 Feb 2020 13:37:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581457030; cv=none; d=google.com; s=arc-20160816; b=Rpv/kLCViiMqGUttNEjlZEBON7XbWQzmnXBEa9V0sdn5s/glHrWdBS4SlCH6majNXi /SpzA398ZQ0vh2jzaB6U8UQsTYjtqaTCjKbdzzj33Ns+1Uwd14oHfGGVPa0pJOKPAOp3 CleP++HRS0R9SolmrqOYYaAYx0o8UAdfopwqd6Mb7apyRikVR/TVtJyaNhLOTp+NpweT Ex7ScTbh/P9hAqv01tFioKnR3+38Rg7/rJwgH+DwVLJkp3VcQer5koPakwQ1GIiL4/XA FcP+EZJiB+/8V1YFq0covdtiaXQEeymKVtqMLQ+mXZD5ef77U4RTAxaxV8BuoRnKuDrU mUyA== 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=CU1W+ehrAiS3jw2NJvVJpdaUBPu6nkbnRDzhgkpWwa0=; b=bN/vMCJUjnwQ5D1Up3awrZezXYYZKb0kPnONeTjQLHz3XIKAn48ZsVUuPXDhJ/Utlb ABieAKHusIbOmNs2ZtNR3KLV3oYTY8F+m6Z5IcGMdzURIMY2DTes2OW/1wKbKp5JhKOI ruqWgCA8ClYpxdysxHritJDDtNdzm81rvAcGOauPDAWr/yif0iFLutN+FjgBsL5PcAF2 OEafWJqR7ky8oD73FfK+PZNXiA1EGws5YimPmz5oa7y4rtq9yNXWwdFx/Uxij6sz04A8 qIORzLZpWboTgy+YbKdjNsEp4yUPSJ5Pmr+gBmBFUbrYgVAMN0H6Kh95IE0b75gwtowa 435g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=dlqQhCmu; 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 d10si2746972oti.226.2020.02.11.13.36.59; Tue, 11 Feb 2020 13:37:10 -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=dlqQhCmu; 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 S1730796AbgBKSsb (ORCPT + 99 others); Tue, 11 Feb 2020 13:48:31 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:39590 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730752AbgBKSsb (ORCPT ); Tue, 11 Feb 2020 13:48:31 -0500 Received: by mail-pl1-f195.google.com with SMTP id g6so4617257plp.6 for ; Tue, 11 Feb 2020 10:48:30 -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=CU1W+ehrAiS3jw2NJvVJpdaUBPu6nkbnRDzhgkpWwa0=; b=dlqQhCmuU8Uioh1M8bOeS+GLp9N1MbISkwrAfoMmSuChZxiDVR397U7J+9XD3riMI2 8V6PLYYK4JZ/5qhJF2R/sfHyPLuErPmjTkqKN44uiSfNvd8WJMpVvAMpZDHQTMYyQ+Fx lgS31IAh+J0IdJPNMYcvqtyOV2jkqRWOlMfJMwyyHc0E+IfbWg9MMgUR/8nWFxOb6z0+ bshcTHAfb3KR6uEGGp8sca69Kve7JaCeJ9Rr/J41Rk0BYi0/QshjvfXwyQuEqMR40uIi g81JgSc+2rBNpyRq7x6Xo0DAhHfu8HZIoXxxX29qDSnjXyFGDTPkvmpuNV+Q1TBBPU4C TleQ== 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=CU1W+ehrAiS3jw2NJvVJpdaUBPu6nkbnRDzhgkpWwa0=; b=I/Rh2RJZ3QlMNA+GSbSkBJwRXH3RChgLGlWji5hiq/nX6KpUu7U4ckzAMlm8YhjbGw DZkLXAdRiLscm7LnNH8JVJ28j9XZ8bEkwIGR6TXMR/yh/yisDoGheAP/bjoB6UPwt0kH WlCC+HFPw7TtO7Pcb6org/k+/7GGyFdTjqlRlvouTKZmCN8jhfTDBWfWeAYoac5csLvP WLNXcxjJvFLQ0TS7eLt6BBqoz9h/mSfFBeB0kn0YnxWE754DC1G73QliLw/kBsgt3BT3 tHI6LDz6U60BbNqTICMtZXjm4CbSb2oRpaHM6u0ZIwyrair4476r20LPz8w1/w8U+Jxs P44A== X-Gm-Message-State: APjAAAWRC60GAQPIIPkvOkK7pYAwSL7RuGVMY7nFTIx50qgQKr/oe8wh DnDY8syuM5AAV9s9YlV3PwNfpKPIeichDvWk+U/KkQ== X-Received: by 2002:a17:90a:858a:: with SMTP id m10mr5191369pjn.117.1581446909986; Tue, 11 Feb 2020 10:48:29 -0800 (PST) MIME-Version: 1.0 References: <20200211002551.147187-1-heidifahim@google.com> In-Reply-To: From: Brendan Higgins Date: Tue, 11 Feb 2020 10:48:19 -0800 Message-ID: Subject: Re: [PATCH] kunit: run kunit_tool from any directory To: "Bird, Tim" Cc: Heidi Fahim , David Gow , Daniel Latypov , "open list:KERNEL SELFTEST FRAMEWORK" , KUnit Development , Linux Kernel Mailing List 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 Tue, Feb 11, 2020 at 10:26 AM Bird, Tim wrote: > > -----Original Message----- > > From: Brendan Higgins > > Sent: Monday, February 10, 2020 5:32 PM > > To: Heidi Fahim ; David Gow ; Daniel Latypov > > Cc: open list:KERNEL SELFTEST FRAMEWORK ; KUnit Development ; Linux > > Kernel Mailing List > > Subject: Re: [PATCH] kunit: run kunit_tool from any directory > > > > On Mon, Feb 10, 2020 at 4:26 PM Heidi Fahim wrote: > > > > > > Implemented small fix so that the script changes work directories to the > > > linux directory where kunit.py is run. This enables the user to run > > > kunit from any working directory. Originally considered using > > > os.path.join but this is more error prone as we would have to find all > > > file path usages and modify them accordingly. Using os.chdir ensures > > > that the entire script is run within /linux. > > > > > > Signed-off-by: Heidi Fahim > > > > Reviewed-by: Brendan Higgins > > > Sorry - I'm not a current kunit user, but does this mean that the > kernel source has to be present in order to run the unit tests? > That's problematical for embedded systems. Maybe that's outside > the scope of what unit tests were envisioned for? No worries. It is already the case that the kunit_tool assumes you have the source. It's purpose is to build tests, run them, and collect results. We are working on separating these functions, but right now given that the script assumes it will build the kernel for you, it is necessarily the case that you have source. You can, nevertheless, build and run KUnit tests without the use of our scripts, which should work for most applications.