[PATCH] make check failure patch and a typo clean up.

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] make check failure patch and a typo clean up.

Ryan Arnold-2
While cleaning up make check we ran across a few issues
for which we've provided the following patches.

1.) Patch 1 prevents an infrequent make check failure
caused by two runs of make check stomping on each other's
temp file usage.

2.) Patch 2 fixes a typo on an internal symbol name.

Regards,
Ryan S. Arnold
IBM Linux Technology Center
Linux Toolchain Development

2008-08-18  Carlos Eduardo Seo  <[hidden email]>

        * posix/globtest.sh: Create a random tempdir so simultaneous
        make check runs don't fail.

Index: libc/posix/globtest.sh
===================================================================
--- libc.orig/posix/globtest.sh
+++ libc/posix/globtest.sh
@@ -26,10 +26,11 @@ export LC_ALL
 LANG=C
 export LANG

-# Create the arena
-: ${TMPDIR=/tmp}
-testdir=$TMPDIR/globtest-dir
-testout=$TMPDIR/globtest-out
+# Create the arena - We use a random temp directory name so
+# that two or more simultaneous 'make check' runs don't fail.
+: ${TMPDIR=/tmp/$RANDOM}
+testdir=$TMPDIR.globtest-dir
+testout=$TMPDIR.globtest-out

 trap 'chmod 777 $testdir/noread; rm -fr $testdir $testout' 1 2 3 15

---
2008-08-20  Ryan S. Arnold  <[hidden email]>

        * sysdeps/powerpc/elf/rtld-global-offsets.sym
        (rtdl_global_ro_offsetof): Correct spelling to rtld_global_ro_offset.

--- glibc/sysdeps/powerpc/elf/rtld-global-offsets.sym 2008-08-20 11:49:19.000000000 -0500
+++ glibc.new/sysdeps/powerpc/elf/rtld-global-offsets.sym 2008-08-19 17:46:39.000000000 -0500
@@ -2,6 +2,6 @@
 
 #include <ldsodefs.h>
 
-#define rtdl_global_ro_offsetof(mem) offsetof (struct rtld_global_ro, mem)
+#define rtld_global_ro_offsetof(mem) offsetof (struct rtld_global_ro, mem)
 
-RTLD_GLOBAL_RO_DL_HWCAP_OFFSET rtdl_global_ro_offsetof (_dl_hwcap)
+RTLD_GLOBAL_RO_DL_HWCAP_OFFSET rtld_global_ro_offsetof (_dl_hwcap)

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] make check failure patch and a typo clean up.

Carlos O'Donell-2
On Wed, Aug 20, 2008 at 6:21 PM, Ryan S. Arnold <[hidden email]> wrote:
> While cleaning up make check we ran across a few issues
> for which we've provided the following patches.
>
> 1.) Patch 1 prevents an infrequent make check failure
> caused by two runs of make check stomping on each other's
> temp file usage.

Wouldn't one or more simultaneous `make check' runs write to the same
test output file?

Please explain.

> 2.) Patch 2 fixes a typo on an internal symbol name.

This cleanup patch looks fine to me. It's only a typo in the name of
the macro, but the typo'd name is used consistently.

In the future you should really send the patches as separate emails.
Sending them in a single email makes me think they are somehow
related.

Cheers,
Carlos.
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] make check failure patch and a typo clean up.

Steve Munroe


[hidden email] wrote on 08/21/2008 11:06:16 AM:

> On Wed, Aug 20, 2008 at 6:21 PM, Ryan S. Arnold <[hidden email]> wrote:
> > While cleaning up make check we ran across a few issues
> > for which we've provided the following patches.
> >
> > 1.) Patch 1 prevents an infrequent make check failure
> > caused by two runs of make check stomping on each other's
> > temp file usage.
>
> Wouldn't one or more simultaneous `make check' runs write to the same
> test output file?
>
> Please explain.
>

I was running two different glibc make checks simultaneously in to
different build directories in to two different shells. Both make checks
failed when they hit globtest.sh test at the same time:

the -m32 build:

/bin/sh -e
globtest.sh /home/sjmunroe/work/build32_28/ /home/sjmunroe/work/build32_28/elf/
 \
         ld.so.1
make[2]: *** [/home/sjmunroe/work/build32_28/posix/globtest.out] Error 1
make[2]: Leaving directory `/home/sjmunroe/work/libc28/posix'
make[1]: *** [posix/tests] Error 2

the -m64 build:

/bin/sh -e
globtest.sh /home/sjmunroe/work/build_28/ /home/sjmunroe/work/build_28/elf/
\
         ld64.so.1
mkdir: cannot create directory `/tmp/globtest-dir/dir3*': File exists
make[2]: *** [/home/sjmunroe/work/build_28/posix/globtest.out] Error 1
make[2]: Leaving directory `/home/sjmunroe/work/libc28/posix']
make[1]: *** [posix/tests] Error 2

Steven J. Munroe
Linux on Power Toolchain Architect
IBM Corporation, Linux Technology Center

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] make check failure patch and a typo clean up.

Ryan Arnold-2
In reply to this post by Carlos O'Donell-2
On Thu, 2008-08-21 at 12:06 -0400, Carlos O'Donell wrote:

> > 1.) Patch 1 prevents an infrequent make check failure
> > caused by two runs of make check stomping on each other's
> > temp file usage.
>
> Wouldn't one or more simultaneous `make check' runs write to the same
> test output file?
>
> Please explain.

The bash shell's $RANDOM env variable is used to provide a random /tmp/
directory name per run of make check.  $RANDOM is reserved by bash and
provides a pseudo-random number.

> > 2.) Patch 2 fixes a typo on an internal symbol name.
>
> This cleanup patch looks fine to me. It's only a typo in the name of
> the macro, but the typo'd name is used consistently.

The 'rltd_global_ro_offset' macro is only used in this sym file.  The
RTLD_GLOBAL_RO_DL_HWCAP_OFFSET macro is used elsewhere.

> In the future you should really send the patches as separate emails.
> Sending them in a single email makes me think they are somehow
> related.

Okay.

Regards,
Ryan

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] make check failure patch and a typo clean up.

Carlos O'Donell-2
In reply to this post by Steve Munroe
On Thu, Aug 21, 2008 at 1:23 PM, Steve Munroe <[hidden email]> wrote:
> I was running two different glibc make checks simultaneously in to
> different build directories in to two different shells. Both make checks
> failed when they hit globtest.sh test at the same time:

That makes sense.

Have you tried this with a read-only source directory?

Cheers,
Carlos.
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] make check failure patch and a typo clean up.

Steve Munroe

"Carlos O'Donell" <[hidden email]> wrote on 08/21/2008 01:59:05
PM:

> On Thu, Aug 21, 2008 at 1:23 PM, Steve Munroe <[hidden email]>
wrote:
> > I was running two different glibc make checks simultaneously in to
> > different build directories in to two different shells. Both make
checks
> > failed when they hit globtest.sh test at the same time:
>
> That makes sense.
>
> Have you tried this with a read-only source directory?
>

That does not matter. the problem is in using /tmp !

Steven J. Munroe
Linux on Power Toolchain Architect
IBM Corporation, Linux Technology Center

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] make check failure patch and a typo clean up.

Carlos O'Donell-2
On Thu, Aug 21, 2008 at 4:05 PM, Steve Munroe <[hidden email]> wrote:
>> That makes sense.
>>
>> Have you tried this with a read-only source directory?
>>
>
> That does not matter. the problem is in using /tmp !

I agree with yout, I was just curious if you've used a read-only
source directory to verify that no state is being temporarily stored
in the source tree?

Cheers,
Carlos.