From nobody Mon Nov 25 07:52:44 2024 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (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 11CE51DFE2B; Mon, 28 Oct 2024 19:09:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730142545; cv=none; b=RkeJPEn2yf6vjxEv3q17My7d7zasRY3Mbi7VneAPaP9GUGoI3wOp0xZZ/h0+kZkgS+kXIGuAQE/jVQjhOKyAWxMW28JxY6CwRmxLV4E0damJ09ECXG2ca3qLNIM1Czay5bG8FIMstzj0VZG3Uz6GF5XCx5lSGN9YADbxGDNUiVw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730142545; c=relaxed/simple; bh=SmucZv0i06ofqUu6KmciBZuDotG1iUSOBkV7xS0qhBU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mrhyCkEj9BImpyRBsu2YfdzzvonZz8N/eVbsJWggMacuQFeTlG716PwjfDsVbT3JU6V348dNk3aY8BEWWqBvJnqZOSQM7dYuJS1X1ngsA6k0GREAqbv6CleOlEZFJ1ysmvUNW85ca5En1RlCBEaBTOF2dX6WGZFo2Y4xq7lntek= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IqwZKuE2; arc=none smtp.client-ip=209.85.221.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IqwZKuE2" Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-37ec4e349f4so3402816f8f.0; Mon, 28 Oct 2024 12:09:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730142541; x=1730747341; 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=KUEiGmW5jv4Jx5aew3GYGfkOzmJF3vI4hiCokbM6c4k=; b=IqwZKuE2MmecmYLLz2AWAXia7wKXzv34pOiFzUO5ch9Zm65xmNjXl24oAZKXTEhsdL 943e8qf9xWAr00dPyTIyGcQ42cm/wa6rzbh5Bn0j2gU5Y2f/yTs0wFfZjS3l9WzC7GOy y1lxBpU3/x3v769nDolzljwO26oP/qz2iIU+SXwwVL/DPxN2GxeCXjhNe4iW2uLCMJYq 3ba+1IAJd42PwU8jnVhOrZvryfnswE7y9wV/jWVf4xTyB8gj/4R8VuJlCp/v3OJm2iM2 VkEfmuzM0pjqT7eB1tKb3QsNHWy2ZSE9pcnOHFsA7zZS/kcj/LTgR4GgnrEPjRAUF2O6 DkAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730142541; x=1730747341; 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=KUEiGmW5jv4Jx5aew3GYGfkOzmJF3vI4hiCokbM6c4k=; b=PW8ctPS5PRqqPzdXsVBW+hWjDhDuIHGe8jnUY2NAOl1bf2MBSaBnuE8Segc0rr6pPJ ow2vFg6YWyDzR4Il6gZqqWsB4U3aLqTjjAhvQl0yn94Kmc6LboE484GzWci9pd8ysypY gfg7KsvnsRRqpPS0QOwuQbZoyUiEhbeY5qZJ4VRCn6ttmEFQpRnShtz5pl5VUeoPIE0r HxJ57v8AIew1e5lgxjCpy+Fr++zvgdIrrF04iMUPfMCvPE+P4OEfySauOzdAz1nGT0yW dZaDxMvtVnUBoBd91LK+7QO/vtnNtpe2lb9OCTtY3NwRxUSF+7C3fqJKPgPuIPZx9Sxr 6iKQ== X-Forwarded-Encrypted: i=1; AJvYcCVa1EpxIqw+NhjKa9ZQCVq8MbjlH5+7RGjr8qVYZYgYQkcZz2rwtmwxgJyjcNcSWBfIYKTN2TVco8xFjxs=@vger.kernel.org X-Gm-Message-State: AOJu0Yyw2bWFvlc/XF8MTz9zS3ycZpzGJwxlBEqJNY/2lUMJ4XQIPUlh aUzescY4JQeHCS9oVvpFggoNN8rr0CcLvjCpBmseU/iE+/uHJcGszAnZdSGP X-Google-Smtp-Source: AGHT+IFowO/Y0UhQfMoOIpZwBhDDyIk9NSuWtDkqdrJ0UqjSry+HLN+SWl9bhFD0IPcxVO9bDJ72ow== X-Received: by 2002:adf:fd0a:0:b0:37d:2ceb:ef92 with SMTP id ffacd0b85a97d-38061162d5amr6706803f8f.27.1730142541216; Mon, 28 Oct 2024 12:09:01 -0700 (PDT) Received: from localhost.localdomain ([78.210.79.232]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b1c69esm10314398f8f.13.2024.10.28.12.09.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 12:09:00 -0700 (PDT) From: Alessandro Zanni To: shuah@kernel.org Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, skhan@linuxfoundation.org, anupnewsmail@gmail.com, Alessandro Zanni Subject: [PATCH 1/2] selftests/intel_pstate: fix operand expected Date: Mon, 28 Oct 2024 20:08:43 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: 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" Running "make kselftest TARGETS=3Dintel_pstate" results in the following errors: - ./run.sh: line 90: / 1000: syntax error: operand expected (error token is "/ 1000") - ./run.sh: line 92: / 1000: syntax error: operand expected (error token is "/ 1000") This fix allows to have cross-platform compatibility when using arithmetic expression with command substitutions. Signed-off-by: Alessandro Zanni --- tools/testing/selftests/intel_pstate/run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/intel_pstate/run.sh b/tools/testing/se= lftests/intel_pstate/run.sh index e7008f614ad7..0c1b6c1308a4 100755 --- a/tools/testing/selftests/intel_pstate/run.sh +++ b/tools/testing/selftests/intel_pstate/run.sh @@ -87,9 +87,9 @@ mkt_freq=3D${_mkt_freq}0 =20 # Get the ranges from cpupower _min_freq=3D$(cpupower frequency-info -l | tail -1 | awk ' { print $1 } ') -min_freq=3D$(($_min_freq / 1000)) +min_freq=3D$((_min_freq / 1000)) _max_freq=3D$(cpupower frequency-info -l | tail -1 | awk ' { print $2 } ') -max_freq=3D$(($_max_freq / 1000)) +max_freq=3D$((_max_freq / 1000)) =20 =20 [ $EVALUATE_ONLY -eq 0 ] && for freq in `seq $max_freq -100 $min_freq` --=20 2.43.0 From nobody Mon Nov 25 07:52:44 2024 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (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 A5D881E1A2D; Mon, 28 Oct 2024 19:09:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730142549; cv=none; b=bvOnPPiOSSj+CKeBZJWZsrFwtUwP/CgBzFzAkokvDSUDlGcjXask7Nm5YgAjNj5ZilPbcvy8Tl+HtUfcgu/eXYcf0NICCBm3aFUSr4r0/Os2DQ1WFMtV2zv5HyYDpWBoSX77MDZLksdO1ctkB1Fx8ZVfID+Je1AMCGn9+pDBacA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730142549; c=relaxed/simple; bh=dDq6kphTgCW2WMRnN/jFCBhC/kVZkBsOe/mTYXc0bJs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mJLWLwEwz72DfzJ7WpCcYDEph2wNEmzVgy4IveWr/s79a07MTW4XaR+GoxzFO/KXGb8pnX1I/pWvtC3UqYtnpf68qwGGascSx7OPZF/pDYRzfyOxBbuGTPsdi+tqqrUKZ3GwLELPbqZiwLcDbjSLPQYHq8ffvmWADruxwd4V5AE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=PrwARFaH; arc=none smtp.client-ip=209.85.221.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PrwARFaH" Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-37d4b0943c7so3165044f8f.1; Mon, 28 Oct 2024 12:09:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730142546; x=1730747346; 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=T57U1br5OER9E6JOMq37nd4OrpRSXTFt3KvDpfzt6r0=; b=PrwARFaHKpiQ+ToPTt9M7hjqvBDjrQXSsBUMilr81oPBv6DXP7yQTAzMCV9xKUhvOF arvskKoT0bm/GlW4JHV2KWYyubD+JswQWyrF6grnaci161VthOn4TvXINrGEVMcZvkdO jp8lpcCKHmvVPRAusssnTUCPkBOEv8Ntgcd8tNqZHrga/Oc0mM2RlpVtNaHyGuHgWKNU 5oK9WHojiuqk3UrMHaWPUBjdQrUZd97udu/zYgcJdMkT//aWrnH2no+muNkxa5GBcvb9 ajz/eWSbe4wXASvsBVf34yZaZoZBGdP6Vo6Yux3y3kRpQhSHBOie06gkQt1g6rv88ctc 3OPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730142546; x=1730747346; 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=T57U1br5OER9E6JOMq37nd4OrpRSXTFt3KvDpfzt6r0=; b=aiYLocIAT2woZyQ0OTl90qQdO+pH4i5rgpHeCGP3A1GSFDzPdGfWta2PvHnI/gaFhT ot5EZLQEUDbNqqQ2tPGLzk9ZEHgWpUFEbACVVZ8bCDHpBMozpdFSlqBiSNLcmNvFFYa/ J9qclSaOnN27bUgTcGVob1pOZ9OvEcUynsNzOJ2/oOb9G5DWlHrtL0xKrXnvKUutMHgc BFiessmFhKzJtt4YUfFygvYYnDHDhU/M/Mf5wpXHPG7I5vorh0modFtmyMgmzf+VCjzP ICQTumbXXsPe4o7IwmxtH33pmcQbc8HcQTt4N6YVJvcW00EYJAp21iYsytMUjpNz2kuh 4Glw== X-Forwarded-Encrypted: i=1; AJvYcCX0yIdVJPWW14nBsmp/MNa1771Oq9pgkY76Wsu8IxhZ00AWVRj2Zpx2U7eZGi0QaVns7O162D4tCdBTtAg=@vger.kernel.org X-Gm-Message-State: AOJu0Yxo2/T06C0LRqqZsElui7UzQQAcgzeXai4uqPA09aAQupMHQEHh 89thLGWtFTzw/N5t6BwznRFoZSZt2r+ELHrw2C2PjmdK6N7xseFuo2S3lfT7 X-Google-Smtp-Source: AGHT+IHhCMAEgqQCGgxaB6xQiFxHeIC+H4kR3eiAZF+NqG8A2ReHuhJCJJvRcwN/emnyiIHC7Bm0Lw== X-Received: by 2002:a5d:6083:0:b0:37d:5436:4a1 with SMTP id ffacd0b85a97d-380610f2575mr6772285f8f.3.1730142545872; Mon, 28 Oct 2024 12:09:05 -0700 (PDT) Received: from localhost.localdomain ([78.210.79.232]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b1c69esm10314398f8f.13.2024.10.28.12.09.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 12:09:05 -0700 (PDT) From: Alessandro Zanni To: shuah@kernel.org Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, skhan@linuxfoundation.org, anupnewsmail@gmail.com, Alessandro Zanni Subject: [PATCH 2/2] selftests/intel_pstate: cpupower command not found Date: Mon, 28 Oct 2024 20:08:44 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: 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" Running "make kselftest TARGETS=3Dintel_pstate" results in the following errors: - ./run.sh: line 89: cpupower: command not found - ./run.sh: line 91: cpupower: command not found if the cpupower is not installed. Since the test depends on cpupower, this patch stops the test if the cpupower is not installed. Signed-off-by: Alessandro Zanni --- tools/testing/selftests/intel_pstate/run.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/testing/selftests/intel_pstate/run.sh b/tools/testing/se= lftests/intel_pstate/run.sh index 0c1b6c1308a4..6a3b8503264e 100755 --- a/tools/testing/selftests/intel_pstate/run.sh +++ b/tools/testing/selftests/intel_pstate/run.sh @@ -44,6 +44,11 @@ if [ $UID !=3D 0 ] && [ $EVALUATE_ONLY =3D=3D 0 ]; then exit $ksft_skip fi =20 +if ! command -v cpupower &> /dev/null; then + echo $msg cpupower could not be found, please install it >&2 + exit $ksft_skip +fi + max_cpus=3D$(($(nproc)-1)) =20 function run_test () { --=20 2.43.0