From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D79DFC433EF for ; Wed, 30 Mar 2022 07:43:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241526AbiC3HpT (ORCPT ); Wed, 30 Mar 2022 03:45:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243940AbiC3HpQ (ORCPT ); Wed, 30 Mar 2022 03:45:16 -0400 Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E62DBDCA for ; Wed, 30 Mar 2022 00:43:29 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id F199F3201F5A; Wed, 30 Mar 2022 03:43:26 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 30 Mar 2022 03:43:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; bh=xX6gz1xhK8Ced8x34DwuQzbbZ+wnoVPlelUEwv c/4rI=; b=ts6jwYxW5FrRddt81vXPodjr3XtMDX0PHT9i3pEYr6/PJTud5eRCEE /Bkk3UAciR9h7TDeOC7A5o28Dhz1wPoZcgcyAFndvAmHU9/9JAQsswGmzgvWB0aw NTpA2JB+MV/6HBhTHlhJW6biW9AjumQH00wKwQtnOigHmMjorsDvUc8S83f9ijA/ gMTf0FVaD6l5f5XxQFpTF5ss0ZdNXtSMQuP9pGb4BWsze3ulEkxgw6ZcllAmDuxA B17TNKg4+/o1W1yAUYifMza8l8MifiUOcmPKofO7g4uQp6TBZuGI8zEBQXFRklnV zkEFpT0d+yTpAxufe8mSSoOTEHlDyxTA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=xX6gz1xhK8Ced8x34 DwuQzbbZ+wnoVPlelUEwvc/4rI=; b=lHnTfdj0fH4E2Yj7Ebe5GbafJDV142FG6 Qgx+ywoOJPN2tFAzHHWLaAt/RlkqbTPNBZ5kuifpaqx2oWLhDu7YoDgVFGI/MTId CK5gij0w1QvztYRosPs+3UuSPGQ60PzWkGUu28X6pfkqIzvde2MkNwb9AFdYsDEZ QHlk2WIIlarrloq8cglnjbwfVZTMA3vdXumtysVp1CX9+cP6SyYah6MZJnWtxkFb kqjGGGITWB0vWJn+lmHn3RsN812nlCQ0lFZWZAw8PHjFhBpSGNigLLDLuHZycRYI 1yVbqgi/jr9VCoyWEaPPMGUQ1Q/i4gHjTnPgXM2umfcwIKNONtO3A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeiuddguddvfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpefgueegudffffdvteeludduleekvdekjeefkeeiheehveeuleelvdekieeh gfegffenucffohhmrghinheplhhoghdrhihouhenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 30 Mar 2022 03:43:25 -0400 (EDT) Date: Wed, 30 Mar 2022 09:43:23 +0200 From: Maxime Ripard To: Daniel Latypov Cc: Mike Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Dave Stevenson , Phil Elwell , Tim Gover , Dom Cobley , dri-devel@lists.freedesktop.org, kunit-dev@googlegroups.com Subject: Re: [PATCH v6 02/12] clk: Introduce Kunit Tests for the framework Message-ID: <20220330074323.2svqaims42kouxu4@houat> References: <20220223105600.1132593-1-maxime@cerno.tech> <20220223105600.1132593-3-maxime@cerno.tech> <20220225132258.55yh537iknxh72vw@houat> <20220228104718.yorlzq6264jtffak@houat> <20220328075750.zfuvgd3q56cy5zir@houat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5aqkn42tnytjzo3t" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org --5aqkn42tnytjzo3t Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Daniel, On Mon, Mar 28, 2022 at 02:36:25PM -0500, Daniel Latypov wrote: > On Mon, Mar 28, 2022 at 2:57 AM Maxime Ripard wrote: > > On Fri, Mar 25, 2022 at 05:36:25PM -0500, Daniel Latypov wrote: > > > On Mon, Feb 28, 2022 at 4:47 AM Maxime Ripard wro= te: > > > > > > > > On Fri, Feb 25, 2022 at 01:29:03PM -0800, Daniel Latypov wrote: > > > > > On Fri, Feb 25, 2022 at 5:23 AM Maxime Ripard = wrote: > > > > > > > > > > > > Hi Daniel, > > > > > > > > > > > > On Wed, Feb 23, 2022 at 02:50:59PM -0800, Daniel Latypov wrote: > > > > > > > On Wed, Feb 23, 2022 at 2:56 AM Maxime Ripard wrote: > > > > > > > > > > > > > > > > Let's test various parts of the rate-related clock API with= the kunit > > > > > > > > testing framework. > > > > > > > > > > > > > > > > Cc: kunit-dev@googlegroups.com > > > > > > > > Suggested-by: Stephen Boyd > > > > > > > > Signed-off-by: Maxime Ripard > > > > > > > > > > > > > > Tested-by: Daniel Latypov > > > > > > > > > > > > > > Looks good to me on the KUnit side. > > > > > > > Two small nits below. > > > > > > > > > > > > > > FYI, I computed the incremental coverage for this series, i.e= =2E: > > > > > > > 1) applied the full series > > > > > > > 2) computed the absolute coverage > > > > > > > > > > > > > > $ ./tools/testing/kunit/kunit.py run --kunitconfig=3Ddriver= s/clk > > > > > > > --make_options=3DCC=3D/usr/bin/gcc-6 --kconfig_add=3DCONFIG_D= EBUG_KERNEL=3Dy > > > > > > > --kconfig_add=3DCONFIG_DEBUG_INFO=3Dy --kconfig_add=3DCONFIG_= GCOV=3Dy > > > > > > > > > > > > I built a docker container based on ubuntu 18.04 to have gcc6 a= nd > > > > > > python3.7, but this doesn't seem to be working, I'm not entirel= y sure why: > > > > > > > > > > > > [13:11:22] Configuring KUnit Kernel ... > > > > > > Regenerating .config ... > > > > > > Populating config with: > > > > > > $ make ARCH=3Dum olddefconfig CC=3D/usr/bin/gcc-6 O=3D.kunit > > > > > > ERROR:root:Not all Kconfig options selected in kunitconfig were= in the generated .config. > > > > > > This is probably due to unsatisfied dependencies. > > > > > > Missing: CONFIG_DEBUG_INFO=3Dy, CONFIG_GCOV=3Dy > > > > > > Note: many Kconfig options aren't available on UML. You can try= running on a different architecture with something like "--arch=3Dx86_64". > > > > > > > > > > Did you perhaps drop CONFIG_DEBUG_KERNEL=3Dy? > > > > > Need to add 3 config options in total for coverage. > > > > > > > > > > If I tweak the command I ran above but drop CONFIG_DEBUG_KERNEL= =3Dy, I > > > > > get the error message you get: > > > > > > > > > > $ ./tools/testing/kunit/kunit.py run --kunitconfig=3Ddrivers/clk > > > > > --make_options=3DCC=3D/usr/bin/gcc-6 --kconfig_add=3DCONFIG_DEBU= G_INFO=3Dy > > > > > --kconfig_add=3DCONFIG_GCOV=3Dy > > > > > ... > > > > > Missing: CONFIG_DEBUG_INFO=3Dy, CONFIG_GCOV=3Dy > > > > > Note: many Kconfig options aren't available on UML. You can try > > > > > running on a different architecture with something like > > > > > "--arch=3Dx86_64". > > > > > > > > It looks to me that it's more that DEBUG_INFO isn't enabled. > > > > > > Sorry for the very delayed response. > > > I was largely getting internet over mobile data around when this email > > > came in and didn't want to try and download docker images over that. > > > > > > It looks like that there was another change that is now merged into > > > Linus' tree that causes this. > > > > > > I found that adding this helped (thanks David Gow) > > > --kconfig_add=3DDEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT > > > > > > Running against --kunitconfig=3Dlib/kunit, my final coverage result is > > > > > > Overall coverage rate: > > > lines......: 13.6% (18004 of 132055 lines) > > > functions..: 15.7% (1885 of 12010 functions) > > > > > > Can you give that a shot and see if it works? > > > > It does fix the configuration issue, but I'm not able to run the tests = either: > > > > [07:53:51] Configuring KUnit Kernel ... > > Generating .config ... > > Populating config with: > > $ make ARCH=3Dum olddefconfig O=3D/home/max/out > > [07:53:53] Building KUnit Kernel ... > > Populating config with: > > $ make ARCH=3Dum olddefconfig O=3D/home/max/out > > Building with: > > $ make ARCH=3Dum --jobs=3D16 O=3D/home/max/out > > [07:54:09] Starting KUnit Kernel (1/1)... > > [07:54:09] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > [07:54:09] [ERROR] Test : invalid KTAP input! > > [07:54:09] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > [07:54:09] Testing complete. Passed: 0, Failed: 0, Crashed: 0, Skipped:= 0, Errors: 1 > > [07:54:09] Elapsed time: 18.486s total, 2.430s configuring, 16.052s bui= lding, 0.003s running > > > > > > I've tried to remove all the coverage from the equation, and I get the > > same issue if I only run kunit run from inside the container, but it > > works fine outside. So I guess it's my setup that is broken. Is there > > some way to debug what could be going wrong there? >=20 > kunit.py is failing to find any test results from the raw kernel dmesg ou= tput. > That is stored in $BUILD_DIR/test.log, so /home/max/out/test.log. > (You can also have kunit.py print this out instead with `kunit.py run > --raw_output`) I was missing CAP_SYS_PTRACE in my container, once set it works just fine, = thanks! Maxime --5aqkn42tnytjzo3t Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYkQKGwAKCRDj7w1vZxhR xalnAQDLCFH/jwiz+d0mTWiFed6WrWnYt1WIDnHqnDcNVYbUzAD8DI2jotVCaR4G 4VMUybjRp0EOAVbe1a6LgCgSN2AppAs= =1tCJ -----END PGP SIGNATURE----- --5aqkn42tnytjzo3t--