selftests: bpf: test_sockmap: handle file creation failures gracefully
authorJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 27 Nov 2019 20:16:45 +0000 (12:16 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 Nov 2019 06:40:29 +0000 (22:40 -0800)
commit4b67c515036313f3c3ecba3cb2babb9cbddb3f85
tree1c65cc52ee48a877be23fcc2203cfef98fca3fd8
parentc5daa6cccdc2f94aca2c9b3fa5f94e4469997293
selftests: bpf: test_sockmap: handle file creation failures gracefully

test_sockmap creates a temporary file to use for sendpage.
this may fail for various reasons. Handle the error rather
than segfault.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/bpf/test_sockmap.c