Re: [PATCH] Testbeds for libudev/gudev clients

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

 



On Mon, Jul 9, 2012 at 9:25 AM, Martin Pitt <martin.pitt@xxxxxxxxxx> wrote:
> Martin Pitt [2012-07-06  7:01 +0200]:
>>  * Copy&paste code is obviously bad. It would be much better if the
>>    convenience API to set up a libudev/gudev test bed would be
>>    provided by libudev/gudev itself. Also, it should be in C and
>>    available through introspection, so that you can use it from a
>>    variety of languages; this means it should be in gudev.
>>
>>    I am currently working on a first patch for this, and will post it
>>    for discussion here when I have something working.
>
> I have that working now. The remaining TODO is to remove the temporary
> tree again in the destructor (if only GLib had a function for that..)
> This provides a simple to use API for building a sandbox with mock
> devices, including a new automatic test (covering the sandbox as well
> as parts of gudev itself), and gtk-doc.
>
> What do you think about that?

Urks, the patch isn't really pretty. It was actually nice to get rid
of all these otherwise totally useless knobs.

Can't the tests just use a fs namespace and run the test in it with a
bind-mount of /sys in it? Maybe check the unshare(1) tool to get the
idea, or it might already be able to do that.

If that works, it would not require any patching of tools and could
possibly offer even more useful options for testing in general.

Thanks,
Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux