2 * Copyright 2014 Advanced Micro Devices, Inc.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
34 #include <sys/types.h>
36 #include <sys/ioctl.h>
41 #include <linux/limits.h>
43 /* SPECNAMELEN in FreeBSD is defined here: */
44 #include <sys/param.h>
47 #include <sys/mkdev.h>
49 #ifdef MAJOR_IN_SYSMACROS
50 #include <sys/sysmacros.h>
54 #include "xf86drmMode.h"
57 #include "CUnit/Basic.h"
59 #include "amdgpu_test.h"
60 #include "amdgpu_internal.h"
62 /* Test suite names */
63 #define BASIC_TESTS_STR "Basic Tests"
64 #define BO_TESTS_STR "BO Tests"
65 #define CS_TESTS_STR "CS Tests"
66 #define VCE_TESTS_STR "VCE Tests"
67 #define VCN_TESTS_STR "VCN Tests"
68 #define UVD_ENC_TESTS_STR "UVD ENC Tests"
69 #define DEADLOCK_TESTS_STR "Deadlock Tests"
70 #define VM_TESTS_STR "VM Tests"
71 #define RAS_TESTS_STR "RAS Tests"
72 #define SYNCOBJ_TIMELINE_TESTS_STR "SYNCOBJ TIMELINE Tests"
73 #define SECURITY_TESTS_STR "Security Tests"
74 #define HOTUNPLUG_TESTS_STR "Hotunplug Tests"
77 * Open handles for amdgpu devices
80 int drm_amdgpu
[MAX_CARDS_SUPPORTED
];
82 /** Open render node to test */
83 int open_render_node
= 0; /* By default run most tests on primary node */
85 /** The table of all known test suites to run */
86 static CU_SuiteInfo suites
[] = {
88 .pName
= BASIC_TESTS_STR
,
89 .pInitFunc
= suite_basic_tests_init
,
90 .pCleanupFunc
= suite_basic_tests_clean
,
91 .pTests
= basic_tests
,
94 .pName
= BO_TESTS_STR
,
95 .pInitFunc
= suite_bo_tests_init
,
96 .pCleanupFunc
= suite_bo_tests_clean
,
100 .pName
= CS_TESTS_STR
,
101 .pInitFunc
= suite_cs_tests_init
,
102 .pCleanupFunc
= suite_cs_tests_clean
,
106 .pName
= VCE_TESTS_STR
,
107 .pInitFunc
= suite_vce_tests_init
,
108 .pCleanupFunc
= suite_vce_tests_clean
,
112 .pName
= VCN_TESTS_STR
,
113 .pInitFunc
= suite_vcn_tests_init
,
114 .pCleanupFunc
= suite_vcn_tests_clean
,
118 .pName
= UVD_ENC_TESTS_STR
,
119 .pInitFunc
= suite_uvd_enc_tests_init
,
120 .pCleanupFunc
= suite_uvd_enc_tests_clean
,
121 .pTests
= uvd_enc_tests
,
124 .pName
= DEADLOCK_TESTS_STR
,
125 .pInitFunc
= suite_deadlock_tests_init
,
126 .pCleanupFunc
= suite_deadlock_tests_clean
,
127 .pTests
= deadlock_tests
,
130 .pName
= VM_TESTS_STR
,
131 .pInitFunc
= suite_vm_tests_init
,
132 .pCleanupFunc
= suite_vm_tests_clean
,
136 .pName
= RAS_TESTS_STR
,
137 .pInitFunc
= suite_ras_tests_init
,
138 .pCleanupFunc
= suite_ras_tests_clean
,
142 .pName
= SYNCOBJ_TIMELINE_TESTS_STR
,
143 .pInitFunc
= suite_syncobj_timeline_tests_init
,
144 .pCleanupFunc
= suite_syncobj_timeline_tests_clean
,
145 .pTests
= syncobj_timeline_tests
,
148 .pName
= SECURITY_TESTS_STR
,
149 .pInitFunc
= suite_security_tests_init
,
150 .pCleanupFunc
= suite_security_tests_clean
,
151 .pTests
= security_tests
,
154 .pName
= HOTUNPLUG_TESTS_STR
,
155 .pInitFunc
= suite_hotunplug_tests_init
,
156 .pCleanupFunc
= suite_hotunplug_tests_clean
,
157 .pTests
= hotunplug_tests
,
163 typedef CU_BOOL (*active__stat_func
)(void);
165 typedef struct Suites_Active_Status
{
167 active__stat_func pActive
;
168 }Suites_Active_Status
;
170 static CU_BOOL
always_active()
175 static Suites_Active_Status suites_active_stat
[] = {
177 .pName
= BASIC_TESTS_STR
,
178 .pActive
= suite_basic_tests_enable
,
181 .pName
= BO_TESTS_STR
,
182 .pActive
= always_active
,
185 .pName
= CS_TESTS_STR
,
186 .pActive
= suite_cs_tests_enable
,
189 .pName
= VCE_TESTS_STR
,
190 .pActive
= suite_vce_tests_enable
,
193 .pName
= VCN_TESTS_STR
,
194 .pActive
= suite_vcn_tests_enable
,
197 .pName
= UVD_ENC_TESTS_STR
,
198 .pActive
= suite_uvd_enc_tests_enable
,
201 .pName
= DEADLOCK_TESTS_STR
,
202 .pActive
= suite_deadlock_tests_enable
,
205 .pName
= VM_TESTS_STR
,
206 .pActive
= suite_vm_tests_enable
,
209 .pName
= RAS_TESTS_STR
,
210 .pActive
= suite_ras_tests_enable
,
213 .pName
= SYNCOBJ_TIMELINE_TESTS_STR
,
214 .pActive
= suite_syncobj_timeline_tests_enable
,
217 .pName
= SECURITY_TESTS_STR
,
218 .pActive
= suite_security_tests_enable
,
221 .pName
= HOTUNPLUG_TESTS_STR
,
222 .pActive
= suite_hotunplug_tests_enable
,
228 * Display information about all suites and their tests
230 * NOTE: Must be run after registry is initialized and suites registered.
232 static void display_test_suites(void)
236 CU_pSuite pSuite
= NULL
;
237 CU_pTest pTest
= NULL
;
239 printf("%5s: %2s: %8s: %s\n", "What", "ID", "Status", "Name");
241 for (iSuite
= 0; suites
[iSuite
].pName
!= NULL
; iSuite
++) {
243 pSuite
= CU_get_suite_by_index((unsigned int) iSuite
+ 1,
247 fprintf(stderr
, "Invalid suite id : %d\n", iSuite
+ 1);
251 printf("Suite: %2d: %8s: %s\n",
253 pSuite
->fActive
? "ENABLED" : "DISABLED",
254 suites
[iSuite
].pName
);
256 if (!pSuite
->fActive
)
259 for (iTest
= 0; suites
[iSuite
].pTests
[iTest
].pName
!= NULL
;
261 pTest
= CU_get_test_by_index((unsigned int) iTest
+ 1,
264 fprintf(stderr
, "Invalid test id : %d\n", iTest
+ 1);
267 printf(" Test: %2d: %8s: %s\n",
269 pSuite
->fActive
&& pTest
->fActive
? "ENABLED" : "DISABLED",
270 suites
[iSuite
].pTests
[iTest
].pName
);
275 /** Help string for command line parameters */
276 static const char usage
[] =
277 "Usage: %s [-hlpr] [<-s <suite id>> [-t <test id>] [-f]] "
278 "[-b <pci_bus_id> [-d <pci_device_id>]]\n"
280 " l - Display all suites and their tests\n"
281 " r - Run the tests on render node\n"
282 " b - Specify device's PCI bus id to run tests\n"
283 " d - Specify device's PCI device id to run tests (optional)\n"
284 " p - Display information of AMDGPU devices in system\n"
285 " f - Force executing inactive suite or test\n"
286 " h - Display this help\n";
287 /** Specified options strings for getopt */
288 static const char options
[] = "hlrps:t:b:d:f";
291 * Return the number of AMD device opened.
293 static int amdgpu_open_devices(int open_render_node
)
295 drmDevicePtr devices
[MAX_CARDS_SUPPORTED
];
301 drmVersionPtr version
;
303 drm_count
= drmGetDevices2(0, devices
, MAX_CARDS_SUPPORTED
);
307 "drmGetDevices2() returned an error %d\n",
312 for (i
= 0; i
< drm_count
; i
++) {
313 /* If this is not PCI device, skip*/
314 if (devices
[i
]->bustype
!= DRM_BUS_PCI
)
317 /* If this is not AMD GPU vender ID, skip*/
318 if (devices
[i
]->deviceinfo
.pci
->vendor_id
!= 0x1002)
321 if (open_render_node
)
322 drm_node
= DRM_NODE_RENDER
;
324 drm_node
= DRM_NODE_PRIMARY
;
327 if (devices
[i
]->available_nodes
& 1 << drm_node
)
329 devices
[i
]->nodes
[drm_node
],
332 /* This node is not available. */
333 if (fd
< 0) continue;
335 version
= drmGetVersion(fd
);
338 "Warning: Cannot get version for %s."
340 devices
[i
]->nodes
[drm_node
],
346 if (strcmp(version
->name
, "amdgpu")) {
347 /* This is not AMDGPU driver, skip.*/
348 drmFreeVersion(version
);
353 drmFreeVersion(version
);
355 drm_amdgpu
[amd_index
] = fd
;
359 drmFreeDevices(devices
, drm_count
);
363 /* Close AMD devices.
365 void amdgpu_close_devices()
368 for (i
= 0; i
< MAX_CARDS_SUPPORTED
; i
++)
369 if (drm_amdgpu
[i
] >=0) {
370 close(drm_amdgpu
[i
]);
374 /* Print AMD devices information */
375 static void amdgpu_print_devices()
380 /* Open the first AMD device to print driver information. */
381 if (drm_amdgpu
[0] >=0) {
382 /* Display AMD driver version information.*/
383 drmVersionPtr retval
= drmGetVersion(drm_amdgpu
[0]);
385 if (retval
== NULL
) {
386 perror("Cannot get version for AMDGPU device");
390 printf("Driver name: %s, Date: %s, Description: %s.\n",
391 retval
->name
, retval
->date
, retval
->desc
);
392 drmFreeVersion(retval
);
395 /* Display information of AMD devices */
396 printf("Devices:\n");
397 for (i
= 0; i
< MAX_CARDS_SUPPORTED
&& drm_amdgpu
[i
] >=0; i
++)
398 if (drmGetDevice2(drm_amdgpu
[i
],
399 DRM_DEVICE_GET_PCI_REVISION
,
401 if (device
->bustype
== DRM_BUS_PCI
) {
403 printf(" domain:%04x",
404 device
->businfo
.pci
->domain
);
406 device
->businfo
.pci
->bus
);
407 printf(" device:%02x",
408 device
->businfo
.pci
->dev
);
409 printf(" function:%01x",
410 device
->businfo
.pci
->func
);
411 printf(" vendor_id:%04x",
412 device
->deviceinfo
.pci
->vendor_id
);
413 printf(" device_id:%04x",
414 device
->deviceinfo
.pci
->device_id
);
415 printf(" subvendor_id:%04x",
416 device
->deviceinfo
.pci
->subvendor_id
);
417 printf(" subdevice_id:%04x",
418 device
->deviceinfo
.pci
->subdevice_id
);
419 printf(" revision_id:%02x",
420 device
->deviceinfo
.pci
->revision_id
);
423 drmFreeDevice(&device
);
427 /* Find a match AMD device in PCI bus
428 * Return the index of the device or -1 if not found
430 static int amdgpu_find_device(uint8_t bus
, uint16_t dev
)
435 for (i
= 0; i
< MAX_CARDS_SUPPORTED
&& drm_amdgpu
[i
] >= 0; i
++) {
436 if (drmGetDevice2(drm_amdgpu
[i
],
437 DRM_DEVICE_GET_PCI_REVISION
,
439 if (device
->bustype
== DRM_BUS_PCI
)
440 if ((bus
== 0xFF || device
->businfo
.pci
->bus
== bus
) &&
441 device
->deviceinfo
.pci
->device_id
== dev
) {
442 drmFreeDevice(&device
);
446 drmFreeDevice(&device
);
453 static void amdgpu_disable_suites()
455 amdgpu_device_handle device_handle
;
456 uint32_t major_version
, minor_version
, family_id
;
457 drmDevicePtr devices
[MAX_CARDS_SUPPORTED
];
459 int size
= sizeof(suites_active_stat
) / sizeof(suites_active_stat
[0]);
461 if (amdgpu_device_initialize(drm_amdgpu
[0], &major_version
,
462 &minor_version
, &device_handle
))
465 family_id
= device_handle
->info
.family_id
;
467 if (amdgpu_device_deinitialize(device_handle
))
470 drm_count
= drmGetDevices2(0, devices
, MAX_CARDS_SUPPORTED
);
472 /* Set active status for suites based on their policies */
473 for (i
= 0; i
< size
; ++i
)
474 if (amdgpu_set_suite_active(suites_active_stat
[i
].pName
,
475 suites_active_stat
[i
].pActive()))
476 fprintf(stderr
, "suite deactivation failed - %s\n", CU_get_error_msg());
478 /* Explicitly disable specific tests due to known bugs or preferences */
480 * BUG: Compute ring stalls and never recovers when the address is
481 * written after the command already submitted
483 if (amdgpu_set_test_active(DEADLOCK_TESTS_STR
,
484 "compute ring block test (set amdgpu.lockup_timeout=50)", CU_FALSE
))
485 fprintf(stderr
, "test deactivation failed - %s\n", CU_get_error_msg());
487 if (amdgpu_set_test_active(DEADLOCK_TESTS_STR
,
488 "sdma ring block test (set amdgpu.lockup_timeout=50)", CU_FALSE
))
489 fprintf(stderr
, "test deactivation failed - %s\n", CU_get_error_msg());
491 /* This test was ran on GFX9 only */
492 //if (family_id < AMDGPU_FAMILY_AI || family_id > AMDGPU_FAMILY_RV)
493 if (amdgpu_set_test_active(DEADLOCK_TESTS_STR
,
494 "gfx ring bad dispatch test (set amdgpu.lockup_timeout=50)", CU_FALSE
))
495 fprintf(stderr
, "test deactivation failed - %s\n", CU_get_error_msg());
497 /* This test was ran on GFX9 only */
498 //if (family_id < AMDGPU_FAMILY_AI || family_id > AMDGPU_FAMILY_RV)
499 if (amdgpu_set_test_active(DEADLOCK_TESTS_STR
,
500 "compute ring bad dispatch test (set amdgpu.lockup_timeout=50,50)", CU_FALSE
))
501 fprintf(stderr
, "test deactivation failed - %s\n", CU_get_error_msg());
503 /* This test was ran on GFX9 only */
504 //if (family_id < AMDGPU_FAMILY_AI || family_id > AMDGPU_FAMILY_RV)
505 if (amdgpu_set_test_active(DEADLOCK_TESTS_STR
,
506 "gfx ring bad slow dispatch test (set amdgpu.lockup_timeout=50)", CU_FALSE
))
507 fprintf(stderr
, "test deactivation failed - %s\n", CU_get_error_msg());
509 /* This test was ran on GFX9 only */
510 //if (family_id < AMDGPU_FAMILY_AI || family_id > AMDGPU_FAMILY_RV)
511 if (amdgpu_set_test_active(DEADLOCK_TESTS_STR
,
512 "compute ring bad slow dispatch test (set amdgpu.lockup_timeout=50,50)", CU_FALSE
))
513 fprintf(stderr
, "test deactivation failed - %s\n", CU_get_error_msg());
515 //if (family_id < AMDGPU_FAMILY_AI || family_id > AMDGPU_FAMILY_RV)
516 if (amdgpu_set_test_active(DEADLOCK_TESTS_STR
,
517 "gfx ring bad draw test (set amdgpu.lockup_timeout=50)", CU_FALSE
))
518 fprintf(stderr
, "test deactivation failed - %s\n", CU_get_error_msg());
520 /* This test was ran on GFX9 only */
521 //if (family_id < AMDGPU_FAMILY_AI || family_id > AMDGPU_FAMILY_RV)
522 if (amdgpu_set_test_active(DEADLOCK_TESTS_STR
,
523 "gfx ring slow bad draw test (set amdgpu.lockup_timeout=50)", CU_FALSE
))
524 fprintf(stderr
, "test deactivation failed - %s\n", CU_get_error_msg());
526 if (amdgpu_set_test_active(BASIC_TESTS_STR
, "bo eviction Test", CU_FALSE
))
527 fprintf(stderr
, "test deactivation failed - %s\n", CU_get_error_msg());
529 /* This test was ran on GFX8 and GFX9 only */
530 if (family_id
< AMDGPU_FAMILY_VI
|| family_id
> AMDGPU_FAMILY_RV
)
531 if (amdgpu_set_test_active(BASIC_TESTS_STR
, "Sync dependency Test", CU_FALSE
))
532 fprintf(stderr
, "test deactivation failed - %s\n", CU_get_error_msg());
534 /* This test was ran on GFX9 only */
535 if (family_id
< AMDGPU_FAMILY_AI
|| family_id
> AMDGPU_FAMILY_RV
) {
536 if (amdgpu_set_test_active(BASIC_TESTS_STR
, "Dispatch Test (GFX)", CU_FALSE
))
537 fprintf(stderr
, "test deactivation failed - %s\n", CU_get_error_msg());
538 if (amdgpu_set_test_active(BASIC_TESTS_STR
, "Dispatch Test (Compute)", CU_FALSE
))
539 fprintf(stderr
, "test deactivation failed - %s\n", CU_get_error_msg());
542 /* This test was ran on GFX9 only */
543 if (family_id
< AMDGPU_FAMILY_AI
|| family_id
> AMDGPU_FAMILY_RV
)
544 if (amdgpu_set_test_active(BASIC_TESTS_STR
, "Draw Test", CU_FALSE
))
545 fprintf(stderr
, "test deactivation failed - %s\n", CU_get_error_msg());
547 /* This test was ran on GFX9 only */
548 //if (family_id < AMDGPU_FAMILY_AI || family_id > AMDGPU_FAMILY_RV)
549 if (amdgpu_set_test_active(BASIC_TESTS_STR
, "GPU reset Test", CU_FALSE
))
550 fprintf(stderr
, "test deactivation failed - %s\n", CU_get_error_msg());
552 /* You need at least 2 devices for this */
554 if (amdgpu_set_test_active(HOTUNPLUG_TESTS_STR
, "Unplug with exported fence", CU_FALSE
))
555 fprintf(stderr
, "test deactivation failed - %s\n", CU_get_error_msg());
558 int test_device_index
;
560 int amdgpu_open_device_on_test_index(int render_node
)
564 if (amdgpu_open_devices(open_render_node
) <= 0) {
565 perror("Cannot open AMDGPU device");
569 if (test_device_index
>= 0) {
570 /* Most tests run on device of drm_amdgpu[0].
571 * Swap the chosen device to drm_amdgpu[0].
574 drm_amdgpu
[0] = drm_amdgpu
[test_device_index
];
575 drm_amdgpu
[test_device_index
] = i
;
584 static bool amdgpu_node_is_drm(int maj
, int min
)
590 snprintf(path
, sizeof(path
), "/sys/dev/char/%d:%d/device/drm",
592 return stat(path
, &sbuf
) == 0;
593 #elif defined(__FreeBSD__)
594 char name
[SPECNAMELEN
];
596 if (!devname_r(makedev(maj
, min
), S_IFCHR
, name
, sizeof(name
)))
598 /* Handle drm/ and dri/ as both are present in different FreeBSD version
599 * FreeBSD on amd64/i386/powerpc external kernel modules create node in
600 * in /dev/drm/ and links in /dev/dri while a WIP in kernel driver creates
601 * only device nodes in /dev/dri/ */
602 return (!strncmp(name
, "drm/", 4) || !strncmp(name
, "dri/", 4));
604 return maj
== DRM_MAJOR
;
608 char *amdgpu_get_device_from_fd(int fd
)
612 char path
[PATH_MAX
+ 1];
613 unsigned int maj
, min
;
615 if (fstat(fd
, &sbuf
))
618 maj
= major(sbuf
.st_rdev
);
619 min
= minor(sbuf
.st_rdev
);
621 if (!amdgpu_node_is_drm(maj
, min
) || !S_ISCHR(sbuf
.st_mode
))
624 snprintf(path
, sizeof(path
), "/sys/dev/char/%d:%d/device", maj
, min
);
631 /* The main() function for setting up and running the tests.
632 * Returns a CUE_SUCCESS on successful running, another
633 * CUnit error code on failure.
635 int main(int argc
, char **argv
)
637 int c
; /* Character received from getopt */
639 int suite_id
= -1; /* By default run everything */
640 int test_id
= -1; /* By default run all tests in the suite */
641 int pci_bus_id
= -1; /* By default PC bus ID is not specified */
642 int pci_device_id
= 0; /* By default PC device ID is zero */
643 int display_devices
= 0;/* By default not to display devices' info */
644 CU_pSuite pSuite
= NULL
;
645 CU_pTest pTest
= NULL
;
646 int display_list
= 0;
649 for (i
= 0; i
< MAX_CARDS_SUPPORTED
; i
++)
653 /* Parse command line string */
654 opterr
= 0; /* Do not print error messages from getopt */
655 while ((c
= getopt(argc
, argv
, options
)) != -1) {
661 suite_id
= atoi(optarg
);
664 test_id
= atoi(optarg
);
667 pci_bus_id
= atoi(optarg
);
670 sscanf(optarg
, "%x", &pci_device_id
);
676 open_render_node
= 1;
683 fprintf(stderr
, usage
, argv
[0]);
686 fprintf(stderr
, usage
, argv
[0]);
691 if (amdgpu_open_devices(open_render_node
) <= 0) {
692 perror("Cannot open AMDGPU device");
696 if (drm_amdgpu
[0] < 0) {
697 perror("Cannot open AMDGPU device");
701 if (display_devices
) {
702 amdgpu_print_devices();
703 amdgpu_close_devices();
707 if (pci_bus_id
> 0 || pci_device_id
) {
708 /* A device was specified to run the test */
709 test_device_index
= amdgpu_find_device(pci_bus_id
,
712 if (test_device_index
>= 0) {
713 /* Most tests run on device of drm_amdgpu[0].
714 * Swap the chosen device to drm_amdgpu[0].
717 drm_amdgpu
[0] = drm_amdgpu
[test_device_index
];
718 drm_amdgpu
[test_device_index
] = i
;
721 "The specified GPU device does not exist.\n");
726 /* Initialize test suites to run */
728 /* initialize the CUnit test registry */
729 if (CUE_SUCCESS
!= CU_initialize_registry()) {
730 amdgpu_close_devices();
731 return CU_get_error();
734 /* Register suites. */
735 if (CU_register_suites(suites
) != CUE_SUCCESS
) {
736 fprintf(stderr
, "suite registration failed - %s\n",
738 CU_cleanup_registry();
739 amdgpu_close_devices();
743 /* Run tests using the CUnit Basic interface */
744 CU_basic_set_mode(CU_BRM_VERBOSE
);
746 /* Disable suites and individual tests based on misc. conditions */
747 amdgpu_disable_suites();
750 display_test_suites();
754 if (suite_id
!= -1) { /* If user specify particular suite? */
755 pSuite
= CU_get_suite_by_index((unsigned int) suite_id
,
761 CU_set_suite_active(pSuite
, CU_TRUE
);
763 if (test_id
!= -1) { /* If user specify test id */
764 pTest
= CU_get_test_by_index(
765 (unsigned int) test_id
,
769 CU_set_test_active(pTest
, CU_TRUE
);
771 CU_basic_run_test(pSuite
, pTest
);
774 fprintf(stderr
, "Invalid test id: %d\n",
776 CU_cleanup_registry();
777 amdgpu_close_devices();
781 CU_basic_run_suite(pSuite
);
783 fprintf(stderr
, "Invalid suite id : %d\n",
785 CU_cleanup_registry();
786 amdgpu_close_devices();
790 CU_basic_run_tests();
793 CU_cleanup_registry();
794 amdgpu_close_devices();
795 return CU_get_error();