On Mon, Jan 30, 2017 at 05:40:40PM -0500, Dan Streetman wrote:
> On Thu, Jan 26, 2017 at 9:36 AM, Zbigniew Jędrzejewski-Szmek
> <zbys...@in.waw.pl> wrote:
> > Thanks for working on the tests.
> >
> > On Thu, Jan 26, 2017 at 09:21:41AM -0500, Dan Streetman wrote:
> >> However, I'd like to also add tests for whitespace replacement using
> >> actual device $attr{}, which I think means the test/sys.tar.xz file
> >> needs to be updated to add device (maybe a NVMe device) nodes that
> >> include whitespace in its model and/or serial strings - is that how
> >> new test sysfs device nodes are added?  Updating the entire binary
> >> seems like a big change just for a few device node files..
> > It's only 162k. It's not perfect that we have to update it every time
> > we add tests, but it's not too terrible.
> >
> > If you're feeling ambitious, you might want to convert that tarball to
> > a script which generates the nodes. After all, it's just a bunch of
> > directories, with symlinks and a few simple text files. Then this will
> > be normal text file and git will be able to track changes to it. This
> > would a much nicer solution in the long run.
> 
> I crafted a script that does that, which isn't complex, although it
> isn't simple either.  However, I'm wondering, why not just store the
> files directly in git?  It would be simpler than either the tarball or
> a script, and git can handle symlinks and binary files, unless there's
> some shortcoming that I'm not seeing?

In principle, this would work too. But git tools aren't too good when
working with symlinks (e.g. git diff treats them as normal text files,
and displays a stupid warning about a missing newline, etc). When
scaled to the number of files in /sys, I think working with this
approach would be rather unpleasant.

Can you paste the script you have?

Zbyszek
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to