Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2351957imm; Mon, 28 May 2018 06:33:44 -0700 (PDT) X-Google-Smtp-Source: AB8JxZraXZ7uHxo+LbJQ6tnb/qTBhDMzP9w8ztbmtcj3ylDbkVzNjTA1WYi7wdTGeNv1v86qW+X6 X-Received: by 2002:a62:18d6:: with SMTP id 205-v6mr13566897pfy.242.1527514424124; Mon, 28 May 2018 06:33:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527514424; cv=none; d=google.com; s=arc-20160816; b=G+l3irkosuGT3OoNhOkVz8fDLCgthEhk5uR8LiTA+mQH5i4SGmr6tUHDaqJavUztCw A9g6j7EdULenEU/AMVJrE0qOFLDbg0aXrTl9a+vOjzbJAnTgRW7RKCvhzOqA3TS0FTfn uAs9piKL2zGDpfkdf3+Khv7NAZqI+hnJZ/ITQjmqEelMRjUnhKYOK55LRuy+/RX+aMRq 9mHbz3JbtZTaQ/PVOoCdJAcSJJ8Qmp61PoIDGS6LTDFImq2MAPEp8K3nEa/nQjj3RXrz loJSRMnQ2hTqkGApRun1sZPDgf9oOTrR1C4nfJkPaUKU4W1n+wn74uvxMnmmVvxb7Uy5 tNqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=7NIe4m+Tkr3y5JeYJRjF0M8YdbV6HqwjxyFORhXSPmc=; b=OnK5yWv8tqS9M9UO7SoTvn9BM4PCDVl4RyQoMmHjwyr4oDBSLN5XbuGBVT+Bcic7XB qlijcAVAkmkcaOQ8xKWZGJnUy9HWWQNv3tywy86ZBq3stsgmJoreC/WKbGxSueTP5cHU ej5m1k85SZ/Q34M/XIX8vBtDA3MVE1ik/HhajFUbtJL3i6uZVTdAwk3Bgbm32sN5gIQ1 OunuGVnIhqoYLCxnp28HIFzw1JMNJ/GUY7lwohaUIsuKVOPYQaztkvKMgSR267wp0/jT ZUJRx+7xrsrXZTWah7wX4LNIL55gT6jNGtUU8GZgrLsWC7ucBN+PiyICu58K7QJ4pTQK rUog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Lmh+F5NL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si29870727ply.226.2018.05.28.06.33.29; Mon, 28 May 2018 06:33:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Lmh+F5NL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1163157AbeE1Kqm (ORCPT + 99 others); Mon, 28 May 2018 06:46:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:36764 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163105AbeE1Kqa (ORCPT ); Mon, 28 May 2018 06:46:30 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (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 56AA8204EE; Mon, 28 May 2018 10:46:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527504389; bh=LKx5tSaGyyYryOGu9LQHBJ2VR0fZq3jYNS78QISgQGk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Lmh+F5NLKkg491rC/x+9y5v11MVe48sE5LERm8WVCClnSOVEadRLRuvDAe2rR4+T+ 6ksvLU6LpXrsAzVDGI2PqN0AxGx1rxwXnQKZG4pea9euuYPnKQ0OfeQJO/qFGkK3er 5v4D3e1HQpKsrhkiYfFXKYKvNWxn7bwajWqNpr/E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexei Starovoitov , Philip Li , Daniel Borkmann , Li Zhijian , Sasha Levin Subject: [PATCH 4.14 121/496] selftests/bpf/test_maps: exit child process without error in ENOMEM case Date: Mon, 28 May 2018 11:58:26 +0200 Message-Id: <20180528100325.019798906@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100319.498712256@linuxfoundation.org> References: <20180528100319.498712256@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Li Zhijian [ Upstream commit 80475c48c6a8a65171e035e0915dc7996b5a0a65 ] test_maps contains a series of stress tests, and previously it will break the rest tests when it failed to alloc memory. ----------------------- Failed to create hashmap key=8 value=262144 'Cannot allocate memory' Failed to create hashmap key=16 value=262144 'Cannot allocate memory' Failed to create hashmap key=8 value=262144 'Cannot allocate memory' Failed to create hashmap key=8 value=262144 'Cannot allocate memory' test_maps: test_maps.c:955: run_parallel: Assertion `status == 0' failed. Aborted not ok 1..3 selftests: test_maps [FAIL] ----------------------- after this patch, the rest tests will be continue when it occurs an ENOMEM failure CC: Alexei Starovoitov CC: Philip Li Suggested-by: Daniel Borkmann Signed-off-by: Li Zhijian Signed-off-by: Daniel Borkmann Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- tools/testing/selftests/bpf/test_maps.c | 2 ++ 1 file changed, 2 insertions(+) --- a/tools/testing/selftests/bpf/test_maps.c +++ b/tools/testing/selftests/bpf/test_maps.c @@ -126,6 +126,8 @@ static void test_hashmap_sizes(int task, fd = bpf_create_map(BPF_MAP_TYPE_HASH, i, j, 2, map_flags); if (fd < 0) { + if (errno == ENOMEM) + return; printf("Failed to create hashmap key=%d value=%d '%s'\n", i, j, strerror(errno)); exit(1);