aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface/test
diff options
context:
space:
mode:
Diffstat (limited to 'lib/erl_interface/test')
-rw-r--r--lib/erl_interface/test/ei_decode_SUITE_data/ei_decode_test.c10
-rw-r--r--lib/erl_interface/test/runner.erl6
2 files changed, 12 insertions, 4 deletions
diff --git a/lib/erl_interface/test/ei_decode_SUITE_data/ei_decode_test.c b/lib/erl_interface/test/ei_decode_SUITE_data/ei_decode_test.c
index 30f5fe33a0..cfe9083065 100644
--- a/lib/erl_interface/test/ei_decode_SUITE_data/ei_decode_test.c
+++ b/lib/erl_interface/test/ei_decode_SUITE_data/ei_decode_test.c
@@ -377,8 +377,14 @@ TESTCASE(test_ei_decode_ulong)
EI_DECODE_2 (decode_ulong, 11, unsigned long, ll(0x8000000000000000));
EI_DECODE_2 (decode_ulong, 11, unsigned long, ll(0xffffffffffffffff));
} else {
- EI_DECODE_2 (decode_ulong, 7, unsigned long, 0x80000000);
- EI_DECODE_2 (decode_ulong, 7, unsigned long, 0xffffffff);
+ if (sizeof(void*) > 4) {
+ /* Windows */
+ EI_DECODE_2_FAIL(decode_ulong, 11, unsigned long, ll(0x8000000000000000));
+ EI_DECODE_2_FAIL(decode_ulong, 11, unsigned long, ll(0xffffffffffffffff));
+ } else {
+ EI_DECODE_2 (decode_ulong, 7, unsigned long, 0x80000000);
+ EI_DECODE_2 (decode_ulong, 7, unsigned long, 0xffffffff);
+ }
}
EI_DECODE_2_FAIL(decode_ulong, 9, unsigned long, ll(0x7fffffffffff));
diff --git a/lib/erl_interface/test/runner.erl b/lib/erl_interface/test/runner.erl
index 9a27eda038..1084eec2a3 100644
--- a/lib/erl_interface/test/runner.erl
+++ b/lib/erl_interface/test/runner.erl
@@ -55,7 +55,7 @@ test(Tc, Timeout) ->
%% Returns: {ok, Port}
start({Prog, Tc}) when is_list(Prog), is_integer(Tc) ->
- Port = open_port({spawn, Prog}, [{packet, 4}]),
+ Port = open_port({spawn, Prog}, [{packet, 4}, exit_status]),
Command = [Tc div 256, Tc rem 256],
Port ! {self(), {command, Command}},
Port.
@@ -125,7 +125,9 @@ get_term(Port, Timeout) ->
get_reply(Port, Timeout) when is_port(Port) ->
receive
{Port, {data, Reply}} ->
- Reply
+ Reply;
+ Fail when element(1, Fail) == Port ->
+ ct:fail("Got unexpected message from port: ~p",[Fail])
after Timeout ->
ct:fail("No response from C program")
end.