]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
selftests/bpf/test_maps: exit child process without error in ENOMEM case
authorLi Zhijian <zhijianx.li@intel.com>
Thu, 22 Feb 2018 02:34:02 +0000 (10:34 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 27 Aug 2018 14:40:05 +0000 (16:40 +0200)
commit82492597c54183978aecbaa3ca5fbf3137fdf6fa
tree9e59b4a732a676626fae872276f1313f5cb722c6
parent24d882432e726e723785516a01dc64fe8182c35e
selftests/bpf/test_maps: exit child process without error in ENOMEM case

BugLink: http://bugs.launchpad.net/bugs/1786352
[ 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 <alexei.starovoitov@gmail.com>
CC: Philip Li <philip.li@intel.com>
Suggested-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Li Zhijian <zhijianx.li@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
tools/testing/selftests/bpf/test_maps.c