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=-9.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 58C9AC072B1 for ; Thu, 30 May 2019 03:40:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2DFEE24BA4 for ; Thu, 30 May 2019 03:40:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559187604; bh=7uK9JClRjBpcmWQyTcy+7AOYcOvd9/bhbDUILfDQj0s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=F1RDQKB691T4qOlopsaNBPu2e7UG2Ix5wfgHXVob3NjhfpnWgXHiy4FZhwOmugQta SOKKqGcm82C0RIhjZ27PP8XUUt0lAbrcrVCkDIL0k/kr1MJBgVjyaQtk3QNX3e3HMv iYTTv9yDzjWV1KitUqBsUeUxnd+1fpyd4m5oRpaw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731875AbfE3DVf (ORCPT ); Wed, 29 May 2019 23:21:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:42512 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730666AbfE3DQZ (ORCPT ); Wed, 29 May 2019 23:16:25 -0400 Received: from localhost (ip67-88-213-2.z213-88-67.customer.algx.net [67.88.213.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B1E68245AC; Thu, 30 May 2019 03:16:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559186184; bh=7uK9JClRjBpcmWQyTcy+7AOYcOvd9/bhbDUILfDQj0s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r9CSvoFfkb7AzVS3IiqYWGDBl2L+BvLCix+F+kr3Owxy9mD2muquecwN5suod+Aww 41BF2g41+oVxejgJKfeakmmS02TXErV+z/8YkirEQCfjVmcvQxY/MYUvEyFewDPMOc P0kye5fbA8hyEnDEddKvnyKfyKLlFOoriTMDObNY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yonghong Song , Alexei Starovoitov , Sasha Levin Subject: [PATCH 4.19 051/276] selftests/bpf: set RLIMIT_MEMLOCK properly for test_libbpf_open.c Date: Wed, 29 May 2019 20:03:29 -0700 Message-Id: <20190530030528.215407626@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190530030523.133519668@linuxfoundation.org> References: <20190530030523.133519668@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 6cea33701eb024bc6c920ab83940ee22afd29139 ] Test test_libbpf.sh failed on my development server with failure -bash-4.4$ sudo ./test_libbpf.sh [0] libbpf: Error in bpf_object__probe_name():Operation not permitted(1). Couldn't load basic 'r0 = 0' BPF program. test_libbpf: failed at file test_l4lb.o selftests: test_libbpf [FAILED] -bash-4.4$ The reason is because my machine has 64KB locked memory by default which is not enough for this program to get locked memory. Similar to other bpf selftests, let us increase RLIMIT_MEMLOCK to infinity, which fixed the issue. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Signed-off-by: Sasha Levin --- tools/testing/selftests/bpf/test_libbpf_open.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/bpf/test_libbpf_open.c b/tools/testing/selftests/bpf/test_libbpf_open.c index 8fcd1c076add0..cbd55f5f8d598 100644 --- a/tools/testing/selftests/bpf/test_libbpf_open.c +++ b/tools/testing/selftests/bpf/test_libbpf_open.c @@ -11,6 +11,8 @@ static const char *__doc__ = #include #include +#include "bpf_rlimit.h" + static const struct option long_options[] = { {"help", no_argument, NULL, 'h' }, {"debug", no_argument, NULL, 'D' }, -- 2.20.1