From nobody Tue Oct 11 22:35:41 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Mn9bd5MZ4z4fZhh; Tue, 11 Oct 2022 22:35:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mn9bd4dWDz3b0N; Tue, 11 Oct 2022 22:35:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665527741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aVu5cNGxwXU7S8dVuY+yvuqadVrMo6LZhmn1Ve8Whac=; b=DhjAqzfTPpVjoUoIPtztgf2ZmPvXUw/O8sLw2O6aNJ56KM3U3EjN/Np/MjAxjfY0R1X9Ro GfQle/DJ8AceN+IesH24kBLcAc2wJKL8GGYCQCiWnGSiqlgf2ynuzFasf5+MiX4RJR+uci KqzQDHokMMtR3yKGS/jyc7R7nslB89d9itIYVz9c/5eiw5IjLDj8BEGM9deWbMlGczW4uD 7yDf2IuXJXbIjQeArmn41nVrgwNL3eNzkNcyWIxbYmEXJrkXt3clQ9XvtXkzwrYTWn9NfB KFpkZI6PyF0jJ+CUAKOyQBEIp54yUdHZ89tyEmR4RPq1T8dy3nEhLA4t+99diQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Mn9bd3L06z161H; Tue, 11 Oct 2022 22:35:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29BMZf01048910; Tue, 11 Oct 2022 22:35:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29BMZfGC048909; Tue, 11 Oct 2022 22:35:41 GMT (envelope-from git) Date: Tue, 11 Oct 2022 22:35:41 GMT Message-Id: <202210112235.29BMZfGC048909@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 19a847e5f282 - main - kinst: Add a rudimentary regression test case List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 19a847e5f2820202243b04f73017a9e7def63d11 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665527741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aVu5cNGxwXU7S8dVuY+yvuqadVrMo6LZhmn1Ve8Whac=; b=kl6dJAuNxMj0QeMcZqNHzoeNkb7xLBzfm4iK6gSOyaJi+7Pow6P0bEhSRzNsMAInSjoN0u 1cBkyoMjuup3VqJ/Y6TZKr7SIpKtUi1G20CuEe70kJJU6GvhMnEYDkL95SBNynlIpsj7mO Co9udBYKBmwY0eUVuCWgh0d2qPUETQcJyGMptMnXk2YXjNaOvgUWLOBtvBuIjqAzSv678V 7/uNZlLeMS0nJFAUmdIjGTHVzlQeBc7FxFlLk2VnC6eRUGVn2mKbmluVvT3YscoKlsFQOH iBdBa5+Lv1dEu5ehigCavahlzoiAEL7+AlU5KefWNGET9/NSYaiQ7nwxY25VrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665527741; a=rsa-sha256; cv=none; b=E/6T2h9TM+9NSOjwk9WFn0enfiOK92UhK18OPEmX5WwDNPLpSBx4Lwt49aRVRG/CJmCmPq VlONRe+biLEK1h6gKxucKMpKiNDHjkc+eqFkexk4dxE5G7th3PZ4flbVrR0X/ij3UQ+lML j3oh8zNoTcbR3rd8H4sgxw0+NqBxSeQ6zNHzi21XRA0mcnb8jPm4jzeWhC0n9QmHWUed2u udyEAvQVch4iDxj1aXR72YfER7vK0YfnWVwZHLfCZs9vWIIXwGBakvxGihO6G3q2iz9vcd S3QgnO3Z6xwnO3DHolr3NY+WsV1tflvu/mXSB+5dp2gu7AK+a5sY5TQ3qe9l4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=19a847e5f2820202243b04f73017a9e7def63d11 commit 19a847e5f2820202243b04f73017a9e7def63d11 Author: Mark Johnston AuthorDate: 2022-09-29 13:44:39 +0000 Commit: Mark Johnston CommitDate: 2022-10-11 22:19:55 +0000 kinst: Add a rudimentary regression test case The test instruments a number of large, frequently called kernel functions while generating load in the background. MFC after: 3 months --- .../cmd/dtrace/test/tst/amd64/kinst/tst.basic.ksh | 46 ++++++++++++++++++++++ cddl/usr.sbin/dtrace/tests/amd64/Makefile | 3 +- cddl/usr.sbin/dtrace/tests/amd64/kinst/Makefile | 19 +++++++++ etc/mtree/BSD.tests.dist | 2 + 4 files changed, 69 insertions(+), 1 deletion(-) diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/amd64/kinst/tst.basic.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/amd64/kinst/tst.basic.ksh new file mode 100644 index 000000000000..23019fb41f41 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/amd64/kinst/tst.basic.ksh @@ -0,0 +1,46 @@ +#!/usr/bin/ksh +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright (c) 2022 Mark Johnston +# + +script() +{ + $dtrace -q -s /dev/stdin <<__EOF__ +kinst::vm_fault: {} +kinst::amd64_syscall: {} +kinst::exit1: {} + +tick-10s {exit(0);} +__EOF__ +} + +spin() +{ + while true; do + ls -la / >/dev/null 2>&1 + done +} + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +spin & +child=$! + +script +exit $? diff --git a/cddl/usr.sbin/dtrace/tests/amd64/Makefile b/cddl/usr.sbin/dtrace/tests/amd64/Makefile index 39ccd333bedf..db421ea0880f 100644 --- a/cddl/usr.sbin/dtrace/tests/amd64/Makefile +++ b/cddl/usr.sbin/dtrace/tests/amd64/Makefile @@ -1,7 +1,8 @@ # $FreeBSD$ TESTSDIR= ${TESTSBASE}/cddl/usr.sbin/dtrace/amd64 -TESTS_SUBDIRS+= arrays +TESTS_SUBDIRS+= arrays \ + kinst .PATH: ${.CURDIR:H:H:H:H:H}/tests KYUAFILE= YES diff --git a/cddl/usr.sbin/dtrace/tests/amd64/kinst/Makefile b/cddl/usr.sbin/dtrace/tests/amd64/kinst/Makefile new file mode 100644 index 000000000000..52568df07e07 --- /dev/null +++ b/cddl/usr.sbin/dtrace/tests/amd64/kinst/Makefile @@ -0,0 +1,19 @@ +# $FreeBSD$ + +# +# This Makefile was generated by $srcdir/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh. +# + +PACKAGE= tests + +${PACKAGE}FILES= \ + tst.basic.ksh \ + +TESTEXES= \ + + +CFILES= \ + + + +.include "../../dtrace.test.mk" diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 394b2ec90dcd..c83f720e1de3 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -253,6 +253,8 @@ amd64 arrays .. + kinst + .. .. .. zfsd