Re: [PATCH v4 6/8] selftests/resctrl: Make benchmark command const and build it with pointers

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

 



Hi Ilpo,

On 8/31/2023 4:08 AM, Ilpo Järvinen wrote:
> Benchmark command is used in multiple tests so it should not be
> mutated by the tests but CMT test alters span argument. Due to the
> order of tests (CMT test runs last), mutating the span argument in CMT
> test does not trigger any real problems currently.
> 
> Mark benchmark_cmd strings as const and setup the benchmark command
> using pointers. Because the benchmark command becomes const, the input
> arguments can be used directly. Besides being simpler, using the input
> arguments directly also removes the internal size restriction.
> 
> CMT test has to create a copy of the benchmark command before altering
> the benchmark command.
> 
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
> Tested-by: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxxxxx>
> Reviewed-by: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxxxxx>
> ---

Thank you.

Reviewed-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>

Reinette



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux