Bug 4919 – dmd test driver fails with EBADF

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2010-09-23T01:46:00Z
Last change time
2010-09-23T11:46:08Z
Keywords
patch, rejects-valid
Assigned to
nobody
Creator
rsinfu

Comments

Comment #0 by rsinfu — 2010-09-23T01:46:01Z
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 by braddr — 2010-09-23T11:46:08Z
Odd that I don't see the same problem, but either way, that change has been checked in.