From patchwork Tue Feb 6 13:16:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13547243 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4EFB812FF91 for ; Tue, 6 Feb 2024 13:17:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707225427; cv=none; b=Y+TA0Ap9m6NiwGDqsvTxtE5QSDC8NI8VTcI9O4x+YEo7uyotWpmFibbx3gIbr4/AzeTb/OJcQFbch9aJWsCQS6WktvzX+qeZ5MrbxI/feJvSDpYAoyv2PjXuWB+8K95wkOv1CQMbrFX+EJHgIwVvdQsrEsEPFjgi/6qfegA56mQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707225427; c=relaxed/simple; bh=Cz7Vnm/V1Q76FHuq87QRBY8MfWmhKX8yFZHCQ2vvOlI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ni1W0PrqYxqBgmhz5onyA8bHkUZMGoQR6sT5wkPnkawatPub9ecuIaeSAbeN0P9Jl6nwyxXhDLMX1PF6/vjh0zYZCMAxtqktvJv6fJvsV54QWjM4FCHwTryuRKOvouGqhOLDtIJqFOvzOuMmVUB04RwghUWxPS4UZO801Fg1obU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 85627221A7; Tue, 6 Feb 2024 13:17:04 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 6705F132DD; Tue, 6 Feb 2024 13:17:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id eil7F1AxwmVxOgAAD6G6ig (envelope-from ); Tue, 06 Feb 2024 13:17:04 +0000 From: Daniel Wagner To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, Daniel Wagner Subject: [PATCH blktests v1 1/5] nvme/029: fix local variable declarations Date: Tue, 6 Feb 2024 14:16:51 +0100 Message-ID: <20240206131655.32050-2-dwagner@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240206131655.32050-1-dwagner@suse.de> References: <20240206131655.32050-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 85627221A7 X-Spam-Flag: NO The syntax for local variables declarations uses whitespace as separator and not commas: tests/nvme/029: line 24: local: `bs,': not a valid identifier tests/nvme/029: line 24: local: `size,': not a valid identifier tests/nvme/029: line 24: local: `img,': not a valid identifier Signed-off-by: Daniel Wagner Reviewed-by: Chaitanya Kulkarni --- tests/nvme/029 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/nvme/029 b/tests/nvme/029 index caed0f7ec476..db6e8b91f707 100755 --- a/tests/nvme/029 +++ b/tests/nvme/029 @@ -21,7 +21,7 @@ test_user_io() local disk="$1" local start=$2 local cnt=$3 - local bs, size, img, img1 + local bs size img img1 bs="$(blockdev --getss "$disk")" size=$((cnt * bs)) From patchwork Tue Feb 6 13:16:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13547244 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E9D13130E4F for ; Tue, 6 Feb 2024 13:17:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707225428; cv=none; b=mpKqWvY3OFmS12l18dtfVcM5Yh9/EArQPQrz5JHA0B29PDH26uDbLX6sIiy0+AB40HoojaSs88PgTPrfZGTaFI63xYlmN2ydp7ChuzbQ15FoUjbQnNR6zn8H6rpwCYfi6J5Pvxkl/TO8PGClGJ00tKSulPpV5UHO43JXyJD+m5I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707225428; c=relaxed/simple; bh=tUOB6wqH7Ru5G0CZVs6zIUs+NNYQNuvjg12ci17Koeo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=llderLjjnYjdeiCLVjWrB2wbxnqcONcfcvagXw3aLwMjwZz2b/j3+tbMz7yArFAcDXVxwT33E00YNu0195bFLwI8k0d+L8aVZRfjC1ZhsNQTw/ofxXayoPpFay/9BmWzeAjJUdMzDF6CNOFVkOQvUdYKrtMiaLr6+rHU1kxlrU4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=voXOhrLp; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=/U8FEUyl; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=voXOhrLp; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=/U8FEUyl; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="voXOhrLp"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="/U8FEUyl"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="voXOhrLp"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="/U8FEUyl" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 380F51F385; Tue, 6 Feb 2024 13:17:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1707225425; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iMcT+pci9fKU96u1P4Z6cSU9WUkUsvXausIPa2n6xGI=; b=voXOhrLpyCMvH+katTJ7JXo91KMWauGNPnOmSMaLqsxGFd7pMZrdcDX7LnqF2p5i6jXPwe wOoFPPUPfm2wMJlWxtUa+kfmXwXCR7rvKaic6O1HWnDIcF8mOu3eAENVS70vjjM9OMum1D R8b/r4rCYC0V58d30dDxK8zLH9FB7UQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1707225425; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iMcT+pci9fKU96u1P4Z6cSU9WUkUsvXausIPa2n6xGI=; b=/U8FEUylyR/YKVllKObbSeMW1vjM2+ZqrRyI7Ap1cEoRqLf5Cw7Ydssujii55wAoL8sHS5 IwdvLU48pTSUw0AQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1707225425; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iMcT+pci9fKU96u1P4Z6cSU9WUkUsvXausIPa2n6xGI=; b=voXOhrLpyCMvH+katTJ7JXo91KMWauGNPnOmSMaLqsxGFd7pMZrdcDX7LnqF2p5i6jXPwe wOoFPPUPfm2wMJlWxtUa+kfmXwXCR7rvKaic6O1HWnDIcF8mOu3eAENVS70vjjM9OMum1D R8b/r4rCYC0V58d30dDxK8zLH9FB7UQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1707225425; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iMcT+pci9fKU96u1P4Z6cSU9WUkUsvXausIPa2n6xGI=; b=/U8FEUylyR/YKVllKObbSeMW1vjM2+ZqrRyI7Ap1cEoRqLf5Cw7Ydssujii55wAoL8sHS5 IwdvLU48pTSUw0AQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 18D8E132DD; Tue, 6 Feb 2024 13:17:05 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id gWZoBFExwmV0OgAAD6G6ig (envelope-from ); Tue, 06 Feb 2024 13:17:05 +0000 From: Daniel Wagner To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, Daniel Wagner Subject: [PATCH blktests v1 2/5] nvme/rc: filter out errors from cat when reading files Date: Tue, 6 Feb 2024 14:16:52 +0100 Message-ID: <20240206131655.32050-3-dwagner@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240206131655.32050-1-dwagner@suse.de> References: <20240206131655.32050-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out2.suse.de; none X-Spamd-Result: default: False [0.87 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.03)[56.89%] X-Spam-Level: X-Spam-Flag: NO X-Spam-Score: 0.87 When running the tests with FC as transport and the udev auto connect enabled, discovery controllers are created and destroys while the tests are running. This races with the cleanup code and also the _find_nvme_dev() which iterates over all device entries and tries to read the connect of transport and subsysnqn sysfs attributes. Since these steps are not locked in anyway, the resources can go away in between. Thus filter out 'cat' reporting non existing subsysnqn or transport attributes. The tests will still fail if they can't fine the device etc. But without filtering these errors out the tests fail randomly. Signed-off-by: Daniel Wagner --- tests/nvme/rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/nvme/rc b/tests/nvme/rc index e0461f1cd53a..9cc83afe0668 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -350,7 +350,7 @@ _cleanup_nvmet() { for dev in /sys/class/nvme/nvme*; do dev="$(basename "$dev")" - transport="$(cat "/sys/class/nvme/${dev}/transport")" + transport="$(cat "/sys/class/nvme/${dev}/transport" 2>/dev/null)" if [[ "$transport" == "${nvme_trtype}" ]]; then echo "WARNING: Test did not clean up ${nvme_trtype} device: ${dev}" _nvme_disconnect_ctrl "${dev}" @@ -840,7 +840,7 @@ _find_nvme_dev() { for dev in /sys/class/nvme/nvme*; do [ -e "$dev" ] || continue dev="$(basename "$dev")" - subsysnqn="$(cat "/sys/class/nvme/${dev}/subsysnqn")" + subsysnqn="$(cat "/sys/class/nvme/${dev}/subsysnqn" 2>/dev/null)" if [[ "$subsysnqn" == "$subsys" ]]; then echo "$dev" fi From patchwork Tue Feb 6 13:16:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13547245 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B25C130ACB for ; Tue, 6 Feb 2024 13:17:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707225429; cv=none; b=KL/1GB7S5P6fLvHsc8qxTPnIKWRpGGdLXCLNxFjyae/YVhilcbVrb2B90BoQtEL3tZ+8/X4O0bs3uDNadCdjtfRqF9XKNlMfrIS/41Dr3BP9IdMMR6WzwC9Kqxq4ewRS4khymRTzEC17e59WlI8q+Ke21HwOT0Hxb23WDakiCPY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707225429; c=relaxed/simple; bh=QEI6CCAK6WlBbQ19G4HxQ/wmiiapINcpvN/wqAwnMd0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bayBL3jaohqr3Uf7Ka1aCliysx1Pjop/mxIAd4CkQE4d8b/yv4J7k4rX0UAS7bWhPHp5KmIU0NemA/rGRowVrk064czPmNoWlSZJeTAuII3/zIqdfIfgn+0EzR0tK+NsfPVmOzkFWuCBA2DvciCWDiNqr4Y+xhJt8118i42qgkg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=0B1n+p6r; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Hfg5g6eo; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=0B1n+p6r; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Hfg5g6eo; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="0B1n+p6r"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Hfg5g6eo"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="0B1n+p6r"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Hfg5g6eo" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id C8D95221B6; Tue, 6 Feb 2024 13:17:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1707225425; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dHaPxclIhI0hjj2FtR7xauVb1lby62iOVX7RO+KLhA0=; b=0B1n+p6r6cirVgvHxUj/0XZ6kGCfWe5q2s6A8+RrNq17J0enXkh1isctzOBM/5hz07zP2z 2/FILAeWqrMDPdEh0UcMVbZ9lW776qr0UoOkggPNSciKXvlrLcGTqEY/sIC5odWCiZqOLH SWf5fMqP2M685q0fDtsyGu57vlYsNTA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1707225425; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dHaPxclIhI0hjj2FtR7xauVb1lby62iOVX7RO+KLhA0=; b=Hfg5g6eomPTIU3ayWFG1irg3it7FEzUBy/CwG2JNvxNrxIBC+/dAArFl6mw1Tm7UPpJcLD RQBzptaL738eAhCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1707225425; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dHaPxclIhI0hjj2FtR7xauVb1lby62iOVX7RO+KLhA0=; b=0B1n+p6r6cirVgvHxUj/0XZ6kGCfWe5q2s6A8+RrNq17J0enXkh1isctzOBM/5hz07zP2z 2/FILAeWqrMDPdEh0UcMVbZ9lW776qr0UoOkggPNSciKXvlrLcGTqEY/sIC5odWCiZqOLH SWf5fMqP2M685q0fDtsyGu57vlYsNTA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1707225425; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dHaPxclIhI0hjj2FtR7xauVb1lby62iOVX7RO+KLhA0=; b=Hfg5g6eomPTIU3ayWFG1irg3it7FEzUBy/CwG2JNvxNrxIBC+/dAArFl6mw1Tm7UPpJcLD RQBzptaL738eAhCA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id B628E132DD; Tue, 6 Feb 2024 13:17:05 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 9G4TK1ExwmV2OgAAD6G6ig (envelope-from ); Tue, 06 Feb 2024 13:17:05 +0000 From: Daniel Wagner To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, Daniel Wagner Subject: [PATCH blktests v1 3/5] nvme/rc: do not issue warnings on cleanup when using fc transport Date: Tue, 6 Feb 2024 14:16:53 +0100 Message-ID: <20240206131655.32050-4-dwagner@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240206131655.32050-1-dwagner@suse.de> References: <20240206131655.32050-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -0.30 X-Spamd-Result: default: False [-0.30 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.00)[38.44%] X-Spam-Flag: NO When running the tests with FC as transport and the udev auto connect enabled, discovery controllers are created and destroys while the tests are running. The cleanup code expects that all devices are under blktetsts control, but this isn't the case. So just disable the warning as it is reporting a lot of false positives. Signed-off-by: Daniel Wagner --- tests/nvme/rc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/nvme/rc b/tests/nvme/rc index 9cc83afe0668..ca6a284a1e25 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -352,7 +352,10 @@ _cleanup_nvmet() { dev="$(basename "$dev")" transport="$(cat "/sys/class/nvme/${dev}/transport" 2>/dev/null)" if [[ "$transport" == "${nvme_trtype}" ]]; then - echo "WARNING: Test did not clean up ${nvme_trtype} device: ${dev}" + # if udev auto connect is enabled for FC we get false positives + if [[ "$transport" != "fc" ]]; then + echo "WARNING: Test did not clean up ${nvme_trtype} device: ${dev}" + fi _nvme_disconnect_ctrl "${dev}" fi done From patchwork Tue Feb 6 13:16:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13547246 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38B9412FF91 for ; Tue, 6 Feb 2024 13:17:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707225429; cv=none; b=r1sT/+bTZWrLUUZCD9FUstV+k021LsyYRLzdrowuXcVH1qMAUoWLIUry3PN3OVEfIcACzweV11dm4tz7eqmUoQWFigoTUzvMTzlQSM0thlVB7AGHD1uNUOuLIcpGJ6embWY9VeQ4GvipEQmoF8DNEwO83dteqFSAgFs7wNnStmQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707225429; c=relaxed/simple; bh=zk+h+FPK8JpczcZ1evk8bYqROUtN7vA0wsCRxuD+5Y8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Z9mcuY9PodXusOpsVS+Scn28QFSOHeQObxWdnJ8xFk/B/a7r7vz6SatmyhLEAGhOaKVaXvXg+KrtXRNKFbewTry9UhWN64/Cg2Toga2PDf49EDr/t7rW1ut+Fj89Ch3MZUzvLK77e48WugLtpcjIxA6dFT7e2P95849BDvVsSSw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=XJIT8AcE; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=wIL9t65s; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=XJIT8AcE; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=wIL9t65s; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="XJIT8AcE"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="wIL9t65s"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="XJIT8AcE"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="wIL9t65s" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 706B31F8B2; Tue, 6 Feb 2024 13:17:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1707225426; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MGE813DC4wgn02v3l+3zDYwYzJaXSH1sngaH71ya6uo=; b=XJIT8AcEsblh2XfQiuffEcytISHeWW8550YsO4tTbzPQFL5N/DpclBPvyO9SjZmraE+Jc7 uvBnCEd1616RQA2hfrhF6mEPUIpVoC0FfZuKK5s4L9tL5Rc5hE/B4RLTKlmcEGuvVEe4Gb 7dGK8sRfjjdZ4NMYXeRzBr3Fwk7g3Hs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1707225426; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MGE813DC4wgn02v3l+3zDYwYzJaXSH1sngaH71ya6uo=; b=wIL9t65svwznXEYuvcRenRwmoompwG/hhng9wo2tGcRloJBiIRk36BSJNidhcYz5AeMn3+ tCHu1jPOhkfH1eBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1707225426; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MGE813DC4wgn02v3l+3zDYwYzJaXSH1sngaH71ya6uo=; b=XJIT8AcEsblh2XfQiuffEcytISHeWW8550YsO4tTbzPQFL5N/DpclBPvyO9SjZmraE+Jc7 uvBnCEd1616RQA2hfrhF6mEPUIpVoC0FfZuKK5s4L9tL5Rc5hE/B4RLTKlmcEGuvVEe4Gb 7dGK8sRfjjdZ4NMYXeRzBr3Fwk7g3Hs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1707225426; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MGE813DC4wgn02v3l+3zDYwYzJaXSH1sngaH71ya6uo=; b=wIL9t65svwznXEYuvcRenRwmoompwG/hhng9wo2tGcRloJBiIRk36BSJNidhcYz5AeMn3+ tCHu1jPOhkfH1eBw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 5C4DE132DD; Tue, 6 Feb 2024 13:17:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id E6UZFVIxwmV5OgAAD6G6ig (envelope-from ); Tue, 06 Feb 2024 13:17:06 +0000 From: Daniel Wagner To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, Daniel Wagner Subject: [PATCH blktests v1 4/5] nvme/rc: do not issue errors when disconnecting when using fc transport Date: Tue, 6 Feb 2024 14:16:54 +0100 Message-ID: <20240206131655.32050-5-dwagner@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240206131655.32050-1-dwagner@suse.de> References: <20240206131655.32050-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: X-Spam-Score: -0.35 X-Spamd-Result: default: False [-0.35 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.05)[60.12%] X-Spam-Flag: NO When running the tests with FC as transport and the udev auto connect enabled, discovery controllers are created and destroys while the tests are running. The cleanup code expects that all devices are under blktetsts control, but this isn't the case. Thus filter out disconnect failures as well. Signed-off-by: Daniel Wagner --- tests/nvme/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/nvme/rc b/tests/nvme/rc index ca6a284a1e25..cdfc738d3aec 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -356,7 +356,7 @@ _cleanup_nvmet() { if [[ "$transport" != "fc" ]]; then echo "WARNING: Test did not clean up ${nvme_trtype} device: ${dev}" fi - _nvme_disconnect_ctrl "${dev}" + _nvme_disconnect_ctrl "${dev}" 2>/dev/null fi done From patchwork Tue Feb 6 13:16:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13547247 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A9FBD131728 for ; Tue, 6 Feb 2024 13:17:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707225430; cv=none; b=ukpxuC7cKiY3i53FgPUGASQnV9uFflJS+VUniAHwFrAeAksU1U9dhqUlXxW3sGWLvrDZbRRT037bWeL5GkuZyGOYe6bilu34U312Xosye2vMRgVaVmgZz4frMMeQQ7fmBU21kYv27FT9atgm0UxZEhAlacP7OKVp1C5pZ9Tv/M0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707225430; c=relaxed/simple; bh=Iwuw2bsU5Vl8of4cz/mFZ1LrqPqa7fv+hRNeZCfx9oE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=g8gat58F+mxk5C6f01uSGM/Wfm8HbT4kkxGPxwTEhxXP063SzIRwU3xXSdA1RrnH0iloT3y7daOePSgk0a0oU1P2opqxa/CIYPfrF5IqC5vhEe3GwfG76fluVuX5U07egiNbTaBInoWVnA2u2U5m+uN2SBxOtqmVUUx0Pg0QsA8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 19D7A221B2; Tue, 6 Feb 2024 13:17:07 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 034A4132DD; Tue, 6 Feb 2024 13:17:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id XGf+OlIxwmV7OgAAD6G6ig (envelope-from ); Tue, 06 Feb 2024 13:17:06 +0000 From: Daniel Wagner To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, Daniel Wagner Subject: [PATCH blktests v1 5/5] nvme/rc: revert nvme-cli context tracking Date: Tue, 6 Feb 2024 14:16:55 +0100 Message-ID: <20240206131655.32050-6-dwagner@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240206131655.32050-1-dwagner@suse.de> References: <20240206131655.32050-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 19D7A221B2 X-Spam-Flag: NO This feature is not needed anymore, after fixing nvmet-fc. The nvmet target code is able to handle parallel operations and doesn't crash anymore. Furthermore, it can't prevent from discovery controller created by the udev rules, so let's rip it out. Signed-off-by: Daniel Wagner Reviewed-by: Chaitanya Kulkarni --- tests/nvme/rc | 62 --------------------------------------------------- 1 file changed, 62 deletions(-) diff --git a/tests/nvme/rc b/tests/nvme/rc index cdfc738d3aec..dfc4c1ef1975 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -189,57 +189,6 @@ _nvme_calc_rand_io_size() { echo "${io_size_kb}k" } -_have_nvme_cli_context() { - # ignore all non-fc transports for now - if [[ "${nvme_trtype}" != "fc" ]] || - ! nvme connect --help 2>&1 | grep -q -- '--context=' > /dev/null; then - return 1 - fi - return 0 -} - -_setup_nvme_cli() { - local local_wwnn="${1}" - local local_wwpn="${2}" - local remote_wwnn="${3}" - local remote_wwpn="${4}" - - if ! _have_nvme_cli_context; then - return - fi - - mkdir -p /run/nvme - cat >> /run/nvme/blktests.json <<-EOF - [ - { - "hostnqn": "${def_hostnqn}", - "hostid": "${def_hostid}", - "subsystems": [ - { - "application": "blktests", - "nqn": "blktests-subsystem-1", - "ports": [ - { - "transport": "fc", - "traddr": "nn-${remote_wwnn}:pn-${remote_wwpn}", - "host_traddr": "nn-${local_wwnn}:pn-${local_wwpn}" - } - ] - } - ] - } - ] - EOF -} - -_cleanup_nvme_cli() { - if ! _have_nvme_cli_context; then - return - fi - - rm -f /run/nvme/blktests.json -} - _nvme_fcloop_add_rport() { local local_wwnn="$1" local local_wwpn="$2" @@ -272,9 +221,6 @@ _setup_fcloop() { local remote_wwnn="${3:-$def_remote_wwnn}" local remote_wwpn="${4:-$def_remote_wwpn}" - _setup_nvme_cli "${local_wwnn}" "${local_wwpn}" \ - "${remote_wwnn}" "${remote_wwpn}" - _nvme_fcloop_add_tport "${remote_wwnn}" "${remote_wwpn}" _nvme_fcloop_add_lport "${local_wwnn}" "${local_wwpn}" _nvme_fcloop_add_rport "${local_wwnn}" "${local_wwpn}" \ @@ -317,8 +263,6 @@ _cleanup_fcloop() { _nvme_fcloop_del_lport "${local_wwnn}" "${local_wwpn}" _nvme_fcloop_del_rport "${local_wwnn}" "${local_wwpn}" \ "${remote_wwnn}" "${remote_wwpn}" - - _cleanup_nvme_cli } _cleanup_blkdev() { @@ -544,9 +488,6 @@ _nvme_connect_subsys() { subsysnqn="$2" ARGS=(-t "${trtype}" -n "${subsysnqn}") - if _have_nvme_cli_context; then - ARGS+=(--context="blktests") - fi if [[ "${trtype}" == "fc" ]] ; then ARGS+=(-a "${traddr}" -w "${host_traddr}") elif [[ "${trtype}" != "loop" ]]; then @@ -618,9 +559,6 @@ _nvme_discover() { ARGS=(-t "${trtype}") ARGS+=(--hostnqn="${def_hostnqn}") ARGS+=(--hostid="${def_hostid}") - if _have_nvme_cli_context; then - ARGS+=(--context="blktests") - fi if [[ "${trtype}" = "fc" ]]; then ARGS+=(-a "${traddr}" -w "${host_traddr}") elif [[ "${trtype}" != "loop" ]]; then