Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4630812pxj; Wed, 12 May 2021 09:37:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxe9KubuuCMB8tV88KkseAqntOpC35+o2aBvvyMWp7WYl4xKIGEirwHeZ4+g4drZTgOrGVo X-Received: by 2002:a9d:7606:: with SMTP id k6mr30833445otl.223.1620837434978; Wed, 12 May 2021 09:37:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620837434; cv=none; d=google.com; s=arc-20160816; b=JwkdB5+KM9H3yH0O1Q9a1Ns3ToQO1DxHRY65pfGzP39+GJ6LN4meibAVMQmX0x/Tba gP0j2fWBKr+HErCNcx6BCyHef7cq5cApfseKrB1UOoVJBy+LMP/KMsckRaecHCLfkE7D kDRj5/H0ZTVOqaPGvXLnfkLgt+nWyJI5Z2SXV5cmaD4LAYeTKHxcywYd8tX+CabaLNWg bdd7O1b0PvCf0q7jFhWWz/Cq16IhZSOmYU5Mw42V7LGCsP3U+Emnf4HbXzZ/epOgIGi8 LCQxMYSrGQ4MntckRFWrqYHWd+t2brM555ARFSobzUd8X2m7cr43klr89RdBng0eEqjn OTRw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=67/XEVaBgQAZV+Tj75yy00d/zuFvAH+t7N4KTdUH+bo=; b=IZJKkbTZRJElU3dZBSCTaT7vMmqacHGovRI24qM1wNsyLjDIdit8uEmnrelss55SDy 8lYaMHlmeZSKA8kg34RIafuQp0m1tASbU90QguZVoHDEiS9qBJB0OJD190Sf/bbfvEEF F3ii7d9fjojfGIRfFpKmdqSrQJoKhI9wzDcYIlsllUqQ6GaTe0B2Qc7CcY+7O/tDmqVY 8X1ud748z8eVJSIplKZSdjQiN5rHwMiDlcBttDVQXdjNHOgUNnE1S4ynBfLYpVQEf8Mf Ys7PkUUVoaomAGxdaoRSyV5JQVz8Zt8C/mSGl8U9+9ja42tvRlylCdWltc9vUmjO+akj npZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yLx9Jo8t; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j104si410358otj.77.2021.05.12.09.37.01; Wed, 12 May 2021 09:37:14 -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=@linuxfoundation.org header.s=korg header.b=yLx9Jo8t; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243146AbhELQgx (ORCPT + 99 others); Wed, 12 May 2021 12:36:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:41370 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235476AbhELPpA (ORCPT ); Wed, 12 May 2021 11:45:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B54D661C92; Wed, 12 May 2021 15:22:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832979; bh=AKv4CvF9i/8LNs7eWbsTS8lJ3mQ65fN4GO5d/CpftOk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yLx9Jo8tET8liHePZInJxAZMRpaeo+ERUrVd77DR6CWJRyA6Q4cwDhmNNu0iEIWoZ zLSuSeTnLOWCrHFu0NJLf+iHY9K586M3O3h+F+eSRhrIxO+BpEL+sjlX8Alzy9H9Eo KuT+wW8qFVGKVGOyNJ0WiK9hIpBv+RAdlDOXmNqk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ido Schimmel , Danielle Ratson , Petr Machata , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 500/530] selftests: mlxsw: Remove a redundant if statement in tc_flower_scale test Date: Wed, 12 May 2021 16:50:10 +0200 Message-Id: <20210512144836.189917374@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Danielle Ratson [ Upstream commit 1f1c92139e36223b89d8140f2b72f75e79baf8bd ] Currently, the error return code of the failure condition is lost after using an if statement, so the test doesn't fail when it should. Remove the if statement that separates the condition and the error code check, so the test won't always pass. Fixes: abfce9e062021 ("selftests: mlxsw: Reduce running time using offload indication") Reported-by: Ido Schimmel Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- .../testing/selftests/drivers/net/mlxsw/tc_flower_scale.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/testing/selftests/drivers/net/mlxsw/tc_flower_scale.sh b/tools/testing/selftests/drivers/net/mlxsw/tc_flower_scale.sh index cc0f07e72cf2..aa74be9f47c8 100644 --- a/tools/testing/selftests/drivers/net/mlxsw/tc_flower_scale.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/tc_flower_scale.sh @@ -98,11 +98,7 @@ __tc_flower_test() jq -r '[ .[] | select(.kind == "flower") | .options | .in_hw ]' | jq .[] | wc -l) [[ $((offload_count - 1)) -eq $count ]] - if [[ $should_fail -eq 0 ]]; then - check_err $? "Offload mismatch" - else - check_err_fail $should_fail $? "Offload more than expacted" - fi + check_err_fail $should_fail $? "Attempt to offload $count rules (actual result $((offload_count - 1)))" } tc_flower_test() -- 2.30.2