Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp846232pxb; Wed, 6 Apr 2022 01:43:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxGSr8n6YMff5LiuoMG9lz7VBRG/a1Fh1MXZ0y+LfHSD3DRJP7/umHfzeqw9lI3YrnjVlt X-Received: by 2002:a05:6a00:ccf:b0:4fa:abfe:e0f6 with SMTP id b15-20020a056a000ccf00b004faabfee0f6mr7900073pfv.67.1649234615637; Wed, 06 Apr 2022 01:43:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649234615; cv=none; d=google.com; s=arc-20160816; b=eUpVttB0sfW+PRKoc3fkwyhWzZ47sHJno2yl7VmLBrbHXpQtwT/as2VeIyneBjHmkA NMmX+rvj4TK9jfr5CVXszL4mQhebc4QQDS5lRGEYfMJlwKAvwhDzagSrUXY70xeef6yB 8b++YuSq2WLp+j3GoVxcIirz6j7CX4kzIy00fMWilH9qg/jWI5pOh1iiMdnMNLZwTBVg 3D+X9nCVDYebbypOM3jH27KmsfX0ZNFh4JCzP2KLtPZUOWGVWNvpa/6QBu+KYOlOW7NY RYfE7rUyZFyBZqNKXa0rdrExb1IMsdUjOvTGb3HWdK6xoiOvsfm8Q3uyFlIlIi5V9eIJ 4zQw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=h0Ezkowr2vA+TSkiAQHrFqf3CTenq1qGRwHjwra0sLA=; b=kTeOmoAKrME1HyjpdZS8MH1v4Y4smtOlnelpvOcH+gtw7aVlTNmximzRqXIYnvVmNK 6GmD1oeQafyjk32aUakTZ5cyg/rB/rGumTXGRgN+qLgDvpgys+sAUMgMOM2fVbFW6WLo MJ5hBQUDEix50ivMtNjxenSy/p4HBAs+ihP3pt5X11+K0Vtae1hg96rszjmxqoYPs9GQ XNV16OZ0gl1MntD37dfbnezbReEVhrtNRaPJ7798f0mCFsWqngbWEk//It9eHJlvEr8C SGTibQivVONW+zB0XPmKrRxGS+EcthEzzabSSQQSFkCUcdVd4oBY/q5+UWYvC2bXOxXZ V/BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=N4YLCezF; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id nn17-20020a17090b38d100b001c9b52e654esi4500664pjb.117.2022.04.06.01.43.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 01:43:35 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=N4YLCezF; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E688B5804B7; Wed, 6 Apr 2022 01:29:14 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1583538AbiDEXxI (ORCPT + 99 others); Tue, 5 Apr 2022 19:53:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1457758AbiDEQlL (ORCPT ); Tue, 5 Apr 2022 12:41:11 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F221E43AD6; Tue, 5 Apr 2022 09:39:12 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id u14so15895pjj.0; Tue, 05 Apr 2022 09:39:12 -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:mime-version :content-transfer-encoding; bh=h0Ezkowr2vA+TSkiAQHrFqf3CTenq1qGRwHjwra0sLA=; b=N4YLCezFpaFlp26K2sW2ESPajZSoXYWOnj+h1n8qRp3nR6g6MBUfk1pfub5qP8x+lK rd2p9fxCOawPf2OKJjyz1ET2rwsJmp6GkRVkU6VUmrw6DjqTTNZH4BK3IY/Xs67uAAS/ Gx6QlAomXXDTJFKvsk53YrF6klSeprkImsmgPaiXY0iH6tBgVgoK17p9g/2XR7hG2wdm 5zr5q91q4xpKpSid2G5/RCt2mKwS0C9LbpovyzkPC7omWhzHMFEyk2cgy1jBj05JPMor yb8AGuP29MFNS5ZE9nTuPfRd+wzl/VXQvszFIfAN4tFXA3sIwqfgASaGq77CGR6tzV+D 10gA== 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:mime-version :content-transfer-encoding; bh=h0Ezkowr2vA+TSkiAQHrFqf3CTenq1qGRwHjwra0sLA=; b=lHb+ZHljAjuOCyKniELAiAm+cPIK8v0bVne4XzyBZQxjtSinoesnOi/tut9KtiYBXW DDQINbhYMgZED2rQ5VJrY7wTiDy7l5WTbrsK6ZrODFgK9q4QqWH431qxPL0sGPJrdBP4 wlRZFUP3T+KLT+wihA2wETuH4NG0NnBLfsTxTb30ddFckxp1v1ZI2ev5Ty/fBpEC7iEM RBSvKykhlR4nKCuRL/ZSQaEh6prPrfKN9pfi/Z8k6iQpjp7fRRixxF0vpP4GUt4iVczl NqYuHWHHsII5sdHjfL1SxkGPQ9DarEj37rppqSwq10SyG42vMc6a7NxaLqmU+7NJgibq lq9A== X-Gm-Message-State: AOAM530R37wQ54MjJxNyyb54Zu/StMOveLmSZE/dwI9rbR8Rns29vDTs qaTBCGFVMlHThEHzU+CoIdc= X-Received: by 2002:a17:902:728f:b0:156:24d3:ae1a with SMTP id d15-20020a170902728f00b0015624d3ae1amr4336617pll.9.1649176752483; Tue, 05 Apr 2022 09:39:12 -0700 (PDT) Received: from localhost.localdomain ([223.212.58.71]) by smtp.gmail.com with ESMTPSA id s3-20020a056a00194300b004f6664d26eesm17079538pfk.88.2022.04.05.09.39.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 09:39:11 -0700 (PDT) From: Yuntao Wang To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Shuah Khan , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Yuntao Wang Subject: [PATCH bpf-next] selftests/bpf: Remove redundant checks in get_stack_print_output() Date: Wed, 6 Apr 2022 00:37:28 +0800 Message-Id: <20220405163728.56471-1-ytcoode@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The checks preceding CHECK macro are redundant, remove them. Signed-off-by: Yuntao Wang --- tools/testing/selftests/bpf/prog_tests/get_stack_raw_tp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/bpf/prog_tests/get_stack_raw_tp.c b/tools/testing/selftests/bpf/prog_tests/get_stack_raw_tp.c index 16048978a1ef..5f2ab720dabd 100644 --- a/tools/testing/selftests/bpf/prog_tests/get_stack_raw_tp.c +++ b/tools/testing/selftests/bpf/prog_tests/get_stack_raw_tp.c @@ -76,10 +76,8 @@ static void get_stack_print_output(void *ctx, int cpu, void *data, __u32 size) good_user_stack = true; } - if (!good_kern_stack) - CHECK(!good_kern_stack, "kern_stack", "corrupted kernel stack\n"); - if (!good_user_stack) - CHECK(!good_user_stack, "user_stack", "corrupted user stack\n"); + CHECK(!good_kern_stack, "kern_stack", "corrupted kernel stack\n"); + CHECK(!good_user_stack, "user_stack", "corrupted user stack\n"); } void test_get_stack_raw_tp(void) -- 2.35.1