public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][OBVIOUS] Close file on return from verify-intermediate
@ 2018-09-05 13:29 Joey Ye
  2018-09-06 17:07 ` Mike Stump
  2018-09-10 14:03 ` Martin Liška
  0 siblings, 2 replies; 4+ messages in thread
From: Joey Ye @ 2018-09-05 13:29 UTC (permalink / raw)
  To: 'gcc-patches@gcc.gnu.org', mliska; +Cc: nd

[-- Attachment #1: Type: text/plain, Size: 878 bytes --]

This is a fix to an obvious issue in gcov.exp, where proc verify-intermediate returns without closing the open file.

This can be a possible fix to PR85871. gcov-8.C diffs to other gcov testcases that it invokes verify-intermediate. Not closing an open file may result in random failure quietly.

It is only a possible fix as I failed to reproduce the PR85871 random failure in my local machine despite continuous testing of multiple days. So I cannot verify if this patch fixes the regression either.

To verify, https://gcc.gnu.org/ml/gcc-testresults/ need to be watched whether gcov-8 regression will disappear completely one month after this patch committed to trunk.

Tested with make check with no new regressions.

OK to trunk?

testsuite/ChangeLog:
2018-09-05  Joey Ye  <joey.ye@arm.com>

        * lib/gcov.exp (verify-intermediate): Add missing close.

[-- Attachment #2: gcov-20180905.patch --]
[-- Type: application/octet-stream, Size: 360 bytes --]

diff --git a/gcc/testsuite/lib/gcov.exp b/gcc/testsuite/lib/gcov.exp
index 03eb14a3f4f..f35ca59fbe3 100644
--- a/gcc/testsuite/lib/gcov.exp
+++ b/gcc/testsuite/lib/gcov.exp
@@ -133,6 +133,7 @@ proc verify-intermediate { testname testcase file } {
 	fail "$testname expected 'branch:' tag not found"
 	incr failed
     }
+    close $fd
     return $failed
 }
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH][OBVIOUS] Close file on return from verify-intermediate
  2018-09-05 13:29 [PATCH][OBVIOUS] Close file on return from verify-intermediate Joey Ye
@ 2018-09-06 17:07 ` Mike Stump
  2018-09-10 14:03 ` Martin Liška
  1 sibling, 0 replies; 4+ messages in thread
From: Mike Stump @ 2018-09-06 17:07 UTC (permalink / raw)
  To: Joey Ye; +Cc: gcc-patches, mliska, nd

On Sep 5, 2018, at 6:29 AM, Joey Ye <joey.ye@arm.com> wrote:
> This is a fix to an obvious issue in gcov.exp, where proc verify-intermediate returns without closing the open file.
> 
> This can be a possible fix to PR85871. gcov-8.C diffs to other gcov testcases that it invokes verify-intermediate. Not closing an open file may result in random failure quietly.
> 
> It is only a possible fix as I failed to reproduce the PR85871 random failure in my local machine despite continuous testing of multiple days. So I cannot verify if this patch fixes the regression either.
> 
> To verify, https://gcc.gnu.org/ml/gcc-testresults/ need to be watched whether gcov-8 regression will disappear completely one month after this patch committed to trunk.
> 
> Tested with make check with no new regressions.
> 
> OK to trunk?

Ok.

I'm hoping that this doesn't fix that issue, as this change should not cause any change to correctly written code.  if it does fix it, there is at least one more unfortunate thing that should be fixed that remains unidentified.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH][OBVIOUS] Close file on return from verify-intermediate
  2018-09-05 13:29 [PATCH][OBVIOUS] Close file on return from verify-intermediate Joey Ye
  2018-09-06 17:07 ` Mike Stump
@ 2018-09-10 14:03 ` Martin Liška
  2018-09-13  9:08   ` Joey Ye
  1 sibling, 1 reply; 4+ messages in thread
From: Martin Liška @ 2018-09-10 14:03 UTC (permalink / raw)
  To: Joey Ye, 'gcc-patches@gcc.gnu.org'; +Cc: nd

On 09/05/2018 03:29 PM, Joey Ye wrote:
> This is a fix to an obvious issue in gcov.exp, where proc verify-intermediate returns without closing the open file.
> 
> This can be a possible fix to PR85871. gcov-8.C diffs to other gcov testcases that it invokes verify-intermediate. Not closing an open file may result in random failure quietly.
> 
> It is only a possible fix as I failed to reproduce the PR85871 random failure in my local machine despite continuous testing of multiple days. So I cannot verify if this patch fixes the regression either.
> 
> To verify, https://gcc.gnu.org/ml/gcc-testresults/ need to be watched whether gcov-8 regression will disappear completely one month after this patch committed to trunk.
> 
> Tested with make check with no new regressions.
> 
> OK to trunk?
> 
> testsuite/ChangeLog:
> 2018-09-05  Joey Ye  <joey.ye@arm.com>
> 
>         * lib/gcov.exp (verify-intermediate): Add missing close.
> 

Hi.

Thanks for the fix, it's obvious. Please install the patch.

Note that gcov-8.C is built multiple times with different -std=* options:

PASS: g++.dg/gcov/gcov-8.C  -std=gnu++98 (test for excess errors)
PASS: g++.dg/gcov/gcov-8.C  -std=gnu++98 execution test
PASS: g++.dg/gcov/gcov-8.C  -std=gnu++98  gcov
PASS: g++.dg/gcov/gcov-8.C  -std=gnu++11 (test for excess errors)
PASS: g++.dg/gcov/gcov-8.C  -std=gnu++11 execution test
PASS: g++.dg/gcov/gcov-8.C  -std=gnu++11  gcov
PASS: g++.dg/gcov/gcov-8.C  -std=gnu++14 (test for excess errors)
PASS: g++.dg/gcov/gcov-8.C  -std=gnu++14 execution test
PASS: g++.dg/gcov/gcov-8.C  -std=gnu++14  gcov

That can cause the collisions seen in the PR.

Martin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH][OBVIOUS] Close file on return from verify-intermediate
  2018-09-10 14:03 ` Martin Liška
@ 2018-09-13  9:08   ` Joey Ye
  0 siblings, 0 replies; 4+ messages in thread
From: Joey Ye @ 2018-09-13  9:08 UTC (permalink / raw)
  To: Martin Liška; +Cc: Joey Ye, gcc-patches

Committed as r264202.

gcov-8 still fails at r264226 according to
https://gcc.gnu.org/ml/gcc-testresults/2018-09/msg01478.html

So it is confirmed that this patch doesn't resolve PR85871, as Mike hoped.

Thanks,
Joey
On Mon, Sep 10, 2018 at 3:04 PM Martin Liška <mliska@suse.cz> wrote:
>
> On 09/05/2018 03:29 PM, Joey Ye wrote:
> > This is a fix to an obvious issue in gcov.exp, where proc verify-intermediate returns without closing the open file.
> >
> > This can be a possible fix to PR85871. gcov-8.C diffs to other gcov testcases that it invokes verify-intermediate. Not closing an open file may result in random failure quietly.
> >
> > It is only a possible fix as I failed to reproduce the PR85871 random failure in my local machine despite continuous testing of multiple days. So I cannot verify if this patch fixes the regression either.
> >
> > To verify, https://gcc.gnu.org/ml/gcc-testresults/ need to be watched whether gcov-8 regression will disappear completely one month after this patch committed to trunk.
> >
> > Tested with make check with no new regressions.
> >
> > OK to trunk?
> >
> > testsuite/ChangeLog:
> > 2018-09-05  Joey Ye  <joey.ye@arm.com>
> >
> >         * lib/gcov.exp (verify-intermediate): Add missing close.
> >
>
> Hi.
>
> Thanks for the fix, it's obvious. Please install the patch.
>
> Note that gcov-8.C is built multiple times with different -std=* options:
>
> PASS: g++.dg/gcov/gcov-8.C  -std=gnu++98 (test for excess errors)
> PASS: g++.dg/gcov/gcov-8.C  -std=gnu++98 execution test
> PASS: g++.dg/gcov/gcov-8.C  -std=gnu++98  gcov
> PASS: g++.dg/gcov/gcov-8.C  -std=gnu++11 (test for excess errors)
> PASS: g++.dg/gcov/gcov-8.C  -std=gnu++11 execution test
> PASS: g++.dg/gcov/gcov-8.C  -std=gnu++11  gcov
> PASS: g++.dg/gcov/gcov-8.C  -std=gnu++14 (test for excess errors)
> PASS: g++.dg/gcov/gcov-8.C  -std=gnu++14 execution test
> PASS: g++.dg/gcov/gcov-8.C  -std=gnu++14  gcov
>
> That can cause the collisions seen in the PR.
>
> Martin

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-13  8:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-05 13:29 [PATCH][OBVIOUS] Close file on return from verify-intermediate Joey Ye
2018-09-06 17:07 ` Mike Stump
2018-09-10 14:03 ` Martin Liška
2018-09-13  9:08   ` Joey Ye

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 read-only IMAP folder(s) and NNTP newsgroup(s).