Closed
Description
There are a couple of warnings with the new refactor in #208 (promoted to errors with -Werror
):
libraries/process/cbits/posix/posix_spawn.c:68:1: error:
error: control reaches end of non-void function [-Werror=return-type]
}
^
|
68 | }
| ^
cc1: all warnings being treated as errors
`cc' failed in phase `C Compiler'. (Exit code: 1)
libraries/process/ghc.mk:4: recipe for target 'libraries/process/dist-install/build/cbits/posix/posix_spawn.o' failed
make[1]: *** [libraries/process/dist-install/build/cbits/posix/posix_spawn.o] Error 1
make[1]: *** Waiting for unfinished jobs....
libraries/process/cbits/posix/find_executable.c: In function ‘find_executable’:
libraries/process/cbits/posix/find_executable.c:31:48: error:
error: ‘__s’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
const int tmp_len = filename_len + 1 + strlen(path) + 1;
^~~~~~~~~~~~
|
31 | const int tmp_len = filename_len + 1 + strlen(path) + 1;
| ^
libraries/process/cbits/posix/find_executable.c:26:14: error:
note: ‘__s’ was declared here
static char *find_in_search_path(char *search_path, const char *filename) {
^~~~~~~~~~~~~~~~~~~
|
26 | static char *find_in_search_path(char *search_path, const char *filename) {
| ^
cc1: all warnings being treated as errors
`cc' failed in phase `C Compiler'. (Exit code: 1)
libraries/process/cbits/posix/fork_exec.c: In function ‘do_spawn_fork’:
libraries/process/cbits/posix/fork_exec.c:222:19: error:
error: suggest parentheses around comparison in operand of ‘&’ [-Werror=parentheses]
if (flags & RESET_INT_QUIT_HANDLERS != 0) {
^
|
222 | if (flags & RESET_INT_QUIT_HANDLERS != 0) {
| ^
libraries/process/cbits/posix/fork_exec.c: In function ‘setup_std_handle_fork’:
libraries/process/cbits/posix/fork_exec.c:89:1: error:
error: control reaches end of non-void function [-Werror=return-type]
}
^
|
89 | }
| ^
cc1: all warnings being treated as errors
In addition, there are two testsuite failures once -Werror
is no longer in effect.
T3994
- waitForProcess
now fails with UserInterrupt
when it is expected to complete without failures
Wrong exit code for T3994(threaded1)(expected 0 , actual 130 )
Stdout ( T3994 ):
start
*** unexpected failure for T3994(threaded1)
main :: IO ()
main = do (_,Just hout,_,p) <- createProcess (proc "./T3994app" ["start", "10000"])
{ std_out = CreatePipe, create_group = True }
start <- hGetLine hout
putStrLn start
interruptProcessGroupOf p
t <- myThreadId
-- timeout
forkIO $ do
threadDelay 5000000
putStrLn "Interrupting a Running Process Failed"
hFlush stdout
killThread t
waitForProcess p
-- ^^^^^^^^^^^^^^^ this fails with `UserInterrupt`
putStrLn "end"
return ()
process010
fails with a benign error message change which can probably be accepted.
+++ "/builds/ghc/ghc/tmp/ghctest-3wgma_aq/test spaces/libraries/process/tests/process010.run/process010.run.stdout.normalised" 2021-07-12 19:36:34.037437016 +0000
@@ -1,4 +1,4 @@
ExitSuccess
ExitFailure 1
-Exc: /non/existent: rawSystem: posix_exec: illegal operation (Inappropriate ioctl for device)
+Exc: /non/existent: rawSystem: posix_exec: does not exist (No such file or directory)
Done
In general, we need a better story for the GHC tests included in process
. Ideally we would be able to run them in process
CI as well.
Unfortunately, this means there will need to be another release soon.
/cc @bgamari
Metadata
Metadata
Assignees
Labels
No labels