Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/regress/sys/kern Drop broken tests (no longer builds in years)
details: https://anonhg.NetBSD.org/src/rev/d81d8bb30e29
branches: trunk
changeset: 353601:d81d8bb30e29
user: kamil <kamil%NetBSD.org@localhost>
date: Sun May 14 04:01:10 2017 +0000
description:
Drop broken tests (no longer builds in years)
Removed:
- callout1
- mutex1
- mutex2
- priority_inheritance1
- rwlock1
These tests used to require lkm code, that has been removed.
Today they are implicitly mostly verified by rumpkernel tests in ATF.
diffstat:
regress/sys/kern/callout1/Makefile | 13 -
regress/sys/kern/callout1/test_callout1.c | 110 ----
regress/sys/kern/mutex1/Makefile | 13 -
regress/sys/kern/mutex1/test_mutex1.c | 178 -------
regress/sys/kern/mutex2/Makefile | 13 -
regress/sys/kern/mutex2/test_mutex2.c | 124 -----
regress/sys/kern/priority_inheritance1/Makefile | 13 -
regress/sys/kern/priority_inheritance1/test_priority_inheritance1.c | 228 ----------
regress/sys/kern/rwlock1/Makefile | 13 -
regress/sys/kern/rwlock1/test_rwlock1.c | 134 -----
10 files changed, 0 insertions(+), 839 deletions(-)
diffs (truncated from 879 to 300 lines):
diff -r f202d852d747 -r d81d8bb30e29 regress/sys/kern/callout1/Makefile
--- a/regress/sys/kern/callout1/Makefile Sun May 14 03:50:42 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-# $NetBSD: Makefile,v 1.1 2008/03/28 20:44:57 ad Exp $
-
-KMOD= callout1_test
-
-NOMAN=
-
-.PATH: ${.CURDIR}/../lkmcommon
-
-SRCS= lkminit_test.c test_callout1.c
-CPPFLAGS+=-DLKMENTRY=callout1_test_lkmentry
-
-.include <bsd.kmod.mk>
-.include <bsd.subdir.mk>
diff -r f202d852d747 -r d81d8bb30e29 regress/sys/kern/callout1/test_callout1.c
--- a/regress/sys/kern/callout1/test_callout1.c Sun May 14 03:50:42 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/* $NetBSD: test_callout1.c,v 1.3 2008/04/28 20:23:06 martin Exp $ */
-
-/*-
- * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Andrew Doran.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: test_callout1.c,v 1.3 2008/04/28 20:23:06 martin Exp $");
-
-#include <sys/param.h>
-#include <sys/ioctl.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <sys/kthread.h>
-#include <sys/kernel.h>
-#include <sys/callout.h>
-
-int testcall(struct lwp *, void *, register_t *);
-
-void test_callout(void *);
-void test_softint(void *);
-
-kmutex_t test_mutex;
-kcondvar_t test_cv;
-int test_done;
-void *test_sih;
-callout_t test_ch;
-
-void
-test_callout(void *cookie)
-{
- int s;
-
- /* Trigger soft interrupt. */
- s = splhigh();
- softint_schedule(test_sih);
- splx(s);
-
- mutex_enter(&test_mutex);
- test_done = 1;
- cv_broadcast(&test_cv);
- mutex_exit(&test_mutex);
-}
-
-void
-test_softint(void *cookie)
-{
-
- printf("l_ncsw = %d\n", (int)curlwp->l_ncsw);
- callout_halt(&test_ch, NULL);
- printf("l_ncsw = %d\n", (int)curlwp->l_ncsw);
-}
-
-int
-testcall(struct lwp *l, void *uap, register_t *retval)
-{
-
- printf("test: initializing\n");
-
- mutex_init(&test_mutex, MUTEX_DEFAULT, IPL_NONE);
- cv_init(&test_cv, "testcv");
- test_sih = softint_establish(SOFTINT_MPSAFE | SOFTINT_SERIAL,
- test_softint, NULL);
- callout_init(&test_ch, CALLOUT_MPSAFE);
- callout_setfunc(&test_ch, test_callout, NULL);
-
- printf("test: firing\n");
- callout_schedule(&test_ch, hz / 10);
-
- printf("test: waiting\n");
- mutex_enter(&test_mutex);
- while (!test_done) {
- cv_wait(&test_cv, &test_mutex);
- }
- mutex_exit(&test_mutex);
-
- printf("test: finished\n");
-
- callout_destroy(&test_ch);
- softint_disestablish(test_sih);
- mutex_destroy(&test_mutex);
- cv_destroy(&test_cv);
-
- return 0;
-}
diff -r f202d852d747 -r d81d8bb30e29 regress/sys/kern/mutex1/Makefile
--- a/regress/sys/kern/mutex1/Makefile Sun May 14 03:50:42 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-# $NetBSD: Makefile,v 1.3 2007/02/24 15:25:23 yamt Exp $
-
-KMOD= mutex1_test
-
-NOMAN=
-
-.PATH: ${.CURDIR}/../lkmcommon
-
-SRCS= lkminit_test.c test_mutex1.c
-CPPFLAGS+=-DLKMENTRY=mutex1_test_lkmentry
-
-.include <bsd.kmod.mk>
-.include <bsd.subdir.mk>
diff -r f202d852d747 -r d81d8bb30e29 regress/sys/kern/mutex1/test_mutex1.c
--- a/regress/sys/kern/mutex1/test_mutex1.c Sun May 14 03:50:42 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,178 +0,0 @@
-/* $NetBSD: test_mutex1.c,v 1.5 2008/04/28 20:23:07 martin Exp $ */
-
-/*-
- * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Andrew Doran.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: test_mutex1.c,v 1.5 2008/04/28 20:23:07 martin Exp $");
-
-#include <sys/param.h>
-#include <sys/ioctl.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <sys/kthread.h>
-#include <sys/kernel.h>
-
-#define NTHREADS 9
-#define SECONDS 60
-
-int testcall(struct lwp *, void *, register_t *);
-void thread1(void *);
-void thread2(void *);
-void thread3(void *);
-void thread_exit(void);
-
-lwp_t *test_threads[NTHREADS];
-kmutex_t test_mutex;
-kcondvar_t test_cv;
-int test_count;
-int test_exit;
-
-void
-thread_exit(void)
-{
-
- mutex_enter(&test_mutex);
- if (--test_count == 0)
- cv_signal(&test_cv);
- mutex_exit(&test_mutex);
- kthread_exit(0);
-}
-
-/*
- * test_mutex -> kernel_lock
- */
-void
-thread1(void *cookie)
-{
- int count;
-
- for (count = 0; !test_exit; count++) {
- mutex_enter(&test_mutex);
- KERNEL_LOCK(1, curlwp);
- if ((count % 11) == 0)
- yield();
- mutex_exit(&test_mutex);
- KERNEL_UNLOCK_ONE(curlwp);
- if ((count % 17) == 0)
- yield();
- }
-
- thread_exit();
-}
-
-/*
- * kernel_lock -> test_mutex
- */
-void
-thread2(void *cookie)
-{
- int count;
-
- for (count = 0; !test_exit; count++) {
- KERNEL_LOCK(1, curlwp);
- mutex_enter(&test_mutex);
- if ((count % 401) == 0)
- yield();
- KERNEL_UNLOCK_ONE(curlwp);
- mutex_exit(&test_mutex);
- if ((count % 19) == 0)
- yield();
- }
-
- thread_exit();
-}
-
-/*
- * test_mutex without kernel_lock, to provide pressure
- */
-void
-thread3(void *cookie)
-{
- int count;
-
- for (count = 0; !test_exit; count++) {
- mutex_enter(&test_mutex);
- DELAY(10);
- if ((count % 101) == 0)
- yield();
- mutex_exit(&test_mutex);
- if ((count % 23) == 0)
- yield();
- }
-
- thread_exit();
-}
-
-int
-testcall(struct lwp *l, void *uap, register_t *retval)
-{
- void (*func)(void *);
- int i;
-
- mutex_init(&test_mutex, MUTEX_DEFAULT, IPL_NONE);
- cv_init(&test_cv, "testcv");
-
- printf("test: creating threads\n");
-
- test_count = NTHREADS;
- test_exit = 0;
-
- for (i = 0; i < test_count; i++) {
- switch (i % 3) {
Home |
Main Index |
Thread Index |
Old Index