From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 078E7C12002 for ; Wed, 21 Jul 2021 14:08:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E207A6124C for ; Wed, 21 Jul 2021 14:08:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237556AbhGUN1W (ORCPT ); Wed, 21 Jul 2021 09:27:22 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:36947 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237966AbhGUN1W (ORCPT ); Wed, 21 Jul 2021 09:27:22 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 7A97A5C0180; Wed, 21 Jul 2021 10:07:58 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 21 Jul 2021 10:07:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=X+kxKKorTwnhM1KRH 4GRU37BfUAFlQFSCjr16g94J44=; b=O1lBi+xPGl2iLCK5TtLiNrm28pnkv6RUs aY6waW3V8P84uTBpVM03eR0qkZuPa83objJCS7th7PyS/2J6JZwQBc5yb/jyBcWF ctfO8XNUK5r8G0i00+R+8mFekPuLZG7UkMog6P2Foys+0JqZ7zwvzpmfJzIq43NM hk2ZZ1DvHbIm5NlYw/PnCJfZkz7WNZxirNBfeVlU7ksturNNZWHs5TXYJfpQTo+g FU/ZTiQfb19G+9mjkCi76eLeJMruYBHf8QHcm6Vvdq3vPyC0n7gI6d52qqVEnUSn Djutn+DJOQLBxPiC4/yAxD5q2bQAQapntAlS8Z7KOcl8kigbFjDMg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrfeeggdeiiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffoggfgsedtkeertdertd dtnecuhfhrohhmpeforghrthihnhgrshcurfhumhhpuhhtihhsuceomheslhgrmhgsuggr rdhltheqnecuggftrfgrthhtvghrnhepuefhfedvheelieduhedvveeiffdtleehieduue ehjeejtdekuddvtdffheeuleejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm pehmrghilhhfrhhomhepmheslhgrmhgsuggrrdhlth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 21 Jul 2021 10:07:55 -0400 (EDT) From: Martynas Pumputis To: bpf@vger.kernel.org Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, m@lambda.lt Subject: [PATCH bpf-next] selftests/bpf: Mute expected invalid map creation error msg Date: Wed, 21 Jul 2021 16:09:41 +0200 Message-Id: <20210721140941.563175-1-m@lambda.lt> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org Previously, the newly introduced test case in test_map_in_map(), which checks whether the inner map is destroyed after unsuccessful creation of the outer map, logged the following harmless and expected error: libbpf: map 'mim': failed to create: Invalid argument(-22) libbpf: failed to load object './test_map_in_map_invalid.o' To avoid any possible confusion, mute the logging during loading of the prog. Fixes: 08f71a1e39a1 ("selftests/bpf: Check inner map deletion") Reported-by: Andrii Nakryiko Signed-off-by: Martynas Pumputis --- tools/testing/selftests/bpf/test_maps.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/testing/selftests/bpf/test_maps.c b/tools/testing/selftests/bpf/test_maps.c index 5a8e069e64fa..14cea869235b 100644 --- a/tools/testing/selftests/bpf/test_maps.c +++ b/tools/testing/selftests/bpf/test_maps.c @@ -1163,6 +1163,7 @@ static void test_map_in_map(void) struct bpf_map_info info = {}; __u32 len = sizeof(info); __u32 id = 0; + libbpf_print_fn_t old_print_fn; obj = bpf_object__open(MAPINMAP_PROG); @@ -1250,12 +1251,16 @@ static void test_map_in_map(void) goto out_map_in_map; } + old_print_fn = libbpf_set_print(NULL); + err = bpf_object__load(obj); if (!err) { printf("Loading obj supposed to fail\n"); goto out_map_in_map; } + libbpf_set_print(old_print_fn); + /* Iterate over all maps to check whether the internal map * ("mim.internal") has been destroyed. */ -- 2.32.0