Fix two tests in test_gdb.
ClosedPublic

Authored by arrowd on Jul 29 2018, 7:50 PM.

Details

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
arrowd created this revision.Jul 29 2018, 7:50 PM
Restricted Application added a project: KDevelop. · View Herald TranscriptJul 29 2018, 7:50 PM
Restricted Application added a subscriber: kdevelop-devel. · View Herald Transcript
arrowd requested review of this revision.Jul 29 2018, 7:50 PM

RE line 960.

What does QCOMPARE(stackModel->rowCount(), 4); actually check? I added printing for stackModel and running test multiple times gives me different results:

QDEBUG : KDevMI::GDB::GdbTest::testStackSwitchThread() "#1 at main"
QDEBUG : KDevMI::GDB::GdbTest::testStackSwitchThread() "#2 at base_block_alloc"
QDEBUG : KDevMI::GDB::GdbTest::testStackSwitchThread() "#3 at check_and_init_mutex"
QDEBUG : KDevMI::GDB::GdbTest::testStackSwitchThread() "#1 at main"
QDEBUG : KDevMI::GDB::GdbTest::testStackSwitchThread() "#2 at malloc_mutex_unlock"
QDEBUG : KDevMI::GDB::GdbTest::testStackSwitchThread() "#3 at __pthread_mutex_trylock"
QDEBUG : KDevMI::GDB::GdbTest::testStackSwitchThread() "#4 at thread_start"
QDEBUG : KDevMI::GDB::GdbTest::testStackSwitchThread() "#1 at main"
QDEBUG : KDevMI::GDB::GdbTest::testStackSwitchThread() "#2 at arena_stats_init"
QDEBUG : KDevMI::GDB::GdbTest::testStackSwitchThread() "#3 at malloc_mutex_trylock_final"

This looks pretty system-specific, so I decided to just check that we have more that 2 rows, because the test uses first and second row for checks.

apol accepted this revision.Jul 30 2018, 12:06 AM
This revision is now accepted and ready to land.Jul 30 2018, 12:06 AM
This revision was automatically updated to reflect the committed changes.