linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nick Yin" <nickyin@hotmail.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: Test script for udevd binary, Request for Comments!
Date: Sat, 10 Apr 2004 04:39:29 +0000	[thread overview]
Message-ID: <BAY7-F71WX2BYBhsntJ0003d0b4@hotmail.com> (raw)
In-Reply-To: <3ACA40606221794F80A5670F0AF15F84037B9188@PDSMSX403.ccr.corp.intel.com>

Kay,

I understand your idea. Thank you for changing udevd program to meet the 
test. I intend to write a small udevd test program called udevdtest.c to log 
what event udevd has sent and modify that test script to analyze the log 
file output by udevdtest in order to judge whether udevd has executed as we 
expected. How do you think of this? If you think it's feasible I will do 
this as soon as possible.

Have a nice weekend!

Nick ( Yin Hu)


>From: Kay Sievers <kay.sievers@vrfy.org>
>To: Nick Yin <nickyin@hotmail.com>
>CC: atul.sabharwal@intel.com, 
>hu.yin@intel.com,linux-hotplug-devel@lists.sourceforge.net, 
>michael.fu@intel.com,min.guo@intel.com
>Subject: Re: Test script for udevd binary, Request for Comments!
>Date: Fri, 9 Apr 2004 22:52:24 +0200
>
>On Fri, Apr 09, 2004 at 10:45:40AM +0000, Nick Yin wrote:
> > Kay,
> >
> > Thank you very much for giving me so much suggestion. I will modify this
> > test script following your suggestion. :-)
>
>Nick,
>here is the needed change for udevd. You can start udevd in your test
>script with a specified UDEV_BIN in the environment. If we get a nice
>udevd test script, we can merge the change in the main tree along with
>your script :)
>
>good luck,
>Kay
>=== udevd.c 1.30 vs edited ==>--- 1.30/udevd.c	Fri Apr  2 22:48:21 2004
>+++ edited/udevd.c	Fri Apr  9 22:12:22 2004
>@@ -60,6 +60,7 @@
>  static void msg_queue_manager(void);
>  static void user_sighandler(void);
>  static void reap_kids(void);
>+char *udev_bin;
>
>  #ifdef LOG
>  unsigned char logname[LOGNAME_SIZE];
>@@ -146,7 +147,7 @@
>  	switch (pid) {
>  	case 0:
>  		/* child */
>-		execle(UDEV_BIN, "udev", msg->subsystem, NULL, env);
>+		execle(udev_bin, "udev", msg->subsystem, NULL, env);
>  		dbg("exec of child failed");
>  		exit(1);
>  		break;
>@@ -399,6 +400,7 @@
>  	const int on = 1;
>  	struct sigaction act;
>  	fd_set readfds;
>+	char *s;
>
>  	init_logging("udevd");
>  	dbg("version %s", UDEV_VERSION);
>@@ -457,6 +459,15 @@
>
>  	/* enable receiving of the sender credentials */
>  	setsockopt(ssock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on));
>+
>+	/* possible override of udev binary, used for testing */
>+	s = getenv("UDEV_BIN");
>+	if (s != NULL) {
>+		udev_bin = s;
>+		dbg("udev binary is set to '%s'", udev_bin);
>+	} else {
>+		udev_bin = UDEV_BIN;
>+	}
>
>  	FD_ZERO(&readfds);
>  	FD_SET(ssock, &readfds);

_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?pageþatures/junkmail



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  parent reply	other threads:[~2004-04-10  4:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-07 10:53 Test script for udevd binary, Request for Comments! Yin, Hu
2004-04-08 14:16 ` Kay Sievers
2004-04-08 16:22 ` Sabharwal, Atul
2004-04-08 20:49 ` Kay Sievers
2004-04-09 10:45 ` Nick Yin
2004-04-09 20:52 ` Kay Sievers
2004-04-10  4:39 ` Nick Yin [this message]
2004-04-10 14:04 ` Kay Sievers
2004-04-10 14:48 ` Nick Yin
2004-04-13 10:34 ` Yin, Hu
2004-04-13 13:25 ` Kay Sievers
2004-04-13 13:51 ` Nick Yin
2004-04-14  3:11 ` Yin, Hu
2004-04-14 12:18 ` Kay Sievers
2004-04-14 15:24 ` Nick Yin
2004-04-14 15:33 ` Kay Sievers
2004-04-15  1:03 ` Yin, Hu

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=BAY7-F71WX2BYBhsntJ0003d0b4@hotmail.com \
    --to=nickyin@hotmail.com \
    --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).