Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5928080rwp; Mon, 17 Jul 2023 11:43:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlFCn32yqrb5yibQgodQ/xtkvCT0sKt5H1spqhpPI/wPXrcjU5rCD6sHeeZefmk9XtuN+/l5 X-Received: by 2002:a05:6871:809:b0:1a3:93e:c26f with SMTP id q9-20020a056871080900b001a3093ec26fmr12597407oap.31.1689619402548; Mon, 17 Jul 2023 11:43:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689619402; cv=none; d=google.com; s=arc-20160816; b=n/Zm25Oxjloz8UuZBIgrM2HrpgODLCWGR4EuBco2wg5VYMtAiFbxsfmsXIbAyZoEED DRFmQ51MKOc0m1aejiYm7QA2ZaqiZlguVDk/6iEao4rZd5eB0WmZWL0AiHTT6QecUYNc rggtj7unpx7CAKiMPxBVygnjDUBPgeEO3kIYMIr86eSxnCeAxgm/n3Aie6iw7v/8ma6F IR1Exb8dMi9hbnEtB7BAwDQ4I063y2Qq5NvJPZH7Se0wd3t9ZxcnBclZ4ROg2AZxNC8y 8rTdBpSkxt8OCcBKmw8bB6Z02SaAeX9W5tlT6SXG8zwFXr0zYKg0hee28kdfrCq8JPwI E4QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dYieI0TpcjHv7EBoITS5BW0NLluPPJAn8rJRTkMgIWY=; fh=Ag0RbRk3LxdpQ9OdMLAf8hbnmFe6FOAHRGAvgVTwgEc=; b=uHOnCzmuh0xqify/feXXW+kXaZdqBe2Le4sKllnmFc5dHss8q9Xz3EqwOzvLnCOVpj 2DHybwkNr1y5UolCTHLHdA8374oqb694k7O7RV4r2iLW4d8Z+yK76AVWfBskz83nJT+W u4yTnTakjZjxtrF1YFoaVD1qZkahW3JzD+5MRFTIIVEcUlHHVCWEEVTksK6XTgMC7JdF 4DhOLsZm4d+I4b/bXDDLCABSiPvacT5TsL55/7h06Vs4VLGJhK1qHE+zf3TPXvQQ0ZCm o8eO6A7Gd8rU99AdVa3OWVnmh6++aO7+Oon4mi6IChr2XTxbmaDQRFZ5N2PPVhPC7Lqh wBkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DeWE05oJ; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g66-20020a636b45000000b0055792e57c89si172176pgc.450.2023.07.17.11.43.09; Mon, 17 Jul 2023 11:43:22 -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=@kernel.org header.s=k20201202 header.b=DeWE05oJ; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231402AbjGQSYR (ORCPT + 99 others); Mon, 17 Jul 2023 14:24:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231205AbjGQSYF (ORCPT ); Mon, 17 Jul 2023 14:24:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 893FDBE; Mon, 17 Jul 2023 11:23:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AAE07611FC; Mon, 17 Jul 2023 18:23:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8DB0C433AB; Mon, 17 Jul 2023 18:23:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689618219; bh=gX1dXu9EYUZnvZ5XI2EN0c4A9DLSR057l06Qh4PHOS8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DeWE05oJ5akiFA90dmI3+wYqRNNrHu1XIxW9/qcTx+MAvbrMYGYH8jsEWkgItT2J1 cc1pperxE46mHQN9m6Awa3pVNb1Rpn1sEttmrWQlBJW7FBuJBdqu0glLEqc925SKPY b7PROTQPM2rf1eL28ndMc729DVv4iBoWbHjpDbRzLeXY5be0urr4Z2fmKsPDPB4O99 Jq2IaBCGkKK0IyiefHrl6NvdLd5SK4NcGbT3N3eYFUKCj2qE8G+Nro7aqRy+wAUU+/ 8J11yydYqSRMlDH5A+meA/Z57KnQL2a+JZ6y1xm5ilPfVm335grH/KuIFFfJeD0CUX ZPuZ9/iqAlh2w== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 2FFF3CE093C; Mon, 17 Jul 2023 11:23:39 -0700 (PDT) From: "Paul E. McKenney" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org, "Paul E. McKenney" Subject: [PATCH rcu 08/18] torture: Make kvm-remote print diagnostics on initial ssh failure Date: Mon, 17 Jul 2023 11:23:27 -0700 Message-Id: <20230717182337.1098991-8-paulmck@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Currently, if the initial ssh fails, kvm-remote.sh gives up, printing a message saying so. But it would be nice to get a better idea as to why ssh failed. This commit therefore dumps out ssh's exit code, stdout, and stderr upon ssh failure for diagnostic purposes. Signed-off-by: Paul E. McKenney --- tools/testing/selftests/rcutorture/bin/kvm-remote.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/rcutorture/bin/kvm-remote.sh b/tools/testing/selftests/rcutorture/bin/kvm-remote.sh index a2328163eba1..134cdef5a6e0 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-remote.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-remote.sh @@ -137,14 +137,20 @@ chmod +x $T/bin/kvm-remote-*.sh # Check first to avoid the need for cleanup for system-name typos for i in $systems do - ncpus="`ssh -o BatchMode=yes $i getconf _NPROCESSORS_ONLN 2> /dev/null`" + ssh -o BatchMode=yes $i getconf _NPROCESSORS_ONLN > $T/ssh.stdout 2> $T/ssh.stderr ret=$? if test "$ret" -ne 0 then - echo System $i unreachable, giving up. | tee -a "$oldrun/remote-log" + echo "System $i unreachable ($ret), giving up." | tee -a "$oldrun/remote-log" + echo ' --- ssh stdout: vvv' | tee -a "$oldrun/remote-log" + cat $T/ssh.stdout | tee -a "$oldrun/remote-log" + echo ' --- ssh stdout: ^^^' | tee -a "$oldrun/remote-log" + echo ' --- ssh stderr: vvv' | tee -a "$oldrun/remote-log" + cat $T/ssh.stderr | tee -a "$oldrun/remote-log" + echo ' --- ssh stderr: ^^^' | tee -a "$oldrun/remote-log" exit 4 fi - echo $i: $ncpus CPUs " " `date` | tee -a "$oldrun/remote-log" + echo $i: `cat $T/ssh.stdout` CPUs " " `date` | tee -a "$oldrun/remote-log" done # Download and expand the tarball on all systems. -- 2.40.1