Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp18921877rwd; Wed, 28 Jun 2023 02:31:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5vTfr8/N3+ms4A212pJNDM4NuEv5viuhVSaAhWya+0FcppByS2D8DydgIC3hvxHdpH0eyi X-Received: by 2002:a17:906:8445:b0:991:e5a5:cd4b with SMTP id e5-20020a170906844500b00991e5a5cd4bmr4350367ejy.56.1687944696512; Wed, 28 Jun 2023 02:31:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687944696; cv=none; d=google.com; s=arc-20160816; b=F1+PWcDj2zqkubc7G1mW7nS+VoL9bxx14OqBHsLwcU7ru+I89hqWW6eeqeVuvawPZc wWOVBCb+0VNtY159f4ek3JAljWDnZ5cCxjLWw+slkgr1jPqnlbV8W2nQuEBFARBYVgSS 4ryWfvRNjioTSegB+4QbQjbv9wHpvbuPExW7GdcgKPdyN0JxevjsoURl2jDJUbekbdzO xPETzGcpI39imVJRq9unL7SHrthFRR3YS69Oww8LO2Urrpc1VfKD/1yES5nSlIUfQ2Zi H4Aqr4Sd9Tm0a0ib3O/aQ10BiFt2IRZBm5wzCCy6N8L8qPjSXJpcUAwBSWfKO1c8hxfI zdMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=pb1MWnUMmUFEexxqK5EEY1JTSgmlRyHzP6MrqQFpEXU=; fh=zO20AqYeDi5heoypvx0091+AwtaHLQOP8tFjZ5U6IXo=; b=oiK2hxZCOKz6o29qaB9NSZvD4j6CaYy3H59Y20AhA42KUBlNNhOtGNPtuJmxVmyHyB rqQxcsiPt+goX1ibdZ3CNrBrZ9EHOnUI22uzW18y9I4c4eXBAXoFZLwItEAI7jPV8Ref AsPk+FlgZ1HOHQtQtOrviuUOUaQN90oqCt8aFE78K6LjOLZ9ulA0OiW9BikFjJbUzAKf iVVmgriBLEf6r5+ez82M5qmCjcG8rda/28wbUWPtMdOMlxd6Tp3B7+PjiUFAmGt0/S5d 953cYfWMfxJ9WScUBdynTjm47g4T5yGPLD/9CuGCaX90tFfO53e+Vbvzh/ZhrqiD9w87 Khdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=YaYej1+R; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j26-20020a170906411a00b0098dfdc3f2d7si5100149ejk.674.2023.06.28.02.31.11; Wed, 28 Jun 2023 02:31:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=YaYej1+R; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235376AbjF1I5u (ORCPT + 99 others); Wed, 28 Jun 2023 04:57:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234405AbjF1InQ (ORCPT ); Wed, 28 Jun 2023 04:43:16 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E162B30C2; Wed, 28 Jun 2023 01:35:30 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id D4FBA21864; Wed, 28 Jun 2023 06:09:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1687932593; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pb1MWnUMmUFEexxqK5EEY1JTSgmlRyHzP6MrqQFpEXU=; b=YaYej1+R30o+dQs1G1sudkf9gCXZ0aUOD8y7MDYkVUrM2fmAol6PYiPYlr8/urWhqNoxuv pOz5DwJ0yjft0n+5PVkUBxNfVdphIqR89aw6bvhctKCYmYBx1HWz5ZSFE4h9FWIt2/1yzn 6TnSC/0XOK77BpGtD0iCczdutNkgAcI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1687932593; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pb1MWnUMmUFEexxqK5EEY1JTSgmlRyHzP6MrqQFpEXU=; b=PUzBZ2/mZv5KJOFaiPsbNDAfkGGcOcY5hMmJO3e1mdDxJDKhWegvRSFRNcN6r6/SYK6dvQ 3EUUToqhETgvzJAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id BF98B138E8; Wed, 28 Jun 2023 06:09:53 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id c9RlLrHOm2QcEgAAMHmgww (envelope-from ); Wed, 28 Jun 2023 06:09:53 +0000 Date: Wed, 28 Jun 2023 08:09:53 +0200 From: Daniel Wagner To: Shinichiro Kawasaki Cc: "linux-nvme@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , Chaitanya Kulkarni , Shin'ichiro Kawasaki , Sagi Grimberg , Hannes Reinecke , James Smart , Martin Belanger Subject: Re: [PATCH blktests v1 2/3] nvme/rc: Avoid triggering host nvme-cli autoconnect Message-ID: References: <20230620132703.20648-1-dwagner@suse.de> <20230620132703.20648-3-dwagner@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 27, 2023 at 10:22:53AM +0000, Shinichiro Kawasaki wrote: > On Jun 20, 2023 / 15:27, Daniel Wagner wrote: > > When the host has enabled the udev/systemd autoconnect services for the > > fc transport it interacts with blktests and make tests break. > > > > nvme-cli learned to ignore connects attemps when using the > > --context command line option paired with a volatile configuration. Thus > > we can mark all the resources created by blktests and avoid any > > interaction with the systemd autoconnect scripts. > > This sounds a good idea. Question, is "--context" option of the nvme command > mandatory to run nvme test with nvme_trtype=fc? If nvme-cli is called without the '--context' option, the command will be executed. Though if '--context' is provided as option and there is a configuration which matches the connect parameters but doesn't match the context it will ignore the operation. The blktests tests expects that nothing behind it's back is fiddling on the setup while it is running. So far udev didn't trigger for rdma/tcp but with fc it will. Thus, it's mandatory to use either the '--context' parameter or alternatively disable the rule with ln -s /etc/udev/rules.d/70-nvmf-autoconnect.rules /dev/null BTW, when the udev rule is active I observed crashes when running blktests. So there is more to fix, though one thing at the time. > Or is it nice-to-have feature > depending on the test system OS? If it is mandatory, it's the better to check > in _nvme_requires. Well, I didn't want to make this a hard requirement for all tests. I guess we could make it for fc only if this is what you had in mind. The question should it only test for nvme-cli supporting --context or should it be really clever and test if the udev rule is also active (no idea how but I assume it is possible)? > > _cleanup_nvmet() { > > @@ -337,6 +383,8 @@ _setup_nvmet() { > > def_host_traddr=$(printf "nn-%s:pn-%s" \ > > "${def_local_wwnn}" \ > > "${def_local_wwpn}") > > + > > + _setup_nvme_cli > > Can we move this _setup_nvme_cli call from _setup_nvmet to _setup_fcloop? > _cleanup_nvme_cli is called in _cleanup_fcloop. I think it is a bit cleaner > since those setup/cleanup functions are called at at same level. Sure, no problem.