linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kay Sievers <kay@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] Testbeds for libudev/gudev clients
Date: Mon, 09 Jul 2012 13:50:44 +0000	[thread overview]
Message-ID: <CAPXgP115=oTJ5xYOOXsPH_ro4sN6piRjdJ06De6BPcJSfLo_zA@mail.gmail.com> (raw)
In-Reply-To: <20120706050131.GC3109@piware.de>

On Mon, Jul 9, 2012 at 9:25 AM, Martin Pitt <martin.pitt@ubuntu.com> 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

  parent reply	other threads:[~2012-07-09 13:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-06  5:01 [PATCH] Testbeds for libudev/gudev clients Martin Pitt
2012-07-09  7:25 ` Martin Pitt
2012-07-09 13:50 ` Kay Sievers [this message]
2012-07-09 14:22 ` Martin Pitt
2012-07-09 19:54 ` Lucas De Marchi
2012-07-09 20:09 ` Martin Pitt
2012-07-09 20:21 ` Lucas De Marchi
2012-07-10  3:40 ` Martin Pitt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPXgP115=oTJ5xYOOXsPH_ro4sN6piRjdJ06De6BPcJSfLo_zA@mail.gmail.com' \
    --to=kay@vrfy.org \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).