Tests T6146 and T14163 fail with ghci way
Tests T6146 and T14163 fail in the ghci way:
$ ./hadrian/build -j --flavour=devel2 --freeze1 test --only="T14163 T6146" --test-way=ghci
...
=====> 1 of 2 [0, 0, 0]
=====> 2 of 2 [0, 0, 0]
Wrong exit code for T14163(ghci) (expected 0 , actual 1 )
Stderr ( T14163 ):
T14163: <stdin>: hGetLine: end of file
*** unexpected failure for T14163(ghci)
Wrong exit code for T6146(ghci) (expected 0 , actual 1 )
Stdout ( T6146 ):
First number?
Stderr ( T6146 ):
T6146: <stdin>: hGetLine: end of file
*** unexpected failure for T6146(ghci)
The problem is that they pass data via stdin and this stopped working somewhere between 9.4 and master:
$ cat x
getLine
hello
$ ghci-9.4.3 --interactive < x
GHCi, version 9.4.3: https://www.haskell.org/ghc/ :? for help
ghci> "hello"
ghci> Leaving GHCi.
$ ./stage1/bin/ghc --interactive < x
GHCi, version 9.7.20230516: https://www.haskell.org/ghc/ :? for help
ghci> *** Exception: <stdin>: hGetLine: end of file
ghci>
<interactive>:2:1: error: [GHC-88464] Variable not in scope: hello
ghci> Leaving GHCi.