From 68fe988a40ca5dedec426735f52471d9af7bddbd Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Tue, 24 May 2022 20:17:04 -0400 Subject: [PATCH] kqueue tests: Simplify the test runner Just invoke the test program directly instead of trying to convert its output to TAP format. The test suite is all or nothing; there's no way to enumerate individual test cases, so there's no advantage in trying to massage its output, and doing so throws away information that's useful when diagnosing test failures. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation --- ObsoleteFiles.inc | 2 ++ tests/sys/kqueue/libkqueue/Makefile | 6 ++---- tests/sys/kqueue/libkqueue/kqueue_test.sh | 17 ----------------- 3 files changed, 4 insertions(+), 21 deletions(-) delete mode 100644 tests/sys/kqueue/libkqueue/kqueue_test.sh diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 64ca3faee70f..7f2ead926b6e 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -52,6 +52,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20220524: libkqueue test updates +OLD_FILES+=usr/tests/sys/kqueue/libkqueue/kqtest # 20220514: new clang import which bumps version from 13.0.0 to 14.0.3 OLD_FILES+=usr/lib/clang/13.0.0/include/cuda_wrappers/algorithm OLD_FILES+=usr/lib/clang/13.0.0/include/cuda_wrappers/complex diff --git a/tests/sys/kqueue/libkqueue/Makefile b/tests/sys/kqueue/libkqueue/Makefile index cc29e35aa510..869b71209c4d 100644 --- a/tests/sys/kqueue/libkqueue/Makefile +++ b/tests/sys/kqueue/libkqueue/Makefile @@ -4,11 +4,9 @@ TESTSDIR= ${TESTSBASE}/sys/kqueue/libkqueue BINDIR= ${TESTSDIR} # libkqueue and test suite by Mark Heily -TAP_TESTS_SH= kqueue_test +PLAIN_TESTS_C= kqueue_test -PROGS= kqtest - -SRCS.kqtest= \ +SRCS.kqueue_test= \ main.c \ read.c \ timer.c \ diff --git a/tests/sys/kqueue/libkqueue/kqueue_test.sh b/tests/sys/kqueue/libkqueue/kqueue_test.sh deleted file mode 100644 index 3185d826c7dd..000000000000 --- a/tests/sys/kqueue/libkqueue/kqueue_test.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -i=1 -"$(dirname $0)/kqtest" | while read line; do - echo $line | grep -q passed - if [ $? -eq 0 ]; then - echo "ok - $i $line" - : $(( i += 1 )) - fi - - echo $line | grep -q 'tests completed' - if [ $? -eq 0 ]; then - echo -n "1.." - echo $line | cut -d' ' -f3 - fi -done