From patchwork Thu Nov 8 04:13:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 994644 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42r8zY5zCzz9sBk for ; Thu, 8 Nov 2018 15:13:45 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="qM1YNP6k"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42r8zX428SzF3L9 for ; Thu, 8 Nov 2018 15:13:44 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="qM1YNP6k"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42r8yy71QfzF3L8 for ; Thu, 8 Nov 2018 15:13:14 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="qM1YNP6k"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 42r8yx5yD9z9sBk; Thu, 8 Nov 2018 15:13:13 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1541650393; bh=Ut4rAOK24dMVCrqecmEhPVqoeCaMh+rhy8iCo9KDz9E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qM1YNP6kklP6SvuPgicbRbjqMkVURK0ZFIPl/w8ueXx46tbHxf0nZr1zy9Iu7rr6v rnCtK8Bnmqm9x+m3U3OPGW4vIKJgW8d8rVP0fqfWeGKESO6/pCk3KLJMJUTVTszALf eQGHJvjOzvSq8wFrn1JAPYd2VPZjNVcLNx6srGVqD4D2BBwulryFPewOS4B34uSGtD WJgBQc/QNXMkzG7GtTczMA0xUzaM37nzYzqEksPyk6BFHHiio5jfXXEmYtTYpx3HvK ewmTcy/ayuXvU1rg0Bdt/uRmWADAgKRChxBZute2aQzVF57JU+bPZEA4CBFYogqhUg E1A147VxZ4IKg== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 8 Nov 2018 15:13:07 +1100 Message-Id: <20181108041311.182694-2-amitay@ozlabs.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181108041311.182694-1-amitay@ozlabs.org> References: <20181108041311.182694-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH 1/5] tests: Fix the condition to check if bmc is up X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- tests/test_hw_bmc.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_hw_bmc.sh b/tests/test_hw_bmc.sh index 7054181..c65a630 100755 --- a/tests/test_hw_bmc.sh +++ b/tests/test_hw_bmc.sh @@ -62,15 +62,17 @@ do_skip () fi } + echo -n "Checking if the host is up... " output=$(test_wrapper /usr/sbin/obmcutil state | grep CurrentHostState) rc=$? if [ $rc -ne 0 ] || \ - [ "$output" != "xyz.openbmc_project.State.Host.HostState.Running" ] ; then + [ "$output" = "CurrentHostState : xyz.openbmc_project.State.Host.HostState.Running" ] ; then echo "yes" hw_state=1 else echo "no" + echo "$output" fi result_filter () From patchwork Thu Nov 8 04:13:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 994640 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42r8z74Ytkz9sBk for ; Thu, 8 Nov 2018 15:13:23 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="SC89ni6D"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42r8z62cBPzF3LQ for ; Thu, 8 Nov 2018 15:13:22 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="SC89ni6D"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42r8yz0CfMzF3L9 for ; Thu, 8 Nov 2018 15:13:15 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="SC89ni6D"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 42r8yy1Y0Cz9sCQ; Thu, 8 Nov 2018 15:13:14 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1541650394; bh=dug8UXiNubY7cu81+80hgfj1cUM3wW0LKbKvE/M/ilM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SC89ni6DBsD3oN7JBxQ+1KR4gND5zFllVfsdjFKS9xXPPjiuRyq/TOJ3QQ/M28ccA z2DpTzLo04HxEPSa0ltSBpK69AsfS76I7+sKpH+0f3j+0fD6fkNM5tCx/RwJb//yNh hxndtbS444DtVfkPJDt46TyY/U31J+uv8WlAQmJifM057Sez0z2EPlHx8r82HmCsDJ hZ5j5Jk+sxRl6IBppetKiuyv8WFZlUf6KO5vdIzI4/2OuVHzBRwXrHzXWegn9rxq5W PFeSAeFFq0filNzRaltb6hw+Blova7bpP6YGQntG2VZ68N40j1A44OZixN/45zpGYq 0iKmnicAPf4cA== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 8 Nov 2018 15:13:08 +1100 Message-Id: <20181108041311.182694-3-amitay@ozlabs.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181108041311.182694-1-amitay@ozlabs.org> References: <20181108041311.182694-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH 2/5] tests: Update driver to pass test_wrapper argument X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Amitay Isaacs --- tests/driver.sh | 15 +++++++++++---- tests/test_driver.sh | 10 ++++++++-- tests/test_hw_bmc.sh | 6 ++++-- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/tests/driver.sh b/tests/driver.sh index 6df34b3..9e92135 100644 --- a/tests/driver.sh +++ b/tests/driver.sh @@ -44,8 +44,9 @@ # # test_wrapper # -# To execute commands in a special context, test_wrapper function can be -# defined. This function will be passed all the arguments to test_run +# Register a test wrapper function. If test_wrapper is called without +# an argument, then the test wrapper function is set to default. +# The test wrapper function will be passed all the arguments to test_run # command. # # @@ -222,9 +223,15 @@ test_wrapper_default () "$@" } +test_wrapper_func=test_wrapper_default + test_wrapper () { - test_wrapper_default "$@" + if [ $# -eq 0 ] ; then + test_wrapper_func=test_wrapper_default + else + test_wrapper_func="$1" + fi } result_filter_default () @@ -337,7 +344,7 @@ test_run () stderr_file=$(mktemp) - output_raw=$(test_wrapper "$@" 2>"$stderr_file") + output_raw=$($test_wrapper_func "$@" 2>"$stderr_file") rc=$? if [ $rc -ne $required_rc ] ; then diff --git a/tests/test_driver.sh b/tests/test_driver.sh index 6e8343a..803f69f 100755 --- a/tests/test_driver.sh +++ b/tests/test_driver.sh @@ -52,10 +52,14 @@ echo_stderr () echo "$*" >&2 } +test_wrapper echo_stderr + echo "match stderr" test_result 0 -- test_result_stderr foo -test_run echo_stderr foo +test_run foo + +test_wrapper echo @@ -73,11 +77,13 @@ test_run echo 666 echo -test_wrapper () +prefix_output () { echo "output: $*" } +test_wrapper prefix_output + test_result 0 "output: foobar" test_run foobar diff --git a/tests/test_hw_bmc.sh b/tests/test_hw_bmc.sh index c65a630..c35597b 100755 --- a/tests/test_hw_bmc.sh +++ b/tests/test_hw_bmc.sh @@ -40,7 +40,7 @@ copy_pdbg () ${BMC_USER}@${BMC_HOST}:${PDBG_PATH} } -test_wrapper () +run_over_ssh () { sshpass -p "$BMC_PASS" \ ssh ${BMC_USER}@${BMC_HOST} \ @@ -64,7 +64,7 @@ do_skip () echo -n "Checking if the host is up... " -output=$(test_wrapper /usr/sbin/obmcutil state | grep CurrentHostState) +output=$(run_over_ssh /usr/sbin/obmcutil state | grep CurrentHostState) rc=$? if [ $rc -ne 0 ] || \ [ "$output" = "CurrentHostState : xyz.openbmc_project.State.Host.HostState.Running" ] ; then @@ -75,6 +75,8 @@ else echo "$output" fi +test_wrapper run_over_ssh + result_filter () { sed -E -e 's#0x[[:xdigit:]]{16}#HEX16#' \ From patchwork Thu Nov 8 04:13:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 994641 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42r8zF6gD7z9sBN for ; Thu, 8 Nov 2018 15:13:29 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="UXqtja6v"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42r8zD0cvXzF3L9 for ; Thu, 8 Nov 2018 15:13:28 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="UXqtja6v"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42r8yz0KXdzF3LG for ; Thu, 8 Nov 2018 15:13:15 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="UXqtja6v"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 42r8yy4FxMz9sCs; Thu, 8 Nov 2018 15:13:14 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1541650394; bh=IUev4CdF80+eMjtzaQ6dOhQx2dAmn6ZT/8j0On1CEqA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UXqtja6v0y7uyqEyhGLtoPmeSgpnN02/G80OmYL0jLl1/SSohdQKFjiD9UpzX2wGx lkfEjgE451Ta+PbmJhhL/2NOGZrJGwVCpeUOWv1R/e4Bu/6t2bcA1U9cXxyR4N+Qew 7ZW5/fCthfAlOVC1hoB8nKTDhrBLZUYMg0U8NSLsjYomVa/B2CM5k5c61xRjYHvcRn dvucmliCCXpgtC8iPaXaZd9x2jfrqwr/JWgwH/5ZfMdtiqIMZrfBuaHA9sFX9a1O0D 8OsrRWvbziUjlChHqcXkSuV0K/Fj469HL+i/EXWmpAZabALzxQIURc97Ddrjdqosky cvBRjQjCWgzXA== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 8 Nov 2018 15:13:09 +1100 Message-Id: <20181108041311.182694-4-amitay@ozlabs.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181108041311.182694-1-amitay@ozlabs.org> References: <20181108041311.182694-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH 3/5] tests: Exit on first test failure X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Amitay Isaacs --- tests/driver.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/driver.sh b/tests/driver.sh index 9e92135..f1f7612 100644 --- a/tests/driver.sh +++ b/tests/driver.sh @@ -90,6 +90,7 @@ test_name=${TEST_NAME:-$0} test_logfile=${TEST_LOG:-} test_trsfile=${TEST_TRS:-} test_color=${TEST_COLOR:-yes} +test_exit_failure=${TEST_EXIT_FAILURE:-yes} red= grn= lgn= blu= mgn= std= if [ $test_color = yes ] ; then @@ -216,6 +217,10 @@ test_output () elif [ $res = "XPASS" -o $res = "FAIL" ] ; then count_failed=$(( count_failed + 1 )) fi + + if [ $count_failed -gt 0 -a "$test_exit_failure" = "yes" ] ; then + exit 99 + fi } test_wrapper_default () From patchwork Thu Nov 8 04:13:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 994642 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42r8zK5xbBz9sBk for ; Thu, 8 Nov 2018 15:13:33 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="PcDs3AQL"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42r8zK2T2VzF3LG for ; Thu, 8 Nov 2018 15:13:33 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="PcDs3AQL"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42r8yz2nPwzF3LJ for ; Thu, 8 Nov 2018 15:13:15 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="PcDs3AQL"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 42r8yy6n3fz9sCw; Thu, 8 Nov 2018 15:13:14 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1541650395; bh=9cqaOjBhi+qw4YyCtXgyJ9oQH2vnT/B8pad3r8OSYCA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PcDs3AQLLgAq0UbpbV2FdAa9ksppw3bmBepF3Lrjz5xrU3xHPVixJSHc6xOAJaAnt kwlz8rSTHPQ0DSo/oeFzMKznFWQon5xlKN8lV9R0vBrm5W/Fos5+AkXo9XE6Kh9F0b W/iCbEC2W/+mTolx3QVcSLFV6kP01oHP7Gq8bF0zCh8JSdIPGEjkWzqlTli7v2yk38 fFmJu7xeVU4kuLWx9O4/dxGD1mQqr5ka18v0Yc4KHEvWvKDulmuOih3ULd/YNhcObO yMqkxk21N7KHAS6IzizUqtEXZG6WeAXHQQNHzwhoWwbCQzD6P+JbyEkhbaWPwgMS2D cL3rVaxmccivQ== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 8 Nov 2018 15:13:10 +1100 Message-Id: <20181108041311.182694-5-amitay@ozlabs.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181108041311.182694-1-amitay@ozlabs.org> References: <20181108041311.182694-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH 4/5] tests: Ensure tests can be run from builddir X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- tests/driver.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/driver.sh b/tests/driver.sh index f1f7612..16d6b71 100644 --- a/tests/driver.sh +++ b/tests/driver.sh @@ -84,7 +84,7 @@ if [ "$TESTDIR" = "." ] ; then TESTDIR=$(cd "$TESTDIR"; pwd) fi SRCDIR=$(dirname "$TESTDIR") -PATH="$SRCDIR":$PATH +PATH="$SRCDIR":.:$PATH test_name=${TEST_NAME:-$0} test_logfile=${TEST_LOG:-} From patchwork Thu Nov 8 04:13:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 994645 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42r8zg6d3zz9s9h for ; Thu, 8 Nov 2018 15:13:51 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="CskDp1b0"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42r8zg4HNRzF3LN for ; Thu, 8 Nov 2018 15:13:51 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="CskDp1b0"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42r8yz73GCzF3LL for ; Thu, 8 Nov 2018 15:13:15 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="CskDp1b0"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 42r8yz2DYmz9sDB; Thu, 8 Nov 2018 15:13:15 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1541650395; bh=zRgFIE5qDGif5eXW67zCmQaftmjh/1XRPG/LerGcm9k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CskDp1b0QrWdb/WwuAUfTqmh13BtPBAdq0vKoYb9qIXY6yZO9PjqFf/jwUa9a1nl/ 6IHoZlAYKDs6ONUck+nm2sy+8Ge98wW8f7MnNj2IBRURNwiSo2PwHddrh+LFoLxuSr hRyuuF9Cxq/oEa0TVxoqtFz3+Q2hKqQwpVnZPIAgM/8kA4Ziaff0mlRA/UQDgp9xkG FRkyvjdmCGQjngvB8UmMhNsPyhVxnJi2ldrP85Wopl/z3KQO9hJVwNLX4z5A+PTq5T qqaNLjsDuWsP0xE9kXUt4JCWQRXhCX+xlVX8JDwiZoOWymG2oeccAEopjii7CkkgRB CbzHpK/S+dgHw== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 8 Nov 2018 15:13:11 +1100 Message-Id: <20181108041311.182694-6-amitay@ozlabs.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181108041311.182694-1-amitay@ozlabs.org> References: <20181108041311.182694-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH 5/5] tests: Log stderr output (if any) on test failure X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Amitay Isaacs --- tests/driver.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/driver.sh b/tests/driver.sh index 16d6b71..9a68305 100644 --- a/tests/driver.sh +++ b/tests/driver.sh @@ -370,9 +370,9 @@ test_run () output_mismatch=1 fi + output_stderr_raw=$(cat "$stderr_file") + output_stderr=$(cat "$stderr_file" | result_filter) if [ $test_stderr -eq 1 ] ; then - output_stderr_raw=$(cat "$stderr_file") - output_stderr=$(cat "$stderr_file" | result_filter) if [ "$output_stderr" != "$required_output_stderr" ] ; then test_log "expected stderr:" test_log "$required_output_stderr" @@ -384,6 +384,11 @@ test_run () fi output_mismatch=1 fi + else + if [ -n "$output_stderr_raw" ] ; then + test_log "output stderr:" + test_log "$output_stderr_raw" + fi fi rm -f "$stderr_file"