D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4919 - dmd test driver fails with EBADF
Summary: dmd test driver fails with EBADF
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Linux
: P2 normal
Assignee: No Owner
URL:
Keywords: patch, rejects-valid
Depends on:
Blocks:
 
Reported: 2010-09-23 01:46 UTC by Shin Fujishiro
Modified: 2010-09-23 11:46 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Shin Fujishiro 2010-09-23 01:46:01 UTC
Running the dmd tests on Gentoo 2.6.32 fails with an unexpected EBADF.
--------------------
dmd/test$ make
(== snip ==)
... runnable/bench1.d              -d  (-inline -release -gc -O -unittest -fPIC)
sh: 10000: Bad file descriptor
Test failed.  The logged output:
(== snip ==)
--------------------

The problem is the test driver. It issues "test_results/runnable/bench1 10000> " to the shell, in which the "10000>" part is wrong.

Patch:
====================
--- test/d_do_test.d
+++ test/d_do_test.d
@@ -204,7 +204,7 @@ void execute(ref File f, string command, bool expectpass)
     scope(exit) if (std.file.exists(filename)) std.file.remove(filename);
 
     f.writeln(command);
-    auto rc = system(command ~ "> " ~ filename ~ " 2>&1");
+    auto rc = system(command ~ " > " ~ filename ~ " 2>&1");
 
     f.write(readText(filename));
Comment 1 Brad Roberts 2010-09-23 11:46:08 UTC
Odd that I don't see the same problem, but either way, that change has been checked in.