From mboxrd@z Thu Jan 1 00:00:00 1970 From: Krzysztof Kozlowski Date: Wed, 11 Aug 2021 12:12:11 +0200 Subject: [LTP] [PATCH] device-drivers/cpufreq_boost: skip test on virtual machines In-Reply-To: References: <20210623080157.26424-1-krzysztof.kozlowski@canonical.com> <2a08d5c4-c002-7284-03d1-ff4441f8c9c5@canonical.com> Message-ID: <34c93a03-ca56-1648-5db0-4f15d617b4d9@canonical.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it On 23/06/2021 17:33, Krzysztof Kozlowski wrote: > On 23/06/2021 13:38, Cyril Hrubis wrote: >> Hi! >>>> diff --git a/testcases/kernel/device-drivers/cpufreq/cpufreq_boost.c b/testcases/kernel/device-drivers/cpufreq/cpufreq_boost.c >>>> index b9739db37cb7..67917b3fea25 100644 >>>> --- a/testcases/kernel/device-drivers/cpufreq/cpufreq_boost.c >>>> +++ b/testcases/kernel/device-drivers/cpufreq/cpufreq_boost.c >>>> @@ -90,6 +90,9 @@ static void setup(void) >>>> unsigned int i; >>>> tst_require_root(); >>>> >>>> + if (tst_is_virt(VIRT_ANY)) >>>> + tst_brkm(TCONF, NULL, "running in a virtual machine, overclock not reliably measureable"); >>>> + >>>> for (i = 0; i < ARRAY_SIZE(cdrv); ++i) { >>>> fd = open(cdrv[i].file, O_RDWR); >>>> if (fd == -1) >>>> >>> >>> Optionally, under virtual machine the test failure could be converted to >>> accepted pass. This would still allow to test CPUfreq boosting >>> interface. Any preferences? >> >> I wonder what is the likehood of actually dicovering a bug by writing to >> the cpufreq boost file from within a VM, I guess that it's non-zero at >> least. > > It's a test of kernel interface and whether the driver accepts input via > sysfs... so not much of a real cpufreq test. Indeed maybe better to skip > the test explicitly instead of giving some false hopes that cpufreq is > being tested. Hi Cyril and all, Anything stops this patch from being applied? Best regards, Krzysztof