[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6f52c49f-10c8-0097-9d0f-0ee99925ad9a@linuxfoundation.org>
Date: Mon, 28 Mar 2022 08:56:35 -0600
From: Shuah Khan <skhan@...uxfoundation.org>
To: "Meng, Li (Jassmine)" <Li.Meng@....com>,
"Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
"Huang, Ray" <Ray.Huang@....com>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>
Cc: "Fontenot, Nathan" <Nathan.Fontenot@....com>,
"Sharma, Deepak" <Deepak.Sharma@....com>,
"Deucher, Alexander" <Alexander.Deucher@....com>,
"Limonciello, Mario" <Mario.Limonciello@....com>,
"Su, Jinzhou (Joe)" <Jinzhou.Su@....com>,
"Yuan, Perry" <Perry.Yuan@....com>,
"Du, Xiaojian" <Xiaojian.Du@....com>,
Viresh Kumar <viresh.kumar@...aro.org>,
Borislav Petkov <bp@...en8.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH 2/3] cpupower: Introduce a new unit test module for AMD
P-State driver
On 3/28/22 7:57 AM, Meng, Li (Jassmine) wrote:
> [AMD Official Use Only]
>
> Hi Shuah:
>
> Thank you very much for your valuable suggestions.
> We will adapt it to test our AMD P-State driver. But we haven't decided which one to adapt, kunit or kselftest.
>
> Requirements for our unit test module:
> - It can access kernel internal structures and functions which aren't exposed to user space.
> - It is implemented through the script trigger CPU benchmark app in conjunction with the kernel module.
>
> Therefore, next, we will study which method can meet the above requirements.
> Can you give us some suggestions?
>
No top posting please. If you need to access kernel internal structures
and functions KUNit is a better choice for you as long as all of the
testing can be done in the kernel driver.
If kernel internal structures and functions need to be tested from user-space,
then a kernel driver test module and a user-space kselftest shell or C program
is the approach to take.
> -----Original Message-----
> From: Shuah Khan <skhan@...uxfoundation.org>
> Sent: Wednesday, March 23, 2022 10:15 PM
> To: Meng, Li (Jassmine) <Li.Meng@....com>; Rafael J . Wysocki <rafael.j.wysocki@...el.com>; Huang, Ray <Ray.Huang@....com>; linux-pm@...r.kernel.org
> Cc: Fontenot, Nathan <Nathan.Fontenot@....com>; Sharma, Deepak <Deepak.Sharma@....com>; Deucher, Alexander <Alexander.Deucher@....com>; Limonciello, Mario <Mario.Limonciello@....com>; Su, Jinzhou (Joe) <Jinzhou.Su@....com>; Yuan, Perry <Perry.Yuan@....com>; Du, Xiaojian <Xiaojian.Du@....com>; Viresh Kumar <viresh.kumar@...aro.org>; Borislav Petkov <bp@...en8.de>; linux-kernel@...r.kernel.org; Shuah Khan <skhan@...uxfoundation.org>
> Subject: Re: [PATCH 2/3] cpupower: Introduce a new unit test module for AMD P-State driver
>
> [CAUTION: External Email]
>
> On 3/23/22 1:15 AM, Meng Li wrote:
>> amd-pstate-ut is a kernel module for testing the functions of AMD P-State driver.
>>
>> It can verify the required conditions and basic functions of AMD
>> P-State driver before integration test.
>>
>
> Can you elaborate on the need for a kernel module? It would be helpful to know tne value the mdoule adds and why it is necessary. Include details on why it can't be done as part of the user-space program.
>
> I am not saying it isn't necssary, I would like to know the reasons before I review the patch.
>
> Also if this is a driver test, why not use other test frameworks such as kunit or kselftest. cpupower is user-space utility and driver debug code would not belong in here.
>
thanks,
-- Shuah
Powered by blists - more mailing lists