Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp272609pxb; Wed, 6 Oct 2021 04:50:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhQH2OsHf376JvtiV+ZtbdSAEdeMRBOm8rf1IcFvZr49civlwKk4IYbMZKmkCcmDArGtWc X-Received: by 2002:a17:906:f109:: with SMTP id gv9mr19398872ejb.184.1633521025444; Wed, 06 Oct 2021 04:50:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633521025; cv=none; d=google.com; s=arc-20160816; b=BIazcgcEzitmfLQOgKDCPfg5fxGphXTpD312hhml+nVqJEsH0W0Zt8EULXGprzwHGU PikGy1nnQ+XGTJ172Kop+uO/eOJPhETNVecwnv6o+6dW8TxAz6yvQ7KHymnvMWIf1K5G FUUp8BF60Gsep9G5/HZdte+5Mdq3nIXBNzXNkiA2rt9LJC5+j6hHDynex5p52IBJsMgg FXXF5GrHhzjfuQUAD/vbOBGBoLJejRULK3JxRgHWNdrVXzT2PlpLziVZLWxQM0LL4ap/ m+HhkONKfXLgbVTcRx+l9rgY1GnpwSGjvttmFeWdzUsnQCN+M/b+Wqpp7kHfHQ+pbLLs ZrzA== 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=wI5DiihVmJ+5KuYm6tCIG9ONOUB+LjscGOui43RIXpU=; b=Bgp482jjY3GCAWhaPkagYtVD/HmPZVzOr9rhJDo/aNE/DyhwtgFbX3XteQTLCsCuaF xuD4nbtpdZVbNVH3A1o2u0r0TqM87sqtz9dyHjrVVeA83pyRkM1G7JB1n/KY3OHTpsXe WzM6hdAPm86Puukyb0uYqx5VixdcAqWbAEE6bhMEMmj/CDqDHjGtNithYFVwVtp+DgoQ HV3MQbEDbQGBMuXGuSLkLRJQ0i2afABOhnWQG13MKz0ZV+b2vHzyNStW7rdNIIJBTN6a TbBInP4d4jV7uYxty9Ct08msXq77/pv9lDvALsYDk7M8UNu25IV+htj+yzMUI9VfE4dq IhRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=EQrLtCJ0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i24si18205048eds.331.2021.10.06.04.49.57; Wed, 06 Oct 2021 04:50:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=EQrLtCJ0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238373AbhJFLuJ (ORCPT + 99 others); Wed, 6 Oct 2021 07:50:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238396AbhJFLtw (ORCPT ); Wed, 6 Oct 2021 07:49:52 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1472AC06174E; Wed, 6 Oct 2021 04:48:00 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id r18so8692232edv.12; Wed, 06 Oct 2021 04:47:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wI5DiihVmJ+5KuYm6tCIG9ONOUB+LjscGOui43RIXpU=; b=EQrLtCJ0BdXOj/yGCvpA/CfMvIrr3XJf+1lcHCpDPnN2XOWaGZ8T9hjQ1PLo5ui2Sp TnTHHMlj+/4aSvWfzZdVAV6OHQUfzzLdYpQgUZapmEtJBmcG+/Gl6J8TmcDWLlPITwhj d0NgQzF3KJjXiKOnEjX65+k1V9SnsIYhLWqomg/eQa2aAlNhvGd+mMzstOVcqeePv6iC mT3te+oCwBuT8wJ0V+uPAs5vPJ2HTNdS7b2fYRcw9ZDP84MVVIUQlZXdUqVPhU8qHYty VEas/1XyOXvSghJ8AN3y2KTR+KmxgXPfcN9K095HpP8Z11dGXYegiYGPUqfsEvh5lblS vKwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wI5DiihVmJ+5KuYm6tCIG9ONOUB+LjscGOui43RIXpU=; b=Sz/kcUwjlwnuINKit0RJWcmQSu85sf8mHQjGg+cFIsaquk2mTed8ZjCp9DZ0mUwceL 4GqX/i8m6aKfsez9M3avjI5RwnMlvLYOzRgw5navPufbcSYC92kwOK0xxkOAtHNsJVga epR+rAe6u8S8cJgXTDE6gO1rhJ+2HpkucSP681dggFbFbJx1zsPP3Mjtp8agSrwPeCVc t7MWTW9FvHHhDdStsQLJBn91xcgs2IG9yb+BF3SEScA6TW3TelqsQQM+rYDQg9Hd0pud vPitvcOwUc9g1MgBv/x6VtItfqZ6DvHZTm0n2ZP82m7dgDWZS+oM4KyCsW5OQtSYzqjw sIWA== X-Gm-Message-State: AOAM532qaZ2JNciUCVzQwJrVpiQ8s3vzb/gVIlh+KITJdGiig8XMjHcE NqVDxNxUvqMdM6ct2twu6NY= X-Received: by 2002:a05:6402:1a3a:: with SMTP id be26mr33649619edb.356.1633520878648; Wed, 06 Oct 2021 04:47:58 -0700 (PDT) Received: from localhost.localdomain ([95.76.3.69]) by smtp.gmail.com with ESMTPSA id y40sm1402187ede.31.2021.10.06.04.47.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 04:47:58 -0700 (PDT) From: Leonard Crestez To: Jakub Kicinski , Shuah Khan , David Ahern Cc: "David S. Miller" , Ido Schimmel , Seth David Schoen , netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/11] selftests: net/fcnal: Do not capture do_run_cmd in verbose mode Date: Wed, 6 Oct 2021 14:47:22 +0300 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This way running with -v will show interspersed output from both nettest client and server. This helps to identify the order of events. It is also required in order to make nettest fork in the background by itself because shell capturing does not stop if the target forks. This also fixes SC2166 warning: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. Signed-off-by: Leonard Crestez --- tools/testing/selftests/net/fcnal-test.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/tools/testing/selftests/net/fcnal-test.sh b/tools/testing/selftests/net/fcnal-test.sh index b7fda51deb3f..09cb35e16219 100755 --- a/tools/testing/selftests/net/fcnal-test.sh +++ b/tools/testing/selftests/net/fcnal-test.sh @@ -189,21 +189,19 @@ kill_procs() done } do_run_cmd() { - local cmd="$*" - local out + local rc cmd="$*" - if [ "$VERBOSE" = "1" ]; then + if [[ "$VERBOSE" = "1" ]]; then echo "COMMAND: ${cmd}" - fi - - out=$($cmd 2>&1) - rc=$? - if [ "$VERBOSE" = "1" -a -n "$out" ]; then - echo "$out" + $cmd + rc=$? + else + $cmd &> /dev/null + rc=$? fi return $rc } -- 2.25.1