bug-bash
[Top][All Lists]
Advanced

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

Re: riscv32, qemu-user: semi-functional, what goes wrong?


From: Chet Ramey
Subject: Re: riscv32, qemu-user: semi-functional, what goes wrong?
Date: Wed, 13 Sep 2023 09:46:08 -0400
User-agent: Mozilla Thunderbird

On 9/12/23 4:46 PM, Andreas K. Huettel wrote:
Am Dienstag, 12. September 2023, 21:55:13 CEST schrieb Chet Ramey:

run-posixexp
309d308
< ./posixexp.tests: line 98: syntax error: unexpected end of file

Did you remake y.tab.c? And if so, what version of bison did you use?

Not deliberately, but this is 5.2_p15, so if one of the patches touches the 
source...

All the appropriate patches updated both parse.y and y.tab.c (6, 7, 12,
15).


riscv32 ~ # bison --version
bison (GNU Bison) 3.8.2

I just re-ran the bash build, and the log contains a line
bison -y -d ./parse.y

The reason I ask is that I can reproduce the error message with bash-5.1,
but not bash-5.2.


run-read
warning: please do not consider output differing only in the amount of
warning: white space to be an error.
47c47
< a
---
abcde
71c71
< 0
---
1
74c74
< 1
---
timeout 2: ok
80c80
< a
---
abcde

These indicate that read with a timeout through a pipe or from /dev/tty is
failing (or very slow) for some reason. It's strange, since the data is
already written to the pipe and waiting to be read when the `read' builtin
is called. The /dev/tty tests can be fooled by typeahead while the tests
are running, but that doesn't usually happen.

Could a timeout also mean that part of the data "got lost" and it's
trying to read more than is available?

No, it reads what it can and returns it. For instance, this should return
`abcde':

read -t .0001 a <<<abcde
echo $a

since there's no reason a reasonable system should fail to read five bytes
from a pipe -- bytes that are already written, with no additional processes
involved -- in a tenth of a millisecond. I've never seen it fail, even on a
heavily loaded system.


--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/




reply via email to

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