builtin-test.c (c76ec1cf25d5240ded2e17384101890ff46b8797) | builtin-test.c (848ddf5999d224050f6cde8c165630fd7671085f) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * builtin-test.c 4 * 5 * Builtin regression testing command: ever growing number of sanity tests 6 */ 7#include <fcntl.h> 8#include <errno.h> --- 136 unchanged lines hidden (view full) --- 145static const char *test_description(const struct test_suite *t, int subtest) 146{ 147 if (t->test_cases && subtest >= 0) 148 return t->test_cases[subtest].desc; 149 150 return t->desc; 151} 152 | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * builtin-test.c 4 * 5 * Builtin regression testing command: ever growing number of sanity tests 6 */ 7#include <fcntl.h> 8#include <errno.h> --- 136 unchanged lines hidden (view full) --- 145static const char *test_description(const struct test_suite *t, int subtest) 146{ 147 if (t->test_cases && subtest >= 0) 148 return t->test_cases[subtest].desc; 149 150 return t->desc; 151} 152 |
153static bool is_supported(const struct test_suite *t) 154{ 155 return !t->is_supported || t->is_supported(); 156} 157 | |
158static test_fnptr test_function(const struct test_suite *t, int subtest) 159{ 160 if (subtest <= 0) 161 return t->test_cases[0].run_case; 162 163 return t->test_cases[subtest].run_case; 164} 165 --- 309 unchanged lines hidden (view full) --- 475 curr, argc, argv)) 476 skip = false; 477 } 478 479 if (skip) 480 continue; 481 } 482 | 153static test_fnptr test_function(const struct test_suite *t, int subtest) 154{ 155 if (subtest <= 0) 156 return t->test_cases[0].run_case; 157 158 return t->test_cases[subtest].run_case; 159} 160 --- 309 unchanged lines hidden (view full) --- 470 curr, argc, argv)) 471 skip = false; 472 } 473 474 if (skip) 475 continue; 476 } 477 |
483 if (!is_supported(t)) { 484 pr_debug("%2d: %-*s: Disabled\n", i, width, 485 test_description(t, -1)); 486 continue; 487 } 488 | |
489 pr_info("%2d: %-*s:", i, width, test_description(t, -1)); 490 491 if (intlist__find(skiplist, i)) { 492 color_fprintf(stderr, PERF_COLOR_YELLOW, " Skip (user override)\n"); 493 continue; 494 } 495 496 if (!has_subtests(t)) { --- 81 unchanged lines hidden (view full) --- 578{ 579 unsigned int j, k; 580 struct test_suite *t; 581 int i = 0; 582 583 for_each_test(j, k, t) { 584 int curr = i++; 585 | 478 pr_info("%2d: %-*s:", i, width, test_description(t, -1)); 479 480 if (intlist__find(skiplist, i)) { 481 color_fprintf(stderr, PERF_COLOR_YELLOW, " Skip (user override)\n"); 482 continue; 483 } 484 485 if (!has_subtests(t)) { --- 81 unchanged lines hidden (view full) --- 567{ 568 unsigned int j, k; 569 struct test_suite *t; 570 int i = 0; 571 572 for_each_test(j, k, t) { 573 int curr = i++; 574 |
586 if (!perf_test__matches(test_description(t, -1), curr, argc, argv) || 587 !is_supported(t)) | 575 if (!perf_test__matches(test_description(t, -1), curr, argc, argv)) |
588 continue; 589 590 pr_info("%2d: %s\n", i, test_description(t, -1)); 591 592 if (has_subtests(t)) { 593 int subn = num_subtests(t); 594 int subi; 595 --- 54 unchanged lines hidden --- | 576 continue; 577 578 pr_info("%2d: %s\n", i, test_description(t, -1)); 579 580 if (has_subtests(t)) { 581 int subn = num_subtests(t); 582 int subi; 583 --- 54 unchanged lines hidden --- |