From owner-freebsd-net@FreeBSD.ORG Thu Jan 29 14:58:37 2015 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E66CA62 for ; Thu, 29 Jan 2015 14:58:37 +0000 (UTC) Received: from phabric-backend.isc.freebsd.org (phabric-backend.isc.freebsd.org [IPv6:2001:4f8:3:ffe0:406a:0:50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C25165B for ; Thu, 29 Jan 2015 14:58:37 +0000 (UTC) Received: from phabric-backend.isc.freebsd.org (phabric-backend.isc.freebsd.org [127.0.1.5]) by phabric-backend.isc.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TEwaxH017428 for ; Thu, 29 Jan 2015 14:58:36 GMT (envelope-from mat@phabric-backend.isc.freebsd.org) Received: (from root@localhost) by phabric-backend.isc.freebsd.org (8.14.9/8.14.9/Submit) id t0TEwaFO017424; Thu, 29 Jan 2015 14:58:36 GMT (envelope-from mat) Date: Thu, 29 Jan 2015 14:58:36 +0000 To: freebsd-net@freebsd.org From: "jhb (John Baldwin)" Subject: [Differential] [Changed Subscribers] D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate thecallout code (and potentially for use by other tests). Message-ID: <7a833ed117edb84f9e178b55201dff2b@localhost.localdomain> X-Priority: 3 Thread-Topic: D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate the callout code (and potentially for use by other tests). X-Herald-Rules: none X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: In-Reply-To: References: Thread-Index: Y2JjMTcyODJkYzgxM2NkZDFjY2RhOGRmMTlkIFTKSpw= X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: , MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 14:58:37 -0000 jhb added a subscriber: jhb. jhb added a comment. Hmm, I do think the idea of a kernel test framework should be discussed in its own right. I have implemented a much simpler one on my own for unit tests of locking primitives that you can see here. These worked by declaring tests in linker sets in a kernel module. Loading the module implicitly runs the tests. I have other changes in this branch to allow "catching" panics like exceptions and similar changes for witness as well. The test framework (much simpler) can be found at: http://p4db.freebsd.org/fileDownLoad.cgi?FSPC=//depot/user/jhb/lock/kern/subr_test.c&REV=6 http://p4db.freebsd.org/fileDownLoad.cgi?FSPC=//depot/user/jhb/lock/sys/unittest.h&REV=2 Sample test modules can be found here: http://p4db.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/user/jhb/lock/modules/test&HIDEDEL=NO I think "test" is probably a better name for a subdir of test modules as it is more consistent with what we are doing in userland with kyua. REVISION DETAIL https://reviews.freebsd.org/D1711 To: rrs, gnn, rwatson, adrian, sbruno, lstewart, imp, hselasky Cc: jhb, kostikbel, emaste, delphij, neel, erj, freebsd-net