Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp333131pxb; Thu, 14 Jan 2021 07:06:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJwBpwUmQY31yQc4sRIbLB1+qTWUvcO2Q2rPaUh1mdO3bYHxA0dgkSQ7IfCgN4DEgF6GsL+M X-Received: by 2002:aa7:c813:: with SMTP id a19mr5825285edt.192.1610636806919; Thu, 14 Jan 2021 07:06:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610636806; cv=none; d=google.com; s=arc-20160816; b=opGJ+hsrpVeY9rYfc31tF18pWnxqxRRRC3VSpDJ9776A8IP9FoILLNXsa4Z8SpsfFV EmrEMmEa8iuGowBkTCsw18GW57szfT9SHY/twKj6HpQxysUXuvp7obWz9OnYXtLHhBE6 zZFMNSMbkIM0zUNSk6H4N/upmAge8zCz0nlUzg9474gnVMtPoBg/zIArQgddJUS57r81 ZhOXWLnccFTtv3e9vlXh2HljlQWf72PTPb+nSCn5VjiufDhxtJvKjtbgazqiNfGOmLPW HrzbDhGzfpo36+FDw6GZgnyOzMutZXPAjIC+mICDKHgI+nhTQaL0xK6wE1+oDp48rJBn 2IaA== 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:dkim-signature; bh=NcbbwuTIw0XOxXbx1OMAv/zQ0f55cTFOH0Nbkr3v9jQ=; b=ZJsGufEvsiXpYLqCTAVv9wa7e/Els5dfHrfAcgYMt1IgYzY2EXS2oIDwxSKVSxOeZm k0XCR/S+Sm7I5sSPwG5/7Gd0TXGfiA0GDcJlsSiJnKTahJdAZF8iix0INppYg8813ZVG EXBpyH9H9EknJpx+uP3Cd5qYcAJxJbRAP5/1CThXP5tOpSwQ1rS/cIQHWIHngciHUt0S /aFk3hJBvpP+WWOy4FmZx4SzYjxkB9hoZbzR5kWcd9WQ9abVFQHcdxQbP7PU+w3UXO/v Iyc3t13+0X4RBZnQMeEaJRLPV4YEdG0y2Tq8f2+bUC/tVGbFqKB1LGuw46R0EwAuNKAe /oWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=yEQItAvi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t16si2922144edi.560.2021.01.14.07.06.22; Thu, 14 Jan 2021 07:06:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=yEQItAvi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729163AbhANPFQ (ORCPT + 99 others); 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-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