RE: [RFC PATCH v2 2/2] kselftest: devices: Add sample board file for google,spherion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Christopher Obbard <chris.obbard@xxxxxxxxxxxxx>
> 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? :-)

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: "<compatible-string>.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.)

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.
  -- Tim





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux