aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface/test/all_SUITE_data
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-11-13 16:50:33 +0100
committerSverker Eriksson <[email protected]>2016-04-07 18:41:47 +0200
commit9c80b9ec06fc0ca89dcc8d797a2dbc408a162098 (patch)
tree00920702806a31febc140ebca3850622a93836ff /lib/erl_interface/test/all_SUITE_data
parentbf0bf9cf009fa8ccc7fc364fdbbdeb6f491efe43 (diff)
downloadotp-9c80b9ec06fc0ca89dcc8d797a2dbc408a162098.tar.gz
otp-9c80b9ec06fc0ca89dcc8d797a2dbc408a162098.tar.bz2
otp-9c80b9ec06fc0ca89dcc8d797a2dbc408a162098.zip
erl_interface: Support 32-bit creation for pid,port,refs
Diffstat (limited to 'lib/erl_interface/test/all_SUITE_data')
-rw-r--r--lib/erl_interface/test/all_SUITE_data/ei_runner.c11
-rw-r--r--lib/erl_interface/test/all_SUITE_data/ei_runner.h3
2 files changed, 10 insertions, 4 deletions
diff --git a/lib/erl_interface/test/all_SUITE_data/ei_runner.c b/lib/erl_interface/test/all_SUITE_data/ei_runner.c
index 2b0d6c856a..e9b4b2de57 100644
--- a/lib/erl_interface/test/all_SUITE_data/ei_runner.c
+++ b/lib/erl_interface/test/all_SUITE_data/ei_runner.c
@@ -255,12 +255,17 @@ do_report(file, line, ok)
* Erlang side.
*/
-void do_fail(char* file, int line, char* reason)
+void do_fail(const char* file, int line, const char* reason, ...)
{
+ va_list ap;
char sbuf[2048];
+ char* sp = sbuf;
- sbuf[0] = 'f';
- sprintf(sbuf+1, "%s, line %d: %s", file, line, reason);
+ *sp++ = 'f';
+ sp += sprintf(sp, "%s, line %d: ", file, line);
+ va_start(ap, reason);
+ sp += vsprintf(sp, reason, ap);
+ va_end(ap);
reply(sbuf, 1+strlen(sbuf+1));
}
diff --git a/lib/erl_interface/test/all_SUITE_data/ei_runner.h b/lib/erl_interface/test/all_SUITE_data/ei_runner.h
index 62997d00a0..ca01a1d3ed 100644
--- a/lib/erl_interface/test/all_SUITE_data/ei_runner.h
+++ b/lib/erl_interface/test/all_SUITE_data/ei_runner.h
@@ -52,10 +52,11 @@ void free_packet(char*);
*/
#define fail(reason) do_fail(__FILE__, __LINE__, reason)
+#define fail1(reason, a1) do_fail(__FILE__, __LINE__, reason, a1)
#define report(ok) do_report(__FILE__, __LINE__, ok)
void do_report(char* file, int line, int ok);
-void do_fail(char* file, int line, char* reason);
+void do_fail(const char* file, int line, const char* reason, ...);
void send_buffer(char* buf, int size);
void message(char* format, ...);