From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC579C433E0 for ; Thu, 14 Jan 2021 15:05:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BD7C923A5F for ; Thu, 14 Jan 2021 15:05:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729171AbhANPFQ (ORCPT ); Thu, 14 Jan 2021 10:05:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729125AbhANPFP (ORCPT ); Thu, 14 Jan 2021 10:05:15 -0500 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63A55C0613C1 for ; Thu, 14 Jan 2021 07:04:35 -0800 (PST) Received: by mail-ej1-x62d.google.com with SMTP id jx16so8590729ejb.10 for ; Thu, 14 Jan 2021 07:04:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NcbbwuTIw0XOxXbx1OMAv/zQ0f55cTFOH0Nbkr3v9jQ=; b=yEQItAvigUbfYWEhi52aXuHAPZ6tuAT+qCXXEz38nS35ib8OcfO7+gDDF4v51PSdqO yK6DXZVx+k8ENzwUIBM3pCe8Qm5RXLMR99pctX2BGhzzUafnl2uPG9GR5xhVL5+iqTK6 psk+q8hQ2VVxs1H+G6MVFLuMxpX5BkoJoyngpGmNxk6jWom4qSIxmJMywtK5LW+OehTn UoMfUhx+FUVFS0hHg91ARMaZMgJodjBwEVItDiQaF9Yd19jROYtqMzANthaPc1a39tmu C7iDgYdZ9RgcNAwyDDxoJ56VIfbn0G8cL1pEgiN0QBjCgtrB08+wDIFoHccqiGHTuDbR wJgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NcbbwuTIw0XOxXbx1OMAv/zQ0f55cTFOH0Nbkr3v9jQ=; b=Or1adciZLm4invkWUMe77tFEhfdi214LoIw7rEGsoIsMXJ+6sPM6S5oiWJ3XbHSoJK aHAtvbDw4dNGXxtAl8ouFEJVnjtmTgYSsvgmGZ102TXF+ypPCl1YdQ+M4LaKU4GZcBcG 6l1Ui60e3jPGtXmI/rr9PNXvVasTqjZWW3IYWnLTORejuQq8lin7swyuJKWnvbcTGzt5 VqrPPslynkrZ4F7aIomPE6R8stlIRGGJPYcHMAHdi36fkUH97XkaJOwQbLS4QPDboC1s XPcCc9Sokm82K2CgwGDp6e0xQ6eIMH9Ery7OyGm05lrSXx+mCGl9BV68Xj5t6SnbNn3g 7Lbw== X-Gm-Message-State: AOAM532unDT0uyiSg95Q4PpLhYD1UL5K5lYKSFEWDYXYEOBsbRI0W6MH KgvwAcvcqJqviSsapXNjd+qVNxSLvtb6sCKTSukpAA== X-Google-Smtp-Source: ABdhPJzfhHY7ArHTAP1cnKCI9FVF1ePtOXIVFPGTJb4hX8UeuqKZq4J5eTmoMo9wmuacHVDMDI66XIwVLCYvcqL1JVQ= X-Received: by 2002:a17:906:19c3:: with SMTP id h3mr5543469ejd.429.1610636673865; Thu, 14 Jan 2021 07:04:33 -0800 (PST) MIME-Version: 1.0 References: <20210107025731.226017-1-warthog618@gmail.com> <20210107025731.226017-2-warthog618@gmail.com> In-Reply-To: <20210107025731.226017-2-warthog618@gmail.com> From: Bartosz Golaszewski Date: Thu, 14 Jan 2021 16:04:23 +0100 Message-ID: Subject: Re: [PATCH v2 1/7] selftests: gpio: rework and simplify test implementation To: Kent Gibson Cc: LKML , linux-gpio , linux-kselftest@vger.kernel.org, Linus Walleij , Shuah Khan , Bamvor Jian Zhang Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 7, 2021 at 3:58 AM Kent Gibson wrote: > > The GPIO mockup selftests are overly complicated with separate > implementations of the tests for sysfs and cdev uAPI, and with the cdev > implementation being dependent on tools/gpio and libmount. > > Rework the test implementation to provide a common test suite with a > simplified pluggable uAPI interface. The cdev implementation utilises > the GPIO uAPI directly to remove the dependence on tools/gpio. > The simplified uAPI interface removes the need for any file system mount > checks in C, and so removes the dependence on libmount. > > The rework also fixes the sysfs test implementation which has been broken > since the device created in the multiple gpiochip case was split into > separate devices. > > Fixes: commit 8a39f597bcfd ("gpio: mockup: rework device probing") > Signed-off-by: Kent Gibson > Acked-by: Linus Walleij The C part looks good to me. For the shell part I would probably do a couple things differently but since we don't really have a coding style for shell scripts in the kernel, I don't want to block these patches, so: Reviewed-by: Bartosz Golaszewski