[#6594] sim file i/o mishandles std{in,err,out}

Document created by Aaronwu Employee on Oct 17, 2013
Version 1Show Document
  • View in full screen mode

[#6594] sim file i/o mishandles std{in,err,out}

Submitted By: Mike Frysinger

Open Date

2011-05-11 15:22:03     Close Date

2011-05-12 03:31:45

Priority:

Medium     Assignee:

Mingquan Pan

Board:

N/A     Silicon Revision:

Resolution:

Fixed     Fixed In Release:

N/A

Processor:

ALL     

Host Operating System:

toolchain rev.:

trunk     kernel rev.:

State:

Closed     Found In Release:

2011R1

Is this bug repeatable?:

N/A     

Summary: sim file i/o mishandles std{in,err,out}

Details:

 

in bug [#6585], these libstdc++ tests fail:

27_io/objects/wchar_t/12048-1.cc execution test

27_io/objects/wchar_t/12048-2.cc execution test

27_io/objects/wchar_t/12048-3.cc execution test

27_io/objects/wchar_t/12048-4.cc execution test

 

this is because they try to open a file and then read it, but the sim incorrectly reads from stdin instead of the file.

 

Follow-ups

 

--- Mike Frysinger                                           2011-05-11 15:40:34

upstream already has this fixed by adding cb_is_std{err,out,in} helpers.  ive

backported those to our older sim.

 

back to grace to make sure these tests now pass.

 

--- Mingquan Pan                                             2011-05-12 03:31:45

yeah, the patch works. It passes on trunk head.

 

PASS: 27_io/objects/wchar_t/12048-1.cc (test for excess errors)

PASS: 27_io/objects/wchar_t/12048-1.cc execution test

PASS: 27_io/objects/wchar_t/12048-2.cc (test for excess errors)

PASS: 27_io/objects/wchar_t/12048-2.cc execution test

PASS: 27_io/objects/wchar_t/12048-3.cc (test for excess errors)

PASS: 27_io/objects/wchar_t/12048-3.cc execution test

PASS: 27_io/objects/wchar_t/12048-4.cc (test for excess errors)

PASS: 27_io/objects/wchar_t/12048-4.cc execution test

 

 

detailed log is:

Executing on host: bfin-elf-g++ -g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0

-Wl,--gc-sections  -DLOCALEDIR="."

-I/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libstdc++-v3/testsuite/util

/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libstdc++-v3/testsuite/27_io/objects/wchar_t/12048-1.cc

    ./libtestc++.a  -msim    -lm  -msim -o ./12048-1.exe    (timeout = 600)

spawn bfin-elf-g++ -g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0

-Wl,--gc-sections -DLOCALEDIR="."

-I/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libstdc++-v3/testsuite/util

/home/test/work/cruise/checkouts/toolchain/gcc-4.3/libstdc++-v3/testsuite/27_io/objects/wchar_t/12048-1.cc

./libtestc++.a -msim -lm -msim -o ./12048-1.exe^M

PASS: 27_io/objects/wchar_t/12048-1.cc (test for excess errors)

spawn bfin-elf-run ./12048-1.exe^M

PASS: 27_io/objects/wchar_t/12048-1.cc execution test

extra_tool_flags are:

 

So close this one.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes