• Mark Brown's avatar
    kselftest/arm64: kselftest harness for FP stress tests · fd5c2c6f
    Mark Brown authored
    Currently the stress test programs for floating point context switching are
    run by hand, there are extremely simplistic harnesses which run some copies
    of each test individually but they are not integrated into kselftest and
    with SVE and SME they only run with whatever vector length the process has
    by default. This is hassle when running the tests and means that they're
    not being run at all by CI systems picking up kselftest.
    
    In order to improve our coverage and provide a more convenient interface
    provide a harness program which starts enough stress test programs up to
    cause context switching and runs them for a set period. If only FPSIMD is
    available in the system we start two copies of the FPSIMD stress test per
    CPU, otherwise we start one copy of the FPSIMD and then start the SVE,
    streaming SVE and ZA tests once per CPU for each available VL they have
    to run on.  We then run for a set period monitoring for any errors
    reported by the test programs before cleanly terminating them.
    
    In order to provide additional coverage of signal handling and some extra
    noise in the scheduling we send a SIGUSR2 to the stress tests once a
    second, the tests will count the number of signals they get.
    
    Since kselftest is generally expected to run quickly we by default only run
    for ten seconds. This is enough to show if there is anything cripplingly
    wrong but not exactly a thorough soak test, for interactive and more
    focused use a command line option -t N is provided which overrides the
    length of time to run for (specified in seconds) and if 0 is specified then
    there is no timeout and the test must be manually terminated. The timeout
    is counted in seconds with no output, this is done to account for the
    potentially slow startup time for the test programs on virtual platforms
    which tend to struggle during startup as they are both slow and tend to
    support a wide range of vector lengths.
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    Link: https://lore.kernel.org/r/20220829154452.824870-5-broonie@kernel.orgSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
    fd5c2c6f
Makefile 1.5 KB