Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp1282589rbe; Fri, 1 Mar 2024 09:18:58 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXcg4/eaPT9kIjXUrTh7aOwvFldVZLy8U/MA1xd1ZthKP5QkR4w2P7w1oz72DhkI648db6bJN3tFfVsHuUuslsZ8PnXU5k+7r8E0ueFRQ== X-Google-Smtp-Source: AGHT+IHiRBWl+lGL0Mnh4FEojH5pXFpHqekZYFxCKdAUk/LR4k+nJ+nR/XPrDN+WrHXhAGFZtFJU X-Received: by 2002:a05:6e02:1bc4:b0:365:a64c:e2ce with SMTP id x4-20020a056e021bc400b00365a64ce2cemr2579219ilv.7.1709313538622; Fri, 01 Mar 2024 09:18:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709313538; cv=pass; d=google.com; s=arc-20160816; b=G6o6cO1lgUMig32mbl6MyIoi0rHX5dVv8mPEysefAC4gKLQZg9MC3jZwjjp+hlulpo ZWAnO7R/HuHpMnM/TJ5X1fC9KdRnXW02aAD8yX4Hh2ZjmsIdTa8oGVB0qkKDLUVbzujo UCtEIYneA+Urr7sW+nO//uR3v3m7kgV1GUAlcQX0NCDsI9DalASuEqDawZ25vdhmL+mN mgeWLqg1Kqt1HK34K4l53GUFuoqe7sS/599U3YsP51vewoY9pi9fbsHqx/SZONP37Hvm glJCfrUDvhDcQ/xdCsZYGEr9RRlQ4fHtWUIwCPSx+CyW1XSWfavIZqoN/WUqyBGiOk5J YI6g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=4NZ8fbZREEE8syJW6lb/OtIlI5TcOVpG035cCg2ZrsA=; fh=nuJ+NTNEJwjyDPlSIf5XLgIOftEw9cpb02hOjO8UR3E=; b=lTFLMD5W7Zn/7ia51xQWoMmipXg+DT1IIQNZQhO/24YyP1o6sN1pvhtHS7vTGOzaF4 19r0LTvrNrXif2+K0dGNKdrgncmg+r5J0OvmS944gsHqAk0xCu9MVimFU0sCfbVriBjI I9+q0kUOEyNNsdGcJ8jLFkX7gCUY7Q3FdGPNryrPErHKZrMhF+WJPw4ajSErBAaV5fKd J5ZEQIqVzWCwshV/uUHJu7qTVtH3zgOxQhtafxWZD+B2HAp08pVvQmzqmsO6C8yLieAG 2dehqye/gWmW87P/pMZADhlYCE6o0BXOKOH6djGBW06G9idbuWg84Gpm26uzNf+sBP9B zygw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UhV9oKat; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-88812-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88812-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u124-20020a637982000000b005dc87994572si4034267pgc.346.2024.03.01.09.18.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 09:18:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88812-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UhV9oKat; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-88812-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88812-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 05EBE286A2C for ; Fri, 1 Mar 2024 17:12:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6C54BF9D7; Fri, 1 Mar 2024 17:11:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UhV9oKat" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 84BF8C2C7; Fri, 1 Mar 2024 17:11:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709313102; cv=none; b=FNGAgqgC3nKRnam8WAIpZ3p6YBAa/XA0cdflrJyv41zfwrywBX0SjoJQOXiZQPcKUnN7f7yNO1/pez3QI4LaP26b9jeG1p9Nc6jae7/EBG/sFH5NIv0Ml7mAZDciznLRzkR1oe96MKBPgQjrP0i5e80GqG73aoxEfwIf2ivT7l8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709313102; c=relaxed/simple; bh=gGZFgk/rb3EH2O4u8lfqG1pgZeJCOjyIG6p682FNkGY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=r/eMuy3qfkWMTRaBOTyRwrwGL4qmF+IGB5LExNfvesmYWSNW+KLvLFPXuhHAfEbiH4tnUirG2+WUkd/u8meS2nrNsc9RoJ5v4/TCSI+xuGDl44DenJ7UvDEWxV1Yd8tgFmHrkorTNPKwYT75xGuC7bfbpvcM49a1nIDVm4QdaDg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UhV9oKat; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 732DDC43330; Fri, 1 Mar 2024 17:11:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709313102; bh=gGZFgk/rb3EH2O4u8lfqG1pgZeJCOjyIG6p682FNkGY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=UhV9oKatb+x3ccw5zp4vQEMKMnNfXTZfuOVZXXqzp2743MSoXYr3HFHsLY3bJ6ugk 9iz/DtsYjb66Uwm4KjCQntLHblyil3dqlvKrfwb1tlp75IlcqYtG7TrNA4sdOILfzy yjjiBCiutKhhmN5HqllAUOb0Nlh77Ff4BhzBnlCr99xoxCCz74FtZbYRyNmG1/gIjt //H+ormzVfM41Z72dwUlHyBphFkukQiFAW/srYqGVt1oJvGatgzcIKCdIECTlSYWai xFCbIlvqkCIs16brx6+mBUZKAF4qXAvSK+W2CdijMEOByOY3rK/NDrIYHJZ2FeeKGY TnIfwqnjcJFCw== From: "Matthieu Baerts (NGI0)" Date: Fri, 01 Mar 2024 18:11:22 +0100 Subject: [PATCH net 1/2] selftests: mptcp: diag: return KSFT_FAIL not test_cnt Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240301-upstream-net-20240301-selftests-mptcp-diag-exit-timeout-v1-1-07cb2fa15c06@kernel.org> References: <20240301-upstream-net-20240301-selftests-mptcp-diag-exit-timeout-v1-0-07cb2fa15c06@kernel.org> In-Reply-To: <20240301-upstream-net-20240301-selftests-mptcp-diag-exit-timeout-v1-0-07cb2fa15c06@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Simon Horman Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, "Matthieu Baerts (NGI0)" , Geliang Tang , stable@vger.kernel.org X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1625; i=matttbe@kernel.org; h=from:subject:message-id; bh=WbTTSM8dAo+T+IZMAz1wLRiGpMeBimBuli1/EMr2Roo=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBl4gxHM1HZCWFibarJ6yqVSuE472timi0TYr5Kn QXCZzjsvCOJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZeIMRwAKCRD2t4JPQmmg c3YsEADUXwVLCERIRWmy1crU3vJJugecncwe029ZZr7ZB3dp2JJ24A6V+Exf//JY1Xijke7S8ev SxewLG9ASycDeNoCV7WWPSzFuXefgZm/fgjRBHFuA7dV4HBblCw3dR1/2DY2A3ajlUrJIVhLlNq W6NjRnIjA4zAIngH3vkDMKzJM03i979orRwh+MBRAxz8KttK6LX/437wlU4vdpnn8DVA/axk9F0 +PKAYpBlsV04mzJXvbsbHgKfAl61SWJq1FfaNJJJ02GNdLjSQr4KOgPsQa+7HFAJMMTQy3sNFXZ XSBM9OlRAwuHQyVjNgGnIZEb1mgAPdZUZuIZb4BaW/Qalza334agQ/JHk8QAJ3ytZc3eNkDT86K KvTSL5VoDyUM2MWomRMVVKXSIRZ6gmIinO4Has6+9RzOo9UQPjkiMKQGgwrLDSEFqRCMIh2F9pK iSBm7ZKLt1StWfsYbQqJQrDeuds4WHOacgOUch7AHrxe1Mwx9IVeAOcnx0wCEVYoTXfr78HPXw9 GFkKK41Ib2Mr4CdPboFYOsBSiXtgWI/PMRwBwNTw0kLzBkwGnwPnmTclhRetySyb1hJ8UBgZdWO N/Sl5xVx1ATzkNqaNwQUzHYgryuSin/pgj2U2KcCfMayl7B+WpU54JF/eTefy9jC1ilye9StCMo 6jK5ySXMlu/gWnQ== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 From: Geliang Tang The test counter 'test_cnt' should not be returned in diag.sh, e.g. what if only the 4th test fail? Will do 'exit 4' which is 'exit ${KSFT_SKIP}', the whole test will be marked as skipped instead of 'failed'! So we should do ret=${KSFT_FAIL} instead. Fixes: df62f2ec3df6 ("selftests/mptcp: add diag interface tests") Cc: stable@vger.kernel.org Fixes: 42fb6cddec3b ("selftests: mptcp: more stable diag tests") Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/mptcp/diag.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/diag.sh b/tools/testing/selftests/net/mptcp/diag.sh index f300f4e1eb59..18d37d4695c1 100755 --- a/tools/testing/selftests/net/mptcp/diag.sh +++ b/tools/testing/selftests/net/mptcp/diag.sh @@ -69,7 +69,7 @@ __chk_nr() else echo "[ fail ] expected $expected found $nr" mptcp_lib_result_fail "${msg}" - ret=$test_cnt + ret=${KSFT_FAIL} fi else echo "[ ok ]" @@ -124,11 +124,11 @@ wait_msk_nr() if [ $i -ge $timeout ]; then echo "[ fail ] timeout while expecting $expected max $max last $nr" mptcp_lib_result_fail "${msg} # timeout" - ret=$test_cnt + ret=${KSFT_FAIL} elif [ $nr != $expected ]; then echo "[ fail ] expected $expected found $nr" mptcp_lib_result_fail "${msg} # unexpected result" - ret=$test_cnt + ret=${KSFT_FAIL} else echo "[ ok ]" mptcp_lib_result_pass "${msg}" -- 2.43.0