From: Christoph Hellwig <hch@infradead.org>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfstests 131: kill locktest process in cleanup & better error msgs
Date: Sun, 17 Jan 2010 06:43:44 -0500 [thread overview]
Message-ID: <20100117114344.GC7813@infradead.org> (raw)
In-Reply-To: <4B51220F.7020703@sandeen.net>
On Fri, Jan 15, 2010 at 08:18:55PM -0600, Eric Sandeen wrote:
> I occasionally get failures in 131 like:
>
> gethostbyname: Success
>
> 1) perror is the wrong thing for gethostbyname errors, so this
> is confusing
Indeed.
> 2) the locktest thread doesn't get killed, so the fs
> is busy and the next test fails when it can't unmount
Yeah, this was always causing problems for me when running xfstests on
a system without networking for some unknown reason.
> --- a/src/locktest.c
> +++ b/src/locktest.c
> @@ -44,6 +44,8 @@
> #define PLATFORM_CLEANUP() /*no-op*/
> #define LL "ll"
>
> +extern int h_errno;
> +
> #define inet_aton(STRING, INADDRP) \
> (((INADDRP)->s_addr = inet_addr(STRING)) == -1 ? 0 : 1)
>
> @@ -937,7 +939,10 @@ main(int argc, char *argv[])
> struct hostent *servInfo;
>
> if ((servInfo = gethostbyname(host)) == NULL) {
> - perror("gethostbyname");
> + printf("Couldn't get hostbyname for %s", host);
> + if (h_errno == HOST_NOT_FOUND)
> + printf(": host not found");
> + printf("\n");
Might be worth using herror or hsterror, although the manpage marks them
as obsolete..
Anyway, good enough to put in, so:
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2010-01-17 11:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-16 2:18 [PATCH] xfstests 131: kill locktest process in cleanup & better error msgs Eric Sandeen
2010-01-17 11:43 ` Christoph Hellwig [this message]
2010-01-17 15:51 ` Eric Sandeen
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=20100117114344.GC7813@infradead.org \
--to=hch@infradead.org \
--cc=sandeen@sandeen.net \
--cc=xfs@oss.sgi.com \
/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