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 05AC2C433EF for ; Fri, 11 Feb 2022 16:31:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245006AbiBKQbu (ORCPT ); Fri, 11 Feb 2022 11:31:50 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:35388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351545AbiBKQbt (ORCPT ); Fri, 11 Feb 2022 11:31:49 -0500 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89618CCD for ; Fri, 11 Feb 2022 08:31:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644597108; x=1676133108; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=5ooxdsiAJhFzkbvf3X/hwmQQoIcHZqssXqLEPbjTxy8=; b=hZLzUAvkdeU91dxIxuBZ99e0YvNRJlwdxHU7xQ2bZt7VRyWCrBM3JMUr mSg+dotSoIaRma29uVEhBSSWAYqnAQLyTBLaVZYaoxhjWYOE626v4wr53 1TC10+AdfBex4V/ZX7rVo0b91vhMkr/B5OIhiZvFE5nbFZavXkBM+TqBt Qu6npHNBDDGnncw17IbHbuvmEDSXSidhnqgA3Qd1XtQkZ7mxy2yUYWd5f Xl5ATcOHyU0SS1BF+lGiQcicSkObIBnWShIMzwX59+8uzTtID9/RS3BtE zzUJv6eCMuOw6FpM6ArZfl/K8EV0rCA5918HaUgrSt0LC3XNJCz/1i1VC w==; X-IronPort-AV: E=McAfee;i="6200,9189,10255"; a="249510068" X-IronPort-AV: E=Sophos;i="5.88,361,1635231600"; d="scan'208";a="249510068" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Feb 2022 08:31:31 -0800 X-IronPort-AV: E=Sophos;i="5.88,361,1635231600"; d="scan'208";a="623262525" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.162]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Feb 2022 08:31:28 -0800 Received: by lahna (sSMTP sendmail emulation); Fri, 11 Feb 2022 18:31:26 +0200 Date: Fri, 11 Feb 2022 18:31:26 +0200 From: Mika Westerberg To: Ricardo Ribalda Cc: kunit-dev@googlegroups.com, kasan-dev@googlegroups.com, linux-kselftest@vger.kernel.org, Brendan Higgins , Daniel Latypov Subject: Re: [PATCH v5 3/6] thunderbolt: test: use NULL macros Message-ID: References: <20220211094133.265066-1-ribalda@chromium.org> <20220211094133.265066-3-ribalda@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On Fri, Feb 11, 2022 at 06:26:56PM +0200, Mika Westerberg wrote: > > To test it I had enabled: > > PCI, USB4 and USB4_KUNIT_TEST > > > > and then run it with > > > > ./tools/testing/kunit/kunit.py run --jobs=$(nproc) --arch=x86_64 > > > > Unfortunately, kunit was not able to run the tests > > > > This hack did the trick: > > > > > > int tb_test_init(void) > > { > > - return __kunit_test_suites_init(tb_test_suites); > > + //return __kunit_test_suites_init(tb_test_suites); > > + return 0; > > } > > > > void tb_test_exit(void) > > { > > - return __kunit_test_suites_exit(tb_test_suites); > > + //return __kunit_test_suites_exit(tb_test_suites); > > } > > + > > +kunit_test_suites(&tb_test_suite); > > > > I looked into why we do this and I found: > > > > thunderbolt: Allow KUnit tests to be built also when CONFIG_USB4=m > > > > > > I am a bit confused. The patch talks about build coverage, but even > > with that patch reverted if > > USB4_KUNIT_TEST=m > > then test.c is built. > > > > Shouldn't we simply revert that patch? > > Nah, either build it into the kernel or load the driver manually: > > # modprobe thunderbolt Forgot to explain why this does not run the tests (I think): ./tools/testing/kunit/kunit.py run --jobs=$(nproc) --arch=x86_64 The driver depends on PCI and I don't think that's enabled on UML at least. I typically run it inside QEMU.