Skip to content
Snippets Groups Projects
Commit 38a93bc1 authored by Cheng Shao's avatar Cheng Shao :beach:
Browse files

testsuite: rest of ghc-9.6 fixes for wasm

parent 021ff5c6
No related branches found
No related tags found
No related merge requests found
test('T22376', [extra_files(['A.hs', 'B.hs'])], multimod_compile_and_run, test('T22376', [req_interp, extra_files(['A.hs', 'B.hs'])], multimod_compile_and_run,
['T22376', '-O1 -fwrite-if-simplified-core -fbyte-code-and-object-code -fprefer-byte-code']) ['T22376', '-O1 -fwrite-if-simplified-core -fbyte-code-and-object-code -fprefer-byte-code'])
...@@ -14,7 +14,7 @@ import Foreign.C.Types ...@@ -14,7 +14,7 @@ import Foreign.C.Types
type FD = CInt type FD = CInt
type CString = Ptr CChar type CString = Ptr CChar
foreign import ccall unsafe "runInteractiveProcess" foreign import ccall unsafe "functionNameThatDoesntClash"
c_runInteractiveProcess c_runInteractiveProcess
:: Ptr CString :: Ptr CString
-> CString -> CString
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
5 5
6 6
77777777 77777777
ffffffff88888888 88888888
ffffffff99999999 99999999
ffffffffaaaaaaaa aaaaaaaa
ffffffffbbbbbbbb bbbbbbbb
cccccccc cccccccc
ffffffffdddddddd dddddddd
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include <inttypes.h> #include <inttypes.h>
int int
runInteractiveProcess (char *const * args, functionNameThatDoesntClash (char *const * args,
char *workingDirectory, char **environment, char *workingDirectory, char **environment,
// handles to use for the standard handles. -1 indicates // handles to use for the standard handles. -1 indicates
// create pipe, -2 indicates close. // create pipe, -2 indicates close.
...@@ -16,19 +16,19 @@ runInteractiveProcess (char *const * args, ...@@ -16,19 +16,19 @@ runInteractiveProcess (char *const * args,
{ {
// N.B. We don't use %p here since the rendering of this varies across // N.B. We don't use %p here since the rendering of this varies across
// libc implementations // libc implementations
printf("%" PRIx64 "\n", (uint64_t) args); printf("%" PRIxPTR "\n", (uintptr_t) args);
printf("%" PRIx64 "\n", (uint64_t) workingDirectory); printf("%" PRIxPTR "\n", (uintptr_t) workingDirectory);
printf("%" PRIx64 "\n", (uint64_t) environment); printf("%" PRIxPTR "\n", (uintptr_t) environment);
printf("%x\n", fdStdIn); printf("%x\n", fdStdIn);
printf("%x\n", fdStdOut); printf("%x\n", fdStdOut);
printf("%x\n", fdStdErr); printf("%x\n", fdStdErr);
printf("%" PRIx64 "\n", (uint64_t) pfdStdInput); printf("%" PRIxPTR "\n", (uintptr_t) pfdStdInput);
printf("%" PRIx64 "\n", (uint64_t) pfdStdOutput); printf("%" PRIxPTR "\n", (uintptr_t) pfdStdOutput);
printf("%" PRIx64 "\n", (uint64_t) pfdStdError); printf("%" PRIxPTR "\n", (uintptr_t) pfdStdError);
printf("%" PRIx64 "\n", (uint64_t) childGroup); printf("%" PRIxPTR "\n", (uintptr_t) childGroup);
printf("%" PRIx64 "\n", (uint64_t) childUser); printf("%" PRIxPTR "\n", (uintptr_t) childUser);
printf("%x\n", flags); printf("%x\n", flags);
printf("%" PRIx64 "\n", (uint64_t) failed_doing); printf("%" PRIxPTR "\n", (uintptr_t) failed_doing);
return 0; return 0;
} }
test('T20137', req_c, compile_and_run, ['T20137C.c']) test('T20137', [req_c], compile_and_run, ['T20137C.c'])
...@@ -59,6 +59,7 @@ test('T22208', normal, compile, ['-dstg-lint -dcmm-lint']) ...@@ -59,6 +59,7 @@ test('T22208', normal, compile, ['-dstg-lint -dcmm-lint'])
test('ManyUbxSums', test('ManyUbxSums',
[ pre_cmd('{compiler} --run ./GenManyUbxSums.hs'), [ pre_cmd('{compiler} --run ./GenManyUbxSums.hs'),
extra_files(['GenManyUbxSums.hs', 'ManyUbxSums_Addr.hs']), extra_files(['GenManyUbxSums.hs', 'ManyUbxSums_Addr.hs']),
req_interp
], ],
multi_compile_and_run, multi_compile_and_run,
['ManyUbxSums', ['ManyUbxSums',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment