From nobody Thu Jan 30 23:09:12 2025 Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 78E9A1D7E57 for ; Fri, 24 Jan 2025 01:58:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737683939; cv=none; b=bz0IP3Zzi/eZEWbZ33TUwZ9nwriWzKxm9lszxIZ8orVS6ftOTVW5DON/AR2UWlNMEs3rXthE89+C1EVw4gHCNXEBAVilaBme3qT0rgkCRvMfJ/eLkh+/zHj5DsJ/vKLOskRwdPAeuAcJ3xwVVmW/Steo94riLaUByai1cnel654= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737683939; c=relaxed/simple; bh=OuvN4hSJXio2PoJiej9Y5bVI4DH3N1EbznQzh95Pj9Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cCz1FGOmPFimaHfnazO82fSNiCTSZbVb6y7IHI/Ec39Y0mUGyqBHQJqPJD1fJFPxiIwIeeeMt8sei/I85idnvJF3JeYALcW4QJPa4Xjh327JrGMx3dVvms3yuBJ8ohBEJfx1bi+ujjcNB1pNtj7R9w/1VHx+FiJV+yDA7Obr/ME= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=joelfernandes.org; spf=pass smtp.mailfrom=joelfernandes.org; dkim=pass (1024-bit key) header.d=joelfernandes.org header.i=@joelfernandes.org header.b=p9sJ16iP; arc=none smtp.client-ip=209.85.222.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=joelfernandes.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=joelfernandes.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=joelfernandes.org header.i=@joelfernandes.org header.b="p9sJ16iP" Received: by mail-qk1-f171.google.com with SMTP id af79cd13be357-7b6f0afda3fso73763385a.2 for ; Thu, 23 Jan 2025 17:58:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; t=1737683936; x=1738288736; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Y+QF5oSbZcs+JbJsvoCUbafjxE54u1Cr2sHAMeNdyY0=; b=p9sJ16iPpGjmXQzZZTBy6IXvDnvihbEf5W3TycdIx+HB+x8xYDfrsA14Jom8Co5Qye orhK+xwH8+i54VVjj1HuGFtetmd2P6fqdEU9WBrFz2BldUS4xGnDnON0/2q49kUlOSJc eCpsJkXXfzkAfdPp9oAocY5JIcsEjnTULcyzA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737683936; x=1738288736; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y+QF5oSbZcs+JbJsvoCUbafjxE54u1Cr2sHAMeNdyY0=; b=Y97OoMvJVmDQuROCADsj7PYXwGXnq6uIjwgEaxMz+p4+ec2D4zqcnNoiHKy13LeXM7 b6VI5XToNPxKuSAZ4yO+V9Ck3+hgi0WC59h+dyLeIdy8b94XA0XM/ozeMMw7Oad56kEk IPTIyPV+LHCMIS3VmJc9BOetTD6nxXZYxZXUDXeAmQ3Rrl6DiQW8Yvn6jevy6gBX+Hbr BjTmNlrOzYJ6EKV4gA0BEPP2/JcrTmLOAt6+lotZ+D+pkyZlS7w8dNQEXpQHvcC6nhLb ORIkIL6nUs0SCqVDe0C4g4eU4L+sMyGLquqc9Hye64o2fIUApgsfP5DYK4TALbCZ8QKq ua8Q== X-Gm-Message-State: AOJu0Yxo6yFC8T5FudfWIdpG4AODnpQpetkecMR+mTRsGDxwGyWk0QuV 1Zmg1/fvYd18osQNxAr78T4mQmwyenrsyLIFAGFMCBUya+k5hX5hfbZ+eHD8t6jn751YT7z3QKc m X-Gm-Gg: ASbGncsGbRCkhDFg4140uLYsrP6glXVXIJFw8vsrZQ/Wp41pyCBSQt9dyrHDhOYZ000 xlalb4xkfGP/3llqzUU7QVcxF0eRCmT6OEPsOn9Jjx5moQeJ2zlhWD+5txmRsfSEHEVYaq9fEA9 MwUYDhURz5tMAa668Ue/TcabDvc2+Wu1GzLD3LKMFwMwJWo6tFrdx22VkQo/AH+7Rug5BOAc3z3 g0XoWhf+IRlvuMFW8pBPqBVyVdyTTkjzbkLonWOkXTIfDCXD6sQqeZJIio+OECyGz8rX5D8mJxg y3ckjhtSZZst1iW45loRvGtyIglmmAUIJ4xXrB57bEXSi9c= X-Google-Smtp-Source: AGHT+IH36P6Jv8uzjmbePn9/vGkZZmN7+mVBRG1wMuKKi1ngiL7zOS7+fOI/X1b/u1OyY3fqtN5Vkw== X-Received: by 2002:a05:620a:1a02:b0:7b6:6a76:3a44 with SMTP id af79cd13be357-7be631f2fe6mr3884618085a.17.1737683936019; Thu, 23 Jan 2025 17:58:56 -0800 (PST) Received: from joelbox2.. (c-73-251-172-144.hsd1.va.comcast.net. [73.251.172.144]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7be9ae8a5fbsm44741985a.31.2025.01.23.17.58.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jan 2025 17:58:55 -0800 (PST) From: "Joel Fernandes (Google)" To: linux-kernel@vger.kernel.org, "Paul E. McKenney" , Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Shuah Khan Cc: "Joel Fernandes (Google)" , rcu@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH RFC 5/5] rcutorture: kvm: Invoke stress-ng building it if necessary Date: Thu, 23 Jan 2025 20:58:36 -0500 Message-Id: <20250124015836.732086-6-joel@joelfernandes.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250124015836.732086-1-joel@joelfernandes.org> References: <20250124015836.732086-1-joel@joelfernandes.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Invoke stress-ng from init using new --stress-ng and optional --stress-ng-args. Default --stress-ng-args are used if none are provided. Not passing --stress-ng does not change the behavior of kvm.sh from before. Signed-off-by: Joel Fernandes (Google) --- tools/testing/selftests/rcutorture/bin/kvm.sh | 38 +++++++++++++++++-- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/= selftests/rcutorture/bin/kvm.sh index 4766c3023fed..d35496247ee6 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -42,13 +42,15 @@ TORTURE_JITTER_STOP=3D"" TORTURE_KCONFIG_KASAN_ARG=3D"" TORTURE_KCONFIG_KCSAN_ARG=3D"" TORTURE_KMAKE_ARG=3D"" +TORTURE_MOD=3Drcutorture TORTURE_NO_AFFINITY=3D"" TORTURE_QEMU_MEM=3D512 torture_qemu_mem_default=3D1 TORTURE_REMOTE=3D TORTURE_SHUTDOWN_GRACE=3D180 +TORTURE_STRESS_NG=3D +TORTURE_STRESS_NG_DEFAULT_ARGS=3D"--cpu 1 --cpu-method matrixprod --cpu-op= s 1000000 --perf -t 5" TORTURE_SUITE=3Drcu -TORTURE_MOD=3Drcutorture TORTURE_TRUST_MAKE=3D"" debuginfo=3D"CONFIG_DEBUG_INFO_NONE=3Dn CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_= DEFAULT=3Dy" resdir=3D"" @@ -90,6 +92,8 @@ usage () { echo " --remote" echo " --results absolute-pathname" echo " --shutdown-grace seconds" + echo " --stress-ng" + echo " --stress-ng-args \"stress-ng arguments\"" echo " --torture lock|rcu|rcuscale|refscale|scf|X*" echo " --trust-make" exit 1 @@ -251,6 +255,14 @@ do TORTURE_SHUTDOWN_GRACE=3D$2 shift ;; + --stress-ng) + TORTURE_STRESS_NG=3D1 + ;; + --stress-ng-args) + checkarg --stress-ng-args "(stress-ng arguments)" "$#" "$2" '.*' '^error' + TORTURE_STRESS_NG_DEFAULT_ARGS=3D"$2" + shift + ;; --torture) checkarg --torture "(suite name)" "$#" "$2" '^\(lock\|rcu\|rcuscale\|ref= scale\|scf\|X.*\)$' '^--' TORTURE_SUITE=3D$2 @@ -275,9 +287,27 @@ do shift done =20 -if test -z "$dryrun" && test -n "$TORTURE_INITRD" && !tools/testing/selfte= sts/rcutorture/bin/mkinitrd.sh - echo No initrd and unable to create one, aborting test >&2 - exit 1 +if test -n "$TORTURE_STRESS_NG" +then + if ! "$RCUTORTURE/bin/mkstress-ng.sh" + then + echo "Failed to build stress-ng, aborting test" >&2 + exit 1 + fi +fi + +if test -z "$dryrun" && test -n "$TORTURE_INITRD" +then + stress_args=3D"" + if test -n "$TORTURE_STRESS_NG" + then + stress_args=3D"stress-ng $TORTURE_STRESS_NG_DEFAULT_ARGS" + fi + if ! "$RCUTORTURE/bin/mkinitrd.sh" $stress_args + then + echo "No initrd and unable to create one, aborting test" >&2 + exit 1 + fi fi =20 CONFIGFRAG=3D${RCUTORTURE}/configs/${TORTURE_SUITE}; export CONFIGFRAG --=20 2.34.1