Re: [PATCH net-next v6 1/2] devlink: introduce framework for selftests

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

 



Hi Jiri,

On Mon, Jul 25, 2022 at 1:23 PM Jiri Pirko <jiri@xxxxxxxxxxx> wrote:
>
> Sat, Jul 23, 2022 at 06:16:00PM CEST, kuba@xxxxxxxxxx wrote:
> >On Sat, 23 Jul 2022 09:52:05 +0530 Vikas Gupta wrote:
> >> +enum devlink_attr_selftest_test_id {
> >> +    DEVLINK_ATTR_SELFTEST_TEST_ID_UNSPEC,
> >> +    DEVLINK_ATTR_SELFTEST_TEST_ID_FLASH,    /* flag */
> >> +
> >> +    __DEVLINK_ATTR_SELFTEST_TEST_ID_MAX,
> >> +    DEVLINK_ATTR_SELFTEST_TEST_ID_MAX = __DEVLINK_ATTR_SELFTEST_TEST_ID_MAX - 1
> >> +};
> >> +
> >> +enum devlink_selftest_test_status {
> >> +    DEVLINK_SELFTEST_TEST_STATUS_SKIP,
> >> +    DEVLINK_SELFTEST_TEST_STATUS_PASS,
> >> +    DEVLINK_SELFTEST_TEST_STATUS_FAIL
> >> +};
> >> +
> >> +enum devlink_attr_selftest_result {
> >> +    DEVLINK_ATTR_SELFTEST_RESULT_UNSPEC,
> >> +    DEVLINK_ATTR_SELFTEST_RESULT,                   /* nested */
> >> +    DEVLINK_ATTR_SELFTEST_RESULT_TEST_ID,           /* u32,
> >> +                                                     * enum devlink_attr_selftest_test_id
> >> +                                                     */
> >> +    DEVLINK_ATTR_SELFTEST_RESULT_TEST_STATUS,       /* u8,
> >> +                                                     * enum devlink_selftest_test_status
> >> +                                                     */
> >> +
> >> +    __DEVLINK_ATTR_SELFTEST_RESULT_MAX,
> >> +    DEVLINK_ATTR_SELFTEST_RESULT_MAX = __DEVLINK_ATTR_SELFTEST_RESULT_MAX - 1
> >
> >Any thoughts on running:
> >
> >       sed -i '/_SELFTEST/ {s/_TEST_/_/g}' $patch
>
> Sure, why not. But please make sure you keep all other related things
> (variables, cmdline opts) consistent.
>
> Thanks!
Does the 'test_id' in command line
 'devlink dev selftests run DEV test_id flash'
will still hold good if DEVLINK_ATTR_SELFTEST_RESULT_TEST_ID changes
to DEVLINK_ATTR_SELFTEST_RESULT_ID ?
or it should be
'devlink dev selftests run DEV selftest_id flash' ?

Thanks,
Vikas


>
>
> >
> >on this patch? For example DEVLINK_ATTR_SELFTEST_RESULT_TEST_STATUS
> >is 40 characters long, ain't nobody typing that, and _TEST is repeated..
> >
> >Otherwise LGTM!

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux