emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#42399: closed (DejaGnu randomly truncates lines in runtest output)


From: GNU bug Tracking System
Subject: bug#42399: closed (DejaGnu randomly truncates lines in runtest output)
Date: Thu, 13 Aug 2020 02:53:01 +0000

Your message dated Wed, 12 Aug 2020 21:51:58 -0500
with message-id <5F34AACE.1030402@gmail.com>
and subject line Re: bug#42399: DejaGnu randomly truncates lines in runtest 
output
has caused the debbugs.gnu.org bug report #42399,
regarding DejaGnu randomly truncates lines in runtest output
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
42399: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=42399
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: DejaGnu randomly truncates lines in runtest output Date: Thu, 16 Jul 2020 15:30:46 +0100 User-agent: NeoMutt/20171215
Hello,

I've run into a DejaGnu bug while working on the GCC testsuite
(specifically the libgccjit testsuite). The issue is that runtest ends
up randomly truncating lines in the output.

To reproduce the issue, in a new directory, create a file bug.c with the
following contents:

  #include <dejagnu.h>

  int main(void)
  {
    for (int i = 0; i < 200; i++) {
      pass("This is a really long string and maybe it will be truncated because 
of the bug.");
    }
  }

Then, create a subdirectory bug.dg, containing a single file bug.exp
with the following contents:

  global text

  spawn "./a.out"

  set prefix "\[^\r\n\]*"
  expect {
    -re "^$prefix\tPASSED:${text}*" {
      regsub "\[\n\r\t\]*PASSED: $text\r\n" $expect_out(0,string) "" output
      set output [string range $output 8 end]
      pass "$output"
      exp_continue
    }
    -re "^$prefix\r\n" {
      exp_continue
    }
  }

Now compile bug.c, and verify the output is as expected:

$ gcc bug.c
$ ./a.out | uniq -c
    200         PASSED: This is a really long string and maybe it will be 
truncated because of the bug.

Now to reproduce the bug:

$ runtest --all 2>&1 | uniq -c

I see:

   1 WARNING: No tool specified
   1 Test run by alecop01 on Thu Jul 16 14:33:58 2020
   1 Native configuration is x86_64-pc-linux-gnu
   1 
   1            ===  tests ===
   1 
   1 Schedule of variations:
   1     unix
   1 
   1 Running target unix
   1 Using /usr/share/dejagnu/baseboards/unix.exp as board description file for 
target.
   1 Using /usr/share/dejagnu/config/unix.exp as generic interface file for 
target.
   1 WARNING: Couldn't find tool config file for unix, using default.
   1 Running ./bug.dg/bug.exp ...
  49 PASS:  This is a really long string and maybe it will be truncated because 
of the bug.
   1 PASS:  This is a really long string and mayb
  90 PASS:  This is a really long string and maybe it will be truncated because 
of the bug.
   1 PASS:  This is a really long string and mayb
  59 PASS:  This is a really long string and maybe it will be truncated because 
of the bug.
   1 
   1            ===  Summary ===
   1 
   1 # of expected passes               200

That is, some of the lines in the output have been truncated.

Running the last step multiple times, you should be able to see that the
truncation happens at different points in the output each time. This
nondeterministic behaviour makes it especially problematic since it is
now quite difficult to compare results across multiple test runs.

If it helps with reproducing the issue, I'm running Ubuntu 18.04 on
x86_64 and my software versions are as follows:

$ runtest --version
DejaGnu version 1.6.1
Expect version  5.45.4
Tcl version     8.6

Many thanks in advance for any assistance with this issue.

Best Regards,
Alex



--- End Message ---
--- Begin Message --- Subject: Re: bug#42399: DejaGnu randomly truncates lines in runtest output Date: Wed, 12 Aug 2020 21:51:58 -0500 User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.22) Gecko/20090807 MultiZilla/1.8.3.4e SeaMonkey/1.1.17 Mnenhy/0.7.6.0
Alex Coplan wrote:
-----Original Message-----
From: Jacob Bachmeyer <jcb62281@gmail.com>
Sent: 18 July 2020 00:19
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Alex Coplan <Alex.Coplan@arm.com>; 42399@debbugs.gnu.org; nd <nd@arm.com>
Subject: Re: bug#42399: DejaGnu randomly truncates lines in runtest output

[...]
This bug will be fixed in 1.6.4, but whether it will be fixed or a known
bug in 1.6.3 is not yet determined.

The code fix landed on master at commit 1e4010a4d2a8b63c3215dd7492eba38f056bb6e3, while the last of the associated fixes for the manual was commit aa173cea24b94d3f714f07bbbfda85740e8e77db just now. With these commits, this bug should be fixed and is now closed, but please do not hesitate to reopen the bug (after verifying that you are actually using DejaGnu's host_execute procedure and not an out-of-tree fork thereof) if the issue somehow persists.


-- Jacob


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]