Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp2636987imi; Mon, 25 Jul 2022 04:17:07 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tqqRgUVokOliqRKemGy+G8PdwkKk0+3cDWMdNx0H7N31aLKl0k6FnLCcQcIt+dRT6u2tje X-Received: by 2002:a05:6402:3685:b0:43b:dfd3:9487 with SMTP id ej5-20020a056402368500b0043bdfd39487mr10880851edb.32.1658747827155; Mon, 25 Jul 2022 04:17:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658747827; cv=none; d=google.com; s=arc-20160816; b=snY9zWcTVBcz0tmyqj1GvEkVaeRsK6WsfROTAExI/GyKsoqUNWP7zGCBP00h5InqWo /E80mgZZYntEu0Ozna3KVmk1FYh7+ZMf46GszVyvpCGvGO91FFXhPXV4Q02Sv6LnFZ4/ s5sUQNcmMAEy4MIac7FnNFJ/iLK2eldrnt6kK4N+GhOqAG3HYVOCvQ0yNPZ46Kkm3Cm0 jj2ONsm5l1z+cbT9DEmF4l7RgZMT7ZutJgYPqX7/vJwjJb3oT7grGhXmNvOFEgMaRIsb wBz1oCCNVWnLNqQaHr6tHwUPa7xPvupo6Ja0QUe3QDp3PzhZ/UdSN9hhd13hEgiDTxMe RSXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=n+BeAGcM1vq8ZV/ndWyo+zk8e0dfuS3zI75lX0M5C2w=; b=pSija9n9t+HsKqglB4RlaKO7R7V7yRW+3GIzbrM9PzGw25KKncIc+gM3mb+WB1A4Vr ZmM3r3u9jjnPvrcydvA+ihQybpBKMOgeLlV+QUdHtVuYheOjjc/KfF5CEBmoK2uFk1uI NGzRaFQfGw1LRo/7tfAwlAQ/AEUt+Y2IQSItMpL4rTZRk/KrD9ilCfxyrmbdh/KPxmXA UylpQkO5NrrcmrsbNwItKE6QzEU07/dC1VXjknkaGlli4PW+krqOlKs37zHXNCBiVniK vuBeqFArv/0d4dZ86Iitb9rWqV1J2FIdTrONxwBrek7taxKUoBzQF5KG4W8Ev1hrJTXj mSyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20210112.gappssmtp.com header.s=20210112 header.b=4ms6i4la; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ee42-20020a056402292a00b0043a9c5ac052si11550660edb.375.2022.07.25.04.16.42; Mon, 25 Jul 2022 04:17:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@resnulli-us.20210112.gappssmtp.com header.s=20210112 header.b=4ms6i4la; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234927AbiGYLHK (ORCPT + 99 others); Mon, 25 Jul 2022 07:07:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231513AbiGYLHF (ORCPT ); Mon, 25 Jul 2022 07:07:05 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 836E219C0B for ; Mon, 25 Jul 2022 04:07:03 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id u12so8394234edd.5 for ; Mon, 25 Jul 2022 04:07:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=n+BeAGcM1vq8ZV/ndWyo+zk8e0dfuS3zI75lX0M5C2w=; b=4ms6i4laHSu5iZlef+raBf2V73x2tuq6e3cOiFP1UAUH43CgRJFYGWCgpdOzxChBbB uuPPG6JVj1dwUw5a8a6cElip0FDeUiCqrm/TLUIaTDrWajPRVVYc3wMmYfd8RhP/vDRR O3t9OxcFanbV9pBTorqDaNbDfKmuydzSIa8emvXpbf3WcNfX+inT5dnBYbC/VefyZLuI D/ypCWO62zzThBg+noSmy5o81mGzm1om3cTxwMSn+3wUCytQcHeb4VSrqzCVhzb25hvG DkLy0AzOKHAuZzHHkvzv9d5mZYZIeSM8eaAcHgXMAayXA+MH5zVcQoaPLc9+3o/ekh2u zyWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=n+BeAGcM1vq8ZV/ndWyo+zk8e0dfuS3zI75lX0M5C2w=; b=xtQp0lrCPCtCJhSOPu8iLMwuLQ0lbJeEucyqJpK7Jz4iklLcRLDkgevFn8+/caL+TQ DVOq757FAN8xJ9PCjS7Edx21ZHwvO+kP2Ad53lqwoQtMk1PVMzIbu/drZTsI+ACJabhO MiVBYGHGVPRtUfoU27ZVVziPYnM6PVFlLU/8npZ/HBCbnw1uxMLZ/CZP1hAny8SbCsjs zRaGx4Fc45w4OydDJJbLkw3H2layb5d1U83U/MQcaF3vklVMGl7xQxs6g+6XdrowxIoO KNJqhsEV+YgUKQH0H6WZTBxHOlZDrISvmhtpotFR8Ed+grlcqT4/q+KpLmgX87UfJMYa B8Sg== X-Gm-Message-State: AJIora9MYdjWNJnNtGNEuItXWDAQygNnjBKjpjazLIz++9V/i/ye+Z8i cBnBf6NomWb2on/rjkRmhlIm/w== X-Received: by 2002:a05:6402:1117:b0:43b:c965:549e with SMTP id u23-20020a056402111700b0043bc965549emr12589985edv.366.1658747221572; Mon, 25 Jul 2022 04:07:01 -0700 (PDT) Received: from localhost (mail.chocen-mesto.cz. [85.163.43.2]) by smtp.gmail.com with ESMTPSA id b7-20020aa7c6c7000000b0043a78236cd2sm7037185eds.89.2022.07.25.04.07.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 04:07:00 -0700 (PDT) Date: Mon, 25 Jul 2022 13:07:00 +0200 From: Jiri Pirko To: Vikas Gupta Cc: Jakub Kicinski , Jiri Pirko , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" , dsahern@kernel.org, stephen@networkplumber.org, Eric Dumazet , pabeni@redhat.com, ast@kernel.org, leon@kernel.org, linux-doc@vger.kernel.org, corbet@lwn.net, Michael Chan , Andrew Gospodarek Subject: Re: [PATCH net-next v6 1/2] devlink: introduce framework for selftests Message-ID: References: <20220723042206.8104-1-vikas.gupta@broadcom.com> <20220723042206.8104-2-vikas.gupta@broadcom.com> <20220723091600.1277e903@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mon, Jul 25, 2022 at 10:48:39AM CEST, vikas.gupta@broadcom.com wrote: >Hi Jiri, > >On Mon, Jul 25, 2022 at 1:23 PM Jiri Pirko wrote: >> >> Sat, Jul 23, 2022 at 06:16:00PM CEST, kuba@kernel.org 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' ? Just "id". Thanks! > >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!