|
28 | 28 |
|
29 | 29 | #define MAX_VLS 16
|
30 | 30 |
|
| 31 | +#define SIGNAL_INTERVAL_MS 25 |
| 32 | +#define LOG_INTERVALS (1000 / SIGNAL_INTERVAL_MS) |
| 33 | + |
31 | 34 | struct child_data {
|
32 | 35 | char *name, *output;
|
33 | 36 | pid_t pid;
|
@@ -448,7 +451,7 @@ static const struct option options[] = {
|
448 | 451 | int main(int argc, char **argv)
|
449 | 452 | {
|
450 | 453 | int ret;
|
451 |
| - int timeout = 10; |
| 454 | + int timeout = 10 * (1000 / SIGNAL_INTERVAL_MS); |
452 | 455 | int cpus, i, j, c;
|
453 | 456 | int sve_vl_count, sme_vl_count;
|
454 | 457 | bool all_children_started = false;
|
@@ -504,7 +507,7 @@ int main(int argc, char **argv)
|
504 | 507 | have_sme2 ? "present" : "absent");
|
505 | 508 |
|
506 | 509 | if (timeout > 0)
|
507 |
| - ksft_print_msg("Will run for %ds\n", timeout); |
| 510 | + ksft_print_msg("Will run for %d\n", timeout); |
508 | 511 | else
|
509 | 512 | ksft_print_msg("Will run until terminated\n");
|
510 | 513 |
|
@@ -577,14 +580,14 @@ int main(int argc, char **argv)
|
577 | 580 | break;
|
578 | 581 |
|
579 | 582 | /*
|
580 |
| - * Timeout is counted in seconds with no output, the |
581 |
| - * tests print during startup then are silent when |
582 |
| - * running so this should ensure they all ran enough |
583 |
| - * to install the signal handler, this is especially |
584 |
| - * useful in emulation where we will both be slow and |
585 |
| - * likely to have a large set of VLs. |
| 583 | + * Timeout is counted in poll intervals with no |
| 584 | + * output, the tests print during startup then are |
| 585 | + * silent when running so this should ensure they all |
| 586 | + * ran enough to install the signal handler, this is |
| 587 | + * especially useful in emulation where we will both |
| 588 | + * be slow and likely to have a large set of VLs. |
586 | 589 | */
|
587 |
| - ret = epoll_wait(epoll_fd, evs, tests, 1000); |
| 590 | + ret = epoll_wait(epoll_fd, evs, tests, SIGNAL_INTERVAL_MS); |
588 | 591 | if (ret < 0) {
|
589 | 592 | if (errno == EINTR)
|
590 | 593 | continue;
|
@@ -624,8 +627,9 @@ int main(int argc, char **argv)
|
624 | 627 | all_children_started = true;
|
625 | 628 | }
|
626 | 629 |
|
627 |
| - ksft_print_msg("Sending signals, timeout remaining: %d\n", |
628 |
| - timeout); |
| 630 | + if ((timeout % LOG_INTERVALS) == 0) |
| 631 | + ksft_print_msg("Sending signals, timeout remaining: %d\n", |
| 632 | + timeout); |
629 | 633 |
|
630 | 634 | for (i = 0; i < num_children; i++)
|
631 | 635 | child_tickle(&children[i]);
|
|
0 commit comments