diff mbox

[committed] Fix up run_all.sh

Message ID 20140917182527.GU17454@tucnak.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek Sept. 17, 2014, 6:25 p.m. UTC
Hi!

I've committed following fix as obvious, to avoid thousands of
mkdir: cannot create directory `/usr/src/gcc/obj084/gcc/testsuite/ada/acats-parallel/10': File exists                                              
lines in output when checking acats in parallel.

2014-09-17  Jakub Jelinek  <jakub@redhat.com>

	* ada/acats/run_all.sh: Redirect mkdir stderr to /dev/null.


	Jakub

Comments

Mike Stump Sept. 17, 2014, 7:13 p.m. UTC | #1
On Sep 17, 2014, at 11:25 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> -		  if mkdir $GCC_RUNTEST_PARALLELIZE_DIR/$par_count; then
> +		  if mkdir $GCC_RUNTEST_PARALLELIZE_DIR/$par_count 2>/dev/null; then

So, I can’t help but think we should just do a mkdir -p for this and be done with it.
Jakub Jelinek Sept. 17, 2014, 7:16 p.m. UTC | #2
On Wed, Sep 17, 2014 at 12:13:51PM -0700, Mike Stump wrote:
> On Sep 17, 2014, at 11:25 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> > -		  if mkdir $GCC_RUNTEST_PARALLELIZE_DIR/$par_count; then
> > +		  if mkdir $GCC_RUNTEST_PARALLELIZE_DIR/$par_count 2>/dev/null; then
> 
> So, I can’t help but think we should just do a mkdir -p for this and be done with it.

mkdir -p does not fail if the directory exists, which is exactly what this
code relies on for the synchronization.

	Jakub
Mike Stump Sept. 17, 2014, 7:18 p.m. UTC | #3
On Sep 17, 2014, at 12:16 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Wed, Sep 17, 2014 at 12:13:51PM -0700, Mike Stump wrote:
>> On Sep 17, 2014, at 11:25 AM, Jakub Jelinek <jakub@redhat.com> wrote:
>>> -		  if mkdir $GCC_RUNTEST_PARALLELIZE_DIR/$par_count; then
>>> +		  if mkdir $GCC_RUNTEST_PARALLELIZE_DIR/$par_count 2>/dev/null; then
>> 
>> So, I can’t help but think we should just do a mkdir -p for this and be done with it.
> 
> mkdir -p does not fail if the directory exists, which is exactly what this
> code relies on for the synchronization.

Oh, yeah, right.  :-)  Never mind.
diff mbox

Patch

--- gcc/testsuite/ada/acats/run_all.sh.jj	2014-09-15 20:19:15.000000000 +0200
+++ gcc/testsuite/ada/acats/run_all.sh	2014-09-17 19:46:34.921752227 +0200
@@ -268,7 +268,7 @@  for chapter in $chapters; do
 	       if [ $par_countm -eq 1 ]; then
 		  as_fn_arith $par_count + 1
 		  par_count=$as_val
-		  if mkdir $GCC_RUNTEST_PARALLELIZE_DIR/$par_count; then
+		  if mkdir $GCC_RUNTEST_PARALLELIZE_DIR/$par_count 2>/dev/null; then
 		     par_last=1
 		  else
 		     par_last=