tests/sys/audit: fix timeout calculation
authorAlex Richardson <arichardson@FreeBSD.org>
Thu, 28 Jan 2021 17:23:27 +0000 (17:23 +0000)
committerAlex Richardson <arichardson@FreeBSD.org>
Thu, 28 Jan 2021 17:24:24 +0000 (17:24 +0000)
commit869cc06480b75b4caea0d049e0cf7f82bb5aeed1
tree388f8fd6db967b5f59576bb7e005952c967dad32
parent83ff5d5d98cbcf9b66dccd70022358aec8918a14
tests/sys/audit: fix timeout calculation

This changes the behaviour to a 30s total timeout (needed when running
on slow emulated uniprocessor systems) and timing out after 10s without
any input. This also uses timespecsub() instead of ignoring the
nanoseconds field.

After this change the tests runs more reliably on QEMU and time out less
frequently.

Reviewed By: asomers
Differential Revision: https://reviews.freebsd.org/D28391
tests/sys/audit/utils.c