Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2715685iog; Mon, 27 Jun 2022 01:02:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tP+2oOelf5zSChcB4JY79N1vkJBaDRUXVdM3tZNw/udxjC5yREdvEIHAwgcGBZsN8Ywj3x X-Received: by 2002:a17:906:f14b:b0:722:fb06:83a9 with SMTP id gw11-20020a170906f14b00b00722fb0683a9mr11937903ejb.473.1656316920904; Mon, 27 Jun 2022 01:02:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656316920; cv=none; d=google.com; s=arc-20160816; b=IvXx42c2n4IOxK+Aiyq2jo1hh+XsB7jZkjDowbREqe50cSd59tmUn3PDy9kglebtaT gvFyVV4CbMMGVMSAr3WBrtsB6XEtyujxN4XMutZ+U2ZLPGKEm8K0mlPt28m2hRzidntK QDVhSrIzD9uZn8z8eNPWFkw1uqpsdU60y8pu/Xo/5M2GIABfmaf/dRCMu2gfbktU9hF1 2moeNiZp0v+OW6jCgds5pPRaano0BWH4mV5s0pjp92LtHEH9tKkdaBVlEKSsGr7s1ami 61mnpJfDuqZPHePRB0ljyA0tUkFCPPvyz3QUGrliI2HQWfggmiR7zgrT9T1UShOYvoNA J+9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=lf4yj+6FH3gNxqcU8txlBalUgOkWR6VEzFtr+kOB45w=; b=bivGpnThWFrPfsUY624ecAGh/TUQwWhESlSxCEYW965vEXDjgTcAAqHFojq0d45ECB rbgFfeOlaUrv04kq+RnCI2rxioX8FIkQjdms3C6uHIJFa6uDQ/5Mk/NGihPpbkboYu4Q GeKfdFyxRcwR9EhKf4oDGtJ9LTGs540+vN909JC2/7VSTn27rbg8Bw9YVU+x6f/OY15J 6OZinvlpasimNqitvvcHVHchJpwyrClICNeMY5LO3BrUQALjydLwi1h6EJWEEPaUgfhh dEe6wbwyscE/WuDb5UoP38nvQMWODy6aID+6u09gyRM7IsWMmSTeGMUrmjA8zxdqLBmk Q7Mg== ARC-Authentication-Results: i=1; mx.google.com; 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 g2-20020a170906868200b00718c04a51a5si8735490ejx.591.2022.06.27.01.01.36; Mon, 27 Jun 2022 01:02:00 -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; 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 S232895AbiF0HWs (ORCPT + 99 others); Mon, 27 Jun 2022 03:22:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232627AbiF0HWo (ORCPT ); Mon, 27 Jun 2022 03:22:44 -0400 Received: from mail-qv1-f45.google.com (mail-qv1-f45.google.com [209.85.219.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B9445592; Mon, 27 Jun 2022 00:22:43 -0700 (PDT) Received: by mail-qv1-f45.google.com with SMTP id t16so13635867qvh.1; Mon, 27 Jun 2022 00:22:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lf4yj+6FH3gNxqcU8txlBalUgOkWR6VEzFtr+kOB45w=; b=r8SMDV+BhZ1EPLp/livoqkezb+I7n4kZcaMHomwrlNEJRheCmsv32HfK3N8FSCRQC0 va50nPKyB0j/ZzQq1VVQarLZML2cBvscG7Mg7FtrHFk0+7wKLEwX6vAz+L1UdJpNHNgd pEWy2pbdP+drtYs9tYy0DSThilPXVLplDwR3SIrpDZAQaWngOX0lh41s/SuPL0bSf8FR MwVg3gldGIrJlE03lgCDgQG6uJFxX3RaB2NZINuFQVYbUGqNcm4pKNRMUVURxRY7dFyM JvMAdFKgysxkGWAUartu1CRFSB5HFtIqIOINGOqXTgUx855j/R4z/0A4QvxddPY8Z5ro H+1g== X-Gm-Message-State: AJIora84feO3h55W2w1ffYNZQ0XSbkOdZ0ZLS/4cwBEihujXoGBEdnWb tXLbKgfbxjcqOCR89kyVhNBGRLtTAjovjA== X-Received: by 2002:a05:6214:238d:b0:46e:6864:ac18 with SMTP id fw13-20020a056214238d00b0046e6864ac18mr7573467qvb.78.1656314562655; Mon, 27 Jun 2022 00:22:42 -0700 (PDT) Received: from mail-yw1-f175.google.com (mail-yw1-f175.google.com. [209.85.128.175]) by smtp.gmail.com with ESMTPSA id c7-20020a05620a268700b006aef1e5eb87sm8349155qkp.24.2022.06.27.00.22.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Jun 2022 00:22:42 -0700 (PDT) Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-3177f4ce3e2so76567857b3.5; Mon, 27 Jun 2022 00:22:42 -0700 (PDT) X-Received: by 2002:a81:9bcc:0:b0:317:9ff1:5a39 with SMTP id s195-20020a819bcc000000b003179ff15a39mr13857699ywg.384.1656314561880; Mon, 27 Jun 2022 00:22:41 -0700 (PDT) MIME-Version: 1.0 References: <20220213025739.2561834-1-liambeguin@gmail.com> <20220213025739.2561834-7-liambeguin@gmail.com> In-Reply-To: <20220213025739.2561834-7-liambeguin@gmail.com> From: Geert Uytterhoeven Date: Mon, 27 Jun 2022 09:22:29 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v15 06/10] iio: test: add basic tests for the iio-rescale driver To: Liam Beguin Cc: Peter Rosin , Jonathan Cameron , Andy Shevchenko , Lars-Peter Clausen , Linux Kernel Mailing List , linux-iio@vger.kernel.org, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Rob Herring Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 Hi Liam, On Mon, Feb 14, 2022 at 12:00 AM Liam Beguin wrote: > The iio-rescale driver supports various combinations of scale types and > offsets. These can often result in large integer multiplications. Make > sure these calculations are done right by adding a set of kunit test > cases that build on top of iio-test-format. > > To run these tests, add the following to .kunitconfig > $ cat .kunitconfig > CONFIG_IIO=y > CONFIG_IIO_RESCALE_KUNIT_TEST=y > CONFIG_KUNIT=y > > Then run: > $ ./tools/testing/kunit/kunit.py run --kunitconfig .kunitconfig > > Signed-off-by: Liam Beguin > Reviewed-by: Peter Rosin Thanks for your patch, which is now commit 8e74a48d17d509bf ("iio: test: add basic tests for the iio-rescale driver") in v5.18. > --- a/drivers/iio/test/Kconfig > +++ b/drivers/iio/test/Kconfig > @@ -4,6 +4,16 @@ > # > > # Keep in alphabetical order > +config IIO_RESCALE_KUNIT_TEST > + bool "Test IIO rescale conversion functions" Is there any reason this cannot be tristate, so I can always enable this as a module, and run the test by loading the module whenever I want? > + depends on KUNIT && !IIO_RESCALE > + default KUNIT_ALL_TESTS > + help > + If you want to run tests on the iio-rescale code say Y here. > + > + This takes advantage of ARCH=um to run tests and should be used by > + developers to tests their changes to the rescaling logic. > + > config IIO_TEST_FORMAT > bool "Test IIO formatting functions" > depends on KUNIT=y Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds