Re: [PATCH 2/3] rteval: Add run_on_isolcpus option to measurements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



čt 10. 8. 2023 v 11:01 odesílatel Tomas Glozar <tglozar@xxxxxxxxxx> napsal:
> @@ -146,7 +146,15 @@ measurement profiles, based on their characteristics"""
>
>      def SetupModuleOptions(self, parser):
>          "Sets up all the measurement modules' parameters for the option parser"
> -        self.__container.SetupModuleOptions(parser, self.__cfg)
> +        grparser = self.__container.SetupModuleOptions(parser, self.__cfg)
> +
> +        # Set up options specific for measurement module group
> +        grparser.add_argument("--measurement-run-on-isolcpus",
> +                              dest="measurement___run_on_isolcpus",
> +                              action="store_true",
> +                              default=self.__cfg.GetSection("measurement").setdefault("run-on-isolcpus", False).lower()
> +                                      == "true",
> +                              help="Include isolated CPUs in default cpulist")
>
>

This code is broken, it does not work when rteval.conf has no
run-on-isolcpus field:

$ sudo ./rteval-cmd -D --measurement-cpulist=0-7 --loads-cpulist=1,3,5,7
got system topology: 1 node system (8 cores per node)
Traceback (most recent call last):
 File "/home/tglozar/dev/rteval/./rteval-cmd", line 297, in <module>
   measuremods.SetupModuleOptions(parser)
 File "/home/tglozar/dev/rteval/rteval/modules/measurement/__init__.py",
line 155, in SetupModuleOptions
   default=self.__cfg.GetSection("measurement").setdefault("run-on-isolcpus",
False).lower()
AttributeError: 'bool' object has no attribute 'lower'

It's trying to lower the boolean value. I'll send a fixed v2 patch.





[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux