From mboxrd@z Thu Jan 1 00:00:00 1970 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 320E147A6B; Mon, 1 Apr 2024 16:46:10 +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=1711989970; cv=none; b=Bm76viUG2zkj0ZFgVHAvTPItG/Uz0WBEn03JmrSBK8NEIL35nkxcfrlcr7lMV7QJUATRxfL/pwedSJwBhzQfY6nHRzML0B+9hhKNP6tnB7KjOOvxrRSvrZznXf3HrFNN5UtXyXvH3kx5H6LJMrpU3LGQ17I9EqFbb443DKfo8ks= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711989970; c=relaxed/simple; bh=Fgg/plg3JU3GKrE5u7P0XNU4IPppAhQ9X+xoM9NVOlI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EkxDzAHWoa/TM/3JgB+D+WTKX6fKVNmq2Ic3IF4KU9K57d8m7OTZt0a0hFXKaQJHDh/yQZZf5K3IRLGdeC3qq+TPFZL70EgRV2no+AV6eLPYluTaVOAKQzsxJ9jzqSqG1+EsZGgM7Z/Yc/KkQiLeYbgRrD3VDKR9P22slryUuME= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=GPCb4fUR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="GPCb4fUR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A53D8C433F1; Mon, 1 Apr 2024 16:46:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1711989970; bh=Fgg/plg3JU3GKrE5u7P0XNU4IPppAhQ9X+xoM9NVOlI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GPCb4fUR0GbfJs4qm0KAWxS+B5So/iASZ4ED60W6Y0g3+Rt+eVJ77nj7sKNtDvmrE wRa/X37JS91LybZBxwqPmQl0Mr8XjjwdpJCK+0pOAKrfZ9qDcvbqgCyAh/8dL2NxSa /Li85uzerrL3wh7OPW3XPNy8rKk9LF4RqAdtm2wk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Geliang Tang , "Matthieu Baerts (NGI0)" , "David S. Miller" Subject: [PATCH 6.6 207/396] selftests: mptcp: diag: return KSFT_FAIL not test_cnt Date: Mon, 1 Apr 2024 17:44:16 +0200 Message-ID: <20240401152554.101456903@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240401152547.867452742@linuxfoundation.org> References: <20240401152547.867452742@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Geliang Tang commit 45bcc0346561daa3f59e19a753cc7f3e08e8dff1 upstream. 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) Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- tools/testing/selftests/net/mptcp/diag.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- 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 ]" @@ -115,11 +115,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}"