Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4143871rdh; Tue, 28 Nov 2023 13:06:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IHOnHnF4j9AWnNmzAXMgXbXIl4iHU/ElsYpf48TRv807vJiCSY9PCT835ZJziiW9ewCPz2U X-Received: by 2002:a05:6a20:13c8:b0:187:6dd3:946c with SMTP id ho8-20020a056a2013c800b001876dd3946cmr13093207pzc.61.1701205565399; Tue, 28 Nov 2023 13:06:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701205565; cv=none; d=google.com; s=arc-20160816; b=Xpx6QNS1X3zw2siIZQhBnoXA/WdILBE9BLLO0NLTJki5gtPinq8ZovTJ81XiQLHi9Y QZLwcAqv9MzBME+W2wW9UfMdv6n7aaOx57wsSbI8nWALRXIK3S3lsXmH7gt7SLGZKmTM /JpCYNvpmI8VpfunMONZHDfPt2BnHNWMf0Td3qB+TuDO2TvmR2UrgQl8Ixn67KbqE20S YuuCas3HXqnaBElBQE3ogkeK3x9jJqIysk+AimMVxgVGQuauZj5gpe0tXFKMo075yIuL apZVdgQNuMoMFPqdfWEAlha8SMj5kaymZ+fVCVZMH5MMN3KKmS7lQ0N+xTTrVDbwi2UI 3txQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=st8YENbWEEWHuB6Er4wNX7W3NCGPN0ylfVbuFN+WN8A=; fh=8xuqL4xdGMfGOgw7V2HBEvxhSzVYifd+jEnthKIFBds=; b=WOPDCPBmDXZW+95vuk+B6yIR6ER2rk7VrwgOjs9YiLipOruRQaBhEAtQGNY9L7jQH/ 9FPcCksgDwX5TzmOjUNizz3FJkdauC5vGdlnbjmwQ2RefTjmYCC70vzX021uE9R7EpqM O0BqogPPhZuRphXU3GXzRKkH1AmxP6Xqt8cVgAlZz1oED1j/1GGBBmxCIHnmtOY5v4wk y1pTDjWExr3CQQK3v3tnymtFJF4laFvPHqaGxjSHsdlHHBAHTs5GKnOceGeZPLdGJZor d3qT3jpf+QXgkRBALkquzygWmy8GGUKY/rd+GoflKqo+df/AwhNsUaLLhQ0fZeT4mUaX BLcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Kh7dkKyQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id s14-20020a056a00178e00b006cba6b43d88si13346876pfg.265.2023.11.28.13.06.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 13:06:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Kh7dkKyQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 6115E8078302; Tue, 28 Nov 2023 13:06:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346126AbjK1VFj (ORCPT + 99 others); Tue, 28 Nov 2023 16:05:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343838AbjK1VFi (ORCPT ); Tue, 28 Nov 2023 16:05:38 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40DFFDE; Tue, 28 Nov 2023 13:05:44 -0800 (PST) Received: from notapiano (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id BB2F66602F24; Tue, 28 Nov 2023 21:05:38 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701205542; bh=s7rR2Rat8SrAjrdLaEbiFvlrPgXrqFu53OZ4LGKJWWE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Kh7dkKyQX4OzBE18csALgyO/a/ZQcAgejLadYxotEYVWGHXi6CIeFRmzTqvrEYcNs W5l5c2H4zmP5KyL60WN4jxIJX4gslSDDOMPWb5cTGkYKEC62WeGrUU6Zwh26GOuBBO 8fQhFeiomH+EO1UHTSylTMoBDWTGeHFfeZh6qoUbn6G6lPTNTAQ+GASZ23+IhNCh4L WBYGLVAxEiiylzwSjbl56RUS/Ktp5dIl8v9sv9gl5LI8TBaX5o83t/HViUqjeQ11ej ImEsktfwPxvyIbIv4aMtH/f6Jx+oknva3/fPfAMGSRrLc9ozl4LQl6TPh7AsZQNx3T ple876rAgvx0g== Date: Tue, 28 Nov 2023 16:05:33 -0500 From: =?utf-8?B?TsOtY29sYXMgRi4gUi4gQS4=?= Prado To: "Bird, Tim" Cc: Christopher Obbard , Shuah Khan , Greg Kroah-Hartman , Bjorn Helgaas , Saravana Kannan , Rob Herring , "kernelci@lists.linux.dev" , David Gow , Guenter Roeck , "linux-kselftest@vger.kernel.org" , "linux-usb@vger.kernel.org" , "kernel@collabora.com" , Dan Carpenter , "linux-pci@vger.kernel.org" , Doug Anderson , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [RFC PATCH v2 2/2] kselftest: devices: Add sample board file for google,spherion Message-ID: References: <20231127233558.868365-1-nfraprado@collabora.com> <20231127233558.868365-3-nfraprado@collabora.com> <897e404e0097a0c422bdb1d0e2d6cbb996500e8e.camel@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 28 Nov 2023 13:06:02 -0800 (PST) On Tue, Nov 28, 2023 at 06:33:52PM +0000, Bird, Tim wrote: > > > > -----Original Message----- > > From: Christopher Obbard > > Hi N?colas, > > > > On Mon, 2023-11-27 at 18:34 -0500, N?colas F. R. A. Prado wrote: > > > Add a sample board file describing the file's format and with the list > > > of devices expected to be probed on the google,spherion machine as an > > > example. > > > > Did you consider using some machine-readable & extensible format like yaml? > > Surely we don't need to invent yet-another file-format? :-) For this RFC my focus was to gather feedback on even more basic aspects of the test, mainly: - Is using a device's match properties (the ones that constitute modalias) a good way to encode a device in a stable way or can we do better? (See cover letter for comparison to HW topology approach) So I just went for the simplest format I could think of. Moving forward, I agree YAML might be a better fit and I can try it out for the next version. > > I went back to examine the test more closely. These board files are loaded via > the shell's 'source' command. > > If I'm reading the test correctly, the format is machine-readable and extensible, since > it's a fragment of a shell script. The 'usb' and 'pci' first entries on the lines are > actually function calls, and the other items in a test line are arguments. > > So, as an RFC - how about calling the board files: ".sh" to make this > clear, and maybe adding a comment at the top about the nature of the file? > > There's probably a use case for reading this file not in this original shell script context, > so I think Christopher's point about a machine-readable AND easily human-readable > format is valid. Personally, I find this format not too bad to read (but then I'm a > shell junky.) That's right, the board files are shell scripts that are sourced. I went this route for simplicity rather than necessity. In fact, I'd prefer to have the board files be dumb files with just the data necessary to describe the devices on the platform moving forward. For this purpose I'll try using YAML for the next version and seeing how it goes. > > I believe, Nicolas, that you were already planning on putting some comments in the > file to describe the line format (function arguments?), based on feedback from Greg KH. > IMHO, knowing that the format allows comments is useful, so adding a sample > comment would be welcome. Well, the text added at the top of this file describing the format of each line was already done in response to Greg's comment. Although I didn't mention anything about comments indeed, I'll make sure to document that for next version (even if it is in YAML it doesn't hurt to have comments as part of the example). Also, I've noticed that my patches show "(no changes since v1)". Please disregard these. There have clearly been changes since v1 (the whole approach is different), which I've documented on the cover letter, but those trailers were added by mistake when generating the patches. Thanks, N?colas