[LTP] [PATCH] device-drivers/cpufreq_boost: skip test on virtual machines

Cyril Hrubis chrubis@suse.cz
Wed Jun 23 13:38:30 CEST 2021


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.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list