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
You need to sign in or sign up before continuing.
  • linux
  • lib
  • kunit
  • assert.c
Find file BlameHistoryPermalink
  • Rae Moar's avatar
    kunit: fix bug in KUNIT_EXPECT_MEMEQ · dd2f0a0a
    Rae Moar authored Jan 27, 2023
    In KUNIT_EXPECT_MEMEQ and KUNIT_EXPECT_MEMNEQ, add check if one of the
    inputs is NULL and fail if this is the case.
    
    Currently, the kernel crashes if one of the inputs is NULL. Instead,
    fail the test and add an appropriate error message.
    
    Fixes: b8a926be ("kunit: Introduce KUNIT_EXPECT_MEMEQ and KUNIT_EXPECT_MEMNEQ macros")
    
    This was found by the kernel test robot:
    https://lore.kernel.org/all/202212191448.D6EDPdOh-lkp@intel.com/
    
    
    
    Reported-by: default avatarkernel test robot <lkp@intel.com>
    
    Signed-off-by: default avatarRae Moar <rmoar@google.com>
    Reviewed-by: default avatarDavid Gow <davidgow@google.com>
    Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
    dd2f0a0a
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7