This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] [OMPD] [6/6] Implementation of OMPD debugging library - libompd. libompd-tests: Testcases for libompd

Authored by Vigneshbalu on Apr 9 2021, 5:28 AM.



This is part of the review:
Testcase for libompd.

Diff Detail

Event Timeline

Vigneshbalu created this revision.Apr 9 2021, 5:28 AM
Vigneshbalu requested review of this revision.Apr 9 2021, 5:28 AM
Herald added a project: Restricted Project. · View Herald Transcript
Vigneshbalu changed the visibility from "Public (No Login Required)" to "Vigneshbalu (Vignesh Balasubramanian)".Apr 9 2021, 7:56 AM
Vigneshbalu changed the visibility from "Vigneshbalu (Vignesh Balasubramanian)" to "Public (No Login Required)".Apr 11 2021, 9:48 AM

Addressed clang-tidy warnings.

Resolving clang-tidy warnings

Rebasing the patch.

Rebasing the patch.

Looks good to me.

Herald added a project: Restricted Project. · View Herald TranscriptJul 6 2022, 5:47 AM
jdoerfert accepted this revision.Aug 31 2022, 7:19 AM

Looks good to me.

Deepak approved ^

This revision is now accepted and ready to land.Aug 31 2022, 7:19 AM
jolanta.jensen added inline comments.Jan 19 2023, 8:59 AM

These check lines do not catch OMPD module initialization failure, i.e. below output is regarded as correct one by the test:

GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
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-redhat-linux-gnu".
For bug reporting instructions, please see:
Reading symbols from openmp/libompd/test/api_tests/Output/test_ompd_device_initialize.c.tmp...done.
Traceback (most recent call last):
  File "openmp/libompd/test/../gdb-plugin/python-module/ompd/", line 9, in <module>
    import ompd
  File "openmp/libompd/test/../gdb-plugin/python-module/ompd/", line 1, in <module>
    import ompdModule
ImportError: dynamic module does not define init function (initompdModule)
('Error: OMPD support could not be loaded', ImportError('dynamic module does not define init function (initompdModule)',))
openmp/libompd/test/api_tests/test_ompd_device_initialize.c.cmd:1: Error in sourced command file:
Undefined command: "ompd".  Try "help".
(gdb) quit

Only two of the tests added in this patch will fail if the OMPD module fails initialization, the other ones will pass.