Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp925395pxb; Wed, 6 Apr 2022 04:28:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmCRsdXKqAdg8UJsUYbq+aBgaJUZoK3FRxb1qNEQT6X2tE5HDqQlMf8nEwgBs+ijSFIEUo X-Received: by 2002:a17:902:70c1:b0:156:16c0:dc7b with SMTP id l1-20020a17090270c100b0015616c0dc7bmr8161313plt.85.1649244495583; Wed, 06 Apr 2022 04:28:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649244495; cv=none; d=google.com; s=arc-20160816; b=o8zH+H/I+L8AGzRI8KvUBJkaafUKz741nJJhIGxmdIEYIXyR4J77XsdTwLUq8kY3M2 Rq/Iu1NZ0vvd7dZtxpSPxpBx9zNJG/pwmK2DjRBmBaVzejba6Bndew+DdiPIV03yWc5j RvA2c7FSM4AUh3wi/5MLZWSLetdt+WUhIKtBcFZLUhv7PWyDv2ofUo7xN70sdXZg29op lMimvU+BnY8KsTUgZJ2BEacuIienuYQeqxKdqjGFu89wU1iYeTmd/HTqGg6HdZwv0DFT Je4erlOSDN5PayKZHEpyGxF7ZgyRI5VdPpyuGcBTi0ar2udT83Oxiiqj5llosa7N1U7q 6kXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=79rrKpJvSV/IyMMLjk1fyhAdjuzODykc4KbTAF2mUFs=; b=IoDeJ78GhuONTTxz2HMkbmlBAqsaSvG8p0crZO25/T0J5CYA3lQ50Ux0xp2m+MH08I EtD5+kTtBBvSavcCFYJUQHTNgs219QJN5JyMKnYCxooL2rnc10B7SXPiN1H+Bs8xqanm DqNiegbEM4jTEcmpk1NeCdmIb5HVa/pMOfPwlnLK7GsbruN2RVA+GNJvYFVD6CfZOsn/ PbfqTIrInwdIv4dRaeT9yCgN5h/Y6qI6PyZc51R92qIwvaqHdk7moARlzLwPBc1euu61 QNxEPd7DskaOO/ppAO2W6CIvqIO3DGwB/6JCXGXpSLFpRq8VN1eY1NOrsCWa5RBjQU6C o+FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=FiOVSqtE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id mi2-20020a17090b4b4200b001bf35bf24d7si4947120pjb.63.2022.04.06.04.28.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 04:28:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=FiOVSqtE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 95ED54E62A4; Wed, 6 Apr 2022 02:50:36 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343957AbiDEWuC (ORCPT + 99 others); Tue, 5 Apr 2022 18:50:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1392189AbiDEPft (ORCPT ); Tue, 5 Apr 2022 11:35:49 -0400 Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 518DA12D; Tue, 5 Apr 2022 06:48:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1649166488; x=1680702488; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=79rrKpJvSV/IyMMLjk1fyhAdjuzODykc4KbTAF2mUFs=; b=FiOVSqtEplqlpGbV24QKDAr+i8WFGbW038mF84zzzjMGLHloCAF5NPgY spNiGw/JW64vBk2PDKMYeRrzNnvvX9UHBY/B/HepKgx6Ad8lZokZPYdBy 7OpaZ9BsvHs1aZCwW+kuNlJhW2Z2+5tJgZDQoPpNYBx3HZTZqRoW8yTb2 L/kbhgJPZ67FRSZN5VimMCXaFg5e7MBpW2w5kOfvVuD4jRmwgAUY0TEzv O9FAaZn51Fi/MSdDTB4FNunqqBA9Ty8O7mk1/2xsvz1tde3N99GsfhgrV 4GYLxtosbMlYV/YxgZvfwIh/MPM7kvdpyaf1CLkQR25ioPVRlRFcC7BrW w==; Date: Tue, 5 Apr 2022 15:48:05 +0200 From: Vincent Whitchurch To: Jonathan Cameron CC: "linux-kernel@vger.kernel.org" , kernel , "devicetree@vger.kernel.org" , "linux-um@lists.infradead.org" , "shuah@kernel.org" , "brendanhiggins@google.com" , "linux-kselftest@vger.kernel.org" , "linux-iio@vger.kernel.org" , "lgirdwood@gmail.com" , "broonie@kernel.org" , "a.zummo@towertech.it" , "alexandre.belloni@bootlin.com" , "linux-rtc@vger.kernel.org" , "corbet@lwn.net" , "linux-doc@vger.kernel.org" Subject: Re: [RFC v1 08/10] iio: light: vcnl4000: add roadtest Message-ID: <20220405134805.GA28574@axis.com> References: <20220311162445.346685-1-vincent.whitchurch@axis.com> <20220311162445.346685-9-vincent.whitchurch@axis.com> <20220320170253.5b946c84@jic23-huawei> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20220320170253.5b946c84@jic23-huawei> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Sun, Mar 20, 2022 at 06:02:53PM +0100, Jonathan Cameron wrote: > Very interesting bit of work. My current approach for similar testing > is to write a qemu model for the hardware, but that currently > requires carefully crafted tests. Most of the time I'm only doing > that to verify refactoring of existing drivers. Thank you for taking a look! > One thing that makes me nervous here is the python element though > as I've not written significant python in about 20 years. > That is going to be a burden for kernel developers and maintainers... > Nothing quite like badly written tests to make for a mess in the long run > and I suspect my python for example would be very very badly written :) There's a bunch of static checkers to ensure that the code follows some basic guidelines, and CI can check that the tests work consistently, and also calculate metrics such as test execution time and code coverage, so even non-idiomatic Python in the tests wouldn't be entirely broken. And unlike driver code, if the tests for a particular driver later do turn out to be bad (in what way?), we could just throw those particular tests out without breaking anybody's system. > Cut and paste will of course get us a long way... Isn't some amount of copy/paste followed by modification to be expected even if the framework is written in say C (just as there's already copy/paste + modification involved when writing drivers)? As for the core logic of individual driver tests excluding the framework bits, I have a hard time imagining what Python syntax looks like to someone with no knowledge of Python, so yes, I guess it's going to be harder to review. > I dream of a world where every driver is testable by people with out hardware > but I fear it may be a while yet. Hopefully this will get us a little > closer! > > I more or less follow what is going on here (good docs btw in the earlier > patch definitely helped). > > So far I'm thoroughly in favour of road test subject to actually being > able to review the tests or getting sufficient support to do so. > It's a 'how to scale it' question really... Would rewriting the framework in C and forcing tests to be written in that language mean that maintainers would be able to review tests without external support?