Uploaded image for project: ' AGL Development'
  1. AGL Development
  2. SPEC-3996

i.MX8: Segmentation fault while testing radar service codebase using googletest framework

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Won't Fix
    • Icon: Major Major
    • None
    • None
    • None
    • None
    • NXP i.MX6

      Hi Jose,
       
      Thanks!
       
      I am doing unit testing of radar service codebase using googletest framework & check tool. Written the test for calling radar service preinit & init API's which has argument of type "afb_api_t".
      In the test, i took one global variable of type "afb_api_t" & passing that for service preinit & init API's. while running test it is showing segmentation fault error.
      Tried to debug with gdb, it's receiving SIGSEGV.
      while searching, i couldn't found elements of afb_api_t structure. So, not sure what values in "afb_api_t" variable to be pass in the service preinit & init API's to make the test work properly.
      Here are the logs below:
       
      [==========] Running 1 test from 1 test suite.
      [----------] Global test environment set-up.
      [----------] 1 test from radar_service
      [ RUN      ] radar_service.ok
      Segmentation fault (core dumped)
      imx8mqevk:/home# gdb ./gtest_out
      GNU gdb (GDB) 9.1
      Copyright (C) 2020 Free Software Foundation, Inc.
      License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
      Type "show copying" and "show warranty" for details.
      This GDB was configured as "aarch64-agl-linux".
      Type "show configuration" for configuration details.
      For bug reporting instructions, please see:
      <http://www.gnu.org/software/gdb/bugs/>.
      Find the GDB manual and other documentation resources online at:
          <http://www.gnu.org/software/gdb/documentation/>.

      For help, type "help".
      Type "apropos word" to search for commands related to "word"...
      Reading symbols from ./gtest_out...
      (gdb) r
      Starting program: /home/gtest_out
      [Thread debugging using libthread_db enabled]
      Using host libthread_db library "/lib/libthread_db.so.1".
      [==========] Running 1 test from 1 test suite.
      [----------] Global test environment set-up.
      [----------] 1 test from radar_service
      [ RUN      ] radar_service.ok

      Program received signal SIGSEGV, Segmentation fault.
      0x0000aaaaaaab4e5c in afb_api_wants_log_level ()
       
      Note:- Same issue facing with API which has argument afb_req_t.
       
      Can you please suggest something on this?

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            jobol-iot jose bollo
            vsuneja63 vipul kumar
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: