[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: read-file on HP NonStop
From: |
Bruno Haible |
Subject: |
Re: read-file on HP NonStop |
Date: |
Mon, 4 Oct 2010 21:35:33 +0200 |
User-agent: |
KMail/1.9.9 |
Joachim Schmitz wrote:
> So this is why it errors here:
> if (len != statbuf.st_size)
> {
> fprintf (stderr, "Read %ld from %s...\n", (unsigned long) len,
> FILE1);
> err = 1;
> }
>
>
> The problem is, that here /etc/resolv.conf is a symbolic link to a structured
> EDIT file in the Guardian namespace, /G/system/ztcpip/resconf (which in
> Guardian is $SYSTEM.ZTCPIP.RESCONF). These EDIT files in Guardian have a
> structure that is very much different from 'flat' files in UNIX (or OSS, for
> this matter).
>
> $ ls -l /etc/resolv.conf
> lrwxrwxrwx 1 SUPER.SUPER SUPER 24 Jan 9 2010
> /etc/resolv.conf -> /G/system/ztcpip/resconf
> $ ls -l /G/system/ztcpip/resconf
> -rwxr-xr-x 1 SUPER.SUPER SUPER 2144 Oct 19 2009
> /G/system/ztcpip/resconf
Thanks for the analysis. The bug is in the test; I'm fixing it through the
appended patch.
Paolo suggested:
> Creating the file within the test?
That would be too easy; it would always be a regular file. With /etc/resolv.conf
we can test whether S_ISREG is implemented correctly.
2010-10-04 Bruno Haible <address@hidden>
read-file tests: Avoid a test failure on NonStop Kernel.
* tests/test-read-file.c (main): Don't assume that /etc/resolv.conf is
a regular file.
Reported by Joachim Schmitz <address@hidden>.
*** tests/test-read-file.c.orig Mon Oct 4 21:31:10 2010
--- tests/test-read-file.c Mon Oct 4 21:28:33 2010
***************
*** 52,62 ****
err = 1;
}
! /* Assume FILE1 is a regular file or a symlink to a regular file.
*/
! if (len != statbuf.st_size)
{
! fprintf (stderr, "Read %ld from %s...\n", (unsigned long) len,
FILE1);
! err = 1;
}
free (out);
}
--- 52,74 ----
err = 1;
}
! if (S_ISREG (statbuf.st_mode))
{
! /* FILE1 is a regular file or a symlink to a regular file. */
! if (len != statbuf.st_size)
! {
! fprintf (stderr, "Read %ld from %s...\n", (unsigned long)
len, FILE1);
! err = 1;
! }
! }
! else
! {
! /* Assume FILE1 is not empty. */
! if (len == 0)
! {
! fprintf (stderr, "Read nothing from %s\n", FILE1);
! err = 1;
! }
}
free (out);
}
- RE: ACLs on HP NonStop, (continued)
- RE: ACLs on HP NonStop, Schmitz, Joachim, 2010/10/03
- Re: ACLs on HP NonStop, Bruno Haible, 2010/10/03
- RE: ACLs on HP NonStop, Schmitz, Joachim, 2010/10/03
- Re: ACLs on HP NonStop, Bruno Haible, 2010/10/03
- RE: ACLs on HP NonStop, Schmitz, Joachim, 2010/10/03
- Re: ACLs on HP NonStop, Bruno Haible, 2010/10/03
- Re: read-file on HP NonStop, Bruno Haible, 2010/10/03
- RE: read-file on HP NonStop, Schmitz, Joachim, 2010/10/04
- Re: read-file on HP NonStop, Paolo Bonzini, 2010/10/04
- RE: read-file on HP NonStop, Schmitz, Joachim, 2010/10/04
- Re: read-file on HP NonStop,
Bruno Haible <=
- Message not available
- Re: read-file on HP NonStop, Bruno Haible, 2010/10/04
- RE: read-file on HP NonStop, Schmitz, Joachim, 2010/10/05
- Re: read-file on HP NonStop, Pádraig Brady, 2010/10/05
- RE: ACLs on HP NonStop, Schmitz, Joachim, 2010/10/03
- Re: ACLs on HP NonStop, Bruno Haible, 2010/10/03
- RE: ACLs on HP NonStop, Schmitz, Joachim, 2010/10/03
- Message not available
- RE: ACLs on HP NonStop, Schmitz, Joachim, 2010/10/03