Project

General

Profile

Actions

Bug #14497

open

libc symbol tests need parallelization

Added by Robert Mustacchi 8 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
tests
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

Right now the libc symbol tests are implemented by sitting in a tight loop and calling system(3C) to invoke each compilation that we need serially. Because these run tests for every environment combination and we're continuing to extend the set of these with major new headers such as the work in #14329 and #14418. If we look at these:

Test: /opt/libc-tests/tests/symbols/setup (run as root)           [00:00] [PASS]
Test: /opt/libc-tests/tests/symbols/assert_h (run as root)        [00:00] [PASS]
Test: /opt/libc-tests/tests/symbols/ctype_h (run as root)         [00:31] [PASS]
Test: /opt/libc-tests/tests/symbols/dirent_h (run as root)        [00:07] [PASS]
Test: /opt/libc-tests/tests/symbols/fcntl_h (run as root)         [00:20] [PASS]
Test: /opt/libc-tests/tests/symbols/locale_h (run as root)        [00:14] [PASS]
Test: /opt/libc-tests/tests/symbols/math_h (run as root)          [00:05] [PASS]
Test: /opt/libc-tests/tests/symbols/netdb_h (run as root)         [00:01] [PASS]
Test: /opt/libc-tests/tests/symbols/pthread_h (run as root)       [00:03] [PASS]
Test: /opt/libc-tests/tests/symbols/signal_h (run as root)        [00:02] [PASS]
Test: /opt/libc-tests/tests/symbols/stdalign_h (run as root)      [00:03] [PASS]
Test: /opt/libc-tests/tests/symbols/stddef_h (run as root)        [00:01] [PASS]
Test: /opt/libc-tests/tests/symbols/stdio_h (run as root)         [00:19] [PASS]
Test: /opt/libc-tests/tests/symbols/stdlib_h (run as root)        [00:17] [PASS]
Test: /opt/libc-tests/tests/symbols/stdnoreturn_h (run as root)   [00:00] [PASS]
Test: /opt/libc-tests/tests/symbols/string_h (run as root)        [00:03] [PASS]
Test: /opt/libc-tests/tests/symbols/strings_h (run as root)       [00:00] [PASS]
Test: /opt/libc-tests/tests/symbols/sys_atomic_h (run as root)  [02:01] [KILLED]
Test: /opt/libc-tests/tests/symbols/sys_stat_h (run as root)      [00:09] [PASS]
Test: /opt/libc-tests/tests/symbols/sys_time_h (run as root)      [00:04] [PASS]
Test: /opt/libc-tests/tests/symbols/sys_timeb_h (run as root)     [00:00] [PASS]
Test: /opt/libc-tests/tests/symbols/time_h (run as root)          [00:01] [PASS]
Test: /opt/libc-tests/tests/symbols/threads_h (run as root)       [00:34] [PASS]
Test: /opt/libc-tests/tests/symbols/ucontext_h (run as root)      [00:04] [PASS]
Test: /opt/libc-tests/tests/symbols/unistd_h (run as root)        [00:26] [PASS]
Test: /opt/libc-tests/tests/symbols/wchar_h (run as root)         [00:13] [PASS]
Test: /opt/libc-tests/tests/symbols/wctype_h (run as root)        [00:34] [PASS]

We see that these can easily take a lot of time. While this was on a debug build so that adds some overhead, if we add up all those runtimes it took on the order of 370 seconds! Which let's be honest is quite a lot of time and even there we couldn't run through the new sys_atomic_h tests on this particular system without timing out.

There are two things of note here that we should address:

  • We are going through a shell (in part to try and find the compiler) every time, which adds another fork/exec.
  • We really should try to launch several of these in parallel with threads or some other system.

No data to display

Actions

Also available in: Atom PDF