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 6522DC61DA3 for ; Tue, 21 Feb 2023 18:35:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229615AbjBUSfq (ORCPT ); Tue, 21 Feb 2023 13:35:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229540AbjBUSfp (ORCPT ); Tue, 21 Feb 2023 13:35:45 -0500 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0BB92E80D for ; Tue, 21 Feb 2023 10:35:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677004500; x=1708540500; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=W2DgoNIBqTUdR7cgxM9iP9YdGTsBiPVZAd1W8LNrPWw=; b=b6lqc7FwhNsqdZwL4uMjUwAt9DiBayj/9YWkZcyhL71GmL8XGnPGY/8Y SfhLF1zN7tnMQn3UFCJGwwdRm3tGNKfHqgo5APvwb5zegvqg3DTRmIZyk iH/Vgz+uhdnqeHDDwLjUjVzJVUOoIbVPcAsYHSs1/7e4eWzwWXBnLodaz kMwPe/kiinf0sJXKuRk4Ze7M2TgBenp2NXUHMQ9kEb39AvT9KZDtb9MQL uvy+KBBmjRhy8Rtj8xAEIBnmTKC/Y47yel6m098f5FoCzrpwJSFsxIJZo RePPT+9duP68pi2+pohzsB3LlV/5u4O7OlHcdroIVqbvWdIYh/0+MuQ2m g==; X-IronPort-AV: E=McAfee;i="6500,9779,10628"; a="330440256" X-IronPort-AV: E=Sophos;i="5.97,315,1669104000"; d="scan'208";a="330440256" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Feb 2023 10:34:02 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10628"; a="814606621" X-IronPort-AV: E=Sophos;i="5.97,315,1669104000"; d="scan'208";a="814606621" Received: from aschofie-mobl2.amr.corp.intel.com (HELO aschofie-mobl2) ([10.251.28.85]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Feb 2023 10:34:02 -0800 Date: Tue, 21 Feb 2023 10:34:00 -0800 From: Alison Schofield To: "Verma, Vishal L" Cc: "Williams, Dan J" , "Jiang, Dave" , "linux-cxl@vger.kernel.org" , "nvdimm@lists.linux.dev" Subject: Re: [PATCH ndctl 3/3] test/cxl-security.sh: avoid intermittent failures due to sasync probe Message-ID: References: <20230217-coverity-fixes-v1-0-043fac896a40@intel.com> <20230217-coverity-fixes-v1-3-043fac896a40@intel.com> <427fbc8d0cf56b9cbdfb7f5bef31a96c4b40fe31.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <427fbc8d0cf56b9cbdfb7f5bef31a96c4b40fe31.camel@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org On Tue, Feb 21, 2023 at 10:13:16AM -0800, Vishal Verma wrote: > On Tue, 2023-02-21 at 09:22 -0800, Alison Schofield wrote: > > On Fri, Feb 17, 2023 at 05:40:24PM -0700, Vishal Verma wrote: > > > This test failed intermittently because the ndctl-list operation right > > > after a 'modprobe cxl_test' could race the actual nmem devices getting > > > loaded. > > > > > > Since CXL device probes are asynchronous, and cxl_acpi might've kicked > > > off a cxl_bus_rescan(), a cxl_flush() (via cxl_wait_probe()) can ensure > > > everything is loaded. > > > > > > Add a plain cxl-list right after the modprobe to allow for a flush/wait > > > cycle. > > > > Is this the preferred method to 'settle', instead of udevadm settle? > > Generally, no. Usually cxl tests would use cxl-cli commands, which now > have the necessary waits via cxl_wait_probe(), so even a 'udevadm > settle' shouldn't be needed. > > In this case, the first thing we run is ndctl list, which waits for > nvdimm things to 'settle', but we were racing with cxl_test coming up, > which it (ndctl) knows nothing about. OK - I'll stop doing the udevadm settle, since what I'm doing is pure 'cxl' and modprobe is always followed by cxl-cli commands. > > > > > > > > > Cc: Dave Jiang > > > Suggested-by: Dan Williams > > > Signed-off-by: Vishal Verma > > > --- > > > test/security.sh | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/test/security.sh b/test/security.sh > > > index 04f630e..fb04aa6 100755 > > > --- a/test/security.sh > > > +++ b/test/security.sh > > > @@ -225,6 +225,7 @@ if [ "$uid" -ne 0 ]; then > > > fi > > > > > > modprobe "$KMOD_TEST" > > > +cxl list > > > setup > > > check_prereq "keyctl" > > > rc=1 > > > > > > -- > > > 2.39.1 > > > > > > >