git: b52c60d4e8c6 - stable/13 - cap_sysctl tests: Serialize

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Thu, 06 Apr 2023 15:07:03 UTC
The branch stable/13 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=b52c60d4e8c628f6158a936184b6b0a844597f62

commit b52c60d4e8c628f6158a936184b6b0a844597f62
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-03-24 16:26:20 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-04-06 14:54:08 +0000

    cap_sysctl tests: Serialize
    
    These tests fail spuriously when run in parallel, since some of them
    write a value to a global sysctl, read it back, and expect to see the
    written value.  These tests complete quite quickly in any case.
    
    MFC after:      1 week
    
    (cherry picked from commit 5d96ca7a307279cf4bdb191b7074cd1efcd3b8e8)
---
 lib/libcasper/services/cap_sysctl/tests/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/libcasper/services/cap_sysctl/tests/Makefile b/lib/libcasper/services/cap_sysctl/tests/Makefile
index d0d9f9bd7a0d..ec7439351c66 100644
--- a/lib/libcasper/services/cap_sysctl/tests/Makefile
+++ b/lib/libcasper/services/cap_sysctl/tests/Makefile
@@ -11,6 +11,9 @@ CFLAGS+=-DWITH_CASPER
 .endif
 LIBADD+=	nv
 
-TEST_METADATA.sysctl_test+=	required_user="root"
+# cap_sysctl tests modify global sysctl values and read them back, so
+# cannot be run in parallel.
+TEST_METADATA.sysctl_test+=	required_user="root" \
+				is_exclusive=true
 
 .include <bsd.test.mk>