stdlib: Add more qsort{_r} coverage
commitbc888a3976700a3607f6ec4a36dbf3030161cb3e
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 3 Oct 2023 12:22:51 +0000 (3 09:22 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 31 Oct 2023 17:18:07 +0000 (31 14:18 -0300)
tree986423916ac28c61017511b5a89b8ebe3b28d90c
parent03bf8357e8291857a435afcc3048e0b697b6cc04
stdlib: Add more qsort{_r} coverage

This patch adds a qsort and qsort_r to trigger the worst case
scenario for the quicksort (which glibc current lacks coverage).
The test is done with random input, dfferent internal types (uint8_t,
uint16_t, uint32_t, uint64_t, large size), and with
different set of element numbers.

Checked on x86_64-linux-gnu and i686-linux-gnu.
Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
stdlib/Makefile
stdlib/tst-qsort3.c [new file with mode: 0644]