Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • tools
  • testing
  • selftests
  • bpf
  • prog_tests
  • stacktrace_map.c
Find file BlameHistoryPermalink
  • Andrii Nakryiko's avatar
    selftests/bpf: Turn on libbpf 1.0 mode and fix all IS_ERR checks · bad2e478
    Andrii Nakryiko authored May 24, 2021
    
    
    Turn ony libbpf 1.0 mode. Fix all the explicit IS_ERR checks that now will be
    broken because libbpf returns NULL on error (and sets errno). Fix
    ASSERT_OK_PTR and ASSERT_ERR_PTR to work for both old mode and new modes and
    use them throughout selftests. This is trivial to do by using
    libbpf_get_error() API that all libbpf users are supposed to use, instead of
    IS_ERR checks.
    
    A bunch of checks also did explicit -1 comparison for various fd-returning
    APIs. Such checks are replaced with >= 0 or < 0 cases.
    
    There were also few misuses of bpf_object__find_map_by_name() in test_maps.
    Those are fixed in this patch as well.
    
    Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
    Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
    Acked-by: default avatarJohn Fastabend <john.fastabend@gmail.com>
    Acked-by: default avatarToke Høiland-Jørgensen <toke@redhat.com>
    Link: https://lore.kernel.org/bpf/20210525035935.1461796-3-andrii@kernel.org
    bad2e478
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7