Uploaded image for project: 'Qt Quality Assurance Infrastructure'
  1. Qt Quality Assurance Infrastructure
  2. QTQAINFRA-879

Crashing tests should be rerun under the debugger

    XMLWordPrintable

Details

    Description

      testrunner.pl can already detect abnormal exit on both Windows and Unix (check_abnormal_exit_win32 and check_abnormal_exit). If that happens, the test should be rerun inside the debugger to capture more information.

      On Linux and on MinGW systems, the command-line should be:

      gdb -nh -batch -x $COMMANDSFILE --args $TESTEXECUTABLE args...

      And the commands file I recommend to be:

      set print static-members off
      run
      echo \n=== Register dump ===\n
      info all-reg
      echo \n=== Stack trace (all threads) ===\n
      thread apply all bt -50
      echo \n=== Stack trace (detailed) ===\n
      bt full -20
      quit 1
      

      If the program actually succeeds in running, "info all-reg" will cause gdb to error and it will exit with code 0.

      For Mac, it might not be necessary since we already have the crash reporter.

      For Visual Studio, we need first to find cdb.exe, which should be in $WINDOWSSDKDIR/Debuggers/$ARCH/cdb.exe (ARCH is either x86 or x64).

      The command-line would be:

      cdb.exe -g -G -cf $COMMANDSFILE $TESTEXECUTABLE args...

      Where the commands should be:

      .lines
      r
      ~* kp c
      !for_each_frame x
      q
      

      Attachments

        1. cdb-output.txt
          12 kB
        2. gdb-output.txt
          18 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tosaraja Tony Sarajärvi
            thiago Thiago Macieira
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes