X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=tests%2Fregression%2Fabi0-conflict%2Fapp_ust.c;fp=tests%2Fregression%2Fabi0-conflict%2Fapp_ust.c;h=d9c17b6a04daae150f23034188634427c440b279;hb=d2a010d1e67e246e8ab4a847b8bbbdbce2b4e2d7;hp=0000000000000000000000000000000000000000;hpb=6f78600e9600f413ebdf532e154d8946725d83fd;p=lttng-ust.git diff --git a/tests/regression/abi0-conflict/app_ust.c b/tests/regression/abi0-conflict/app_ust.c new file mode 100644 index 00000000..d9c17b6a --- /dev/null +++ b/tests/regression/abi0-conflict/app_ust.c @@ -0,0 +1,43 @@ +/* + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (C) 2021 Michael Jeanson + */ + +#include +#include +#include +#include + +#include "./libzero.h" +#include "./libone.h" + +#define LTTNG_UST_TRACEPOINT_DEFINE +#include "ust_tests_hello.h" + +int main(void) +{ + int i, netint; + long values[] = { 1, 2, 3 }; + char text[10] = "test"; + double dbl = 2.0; + float flt = 2222.0; + bool mybool = 123; /* should print "1" */ + + printf("This application is linked on liblttng-ust.\n"); + +#ifdef USE_LIBZERO + libzero(); +#endif +#ifdef USE_LIBONE + libone(); +#endif + + for (i = 0; i < 10; i++) { + netint = htonl(i); + lttng_ust_tracepoint(ust_tests_hello, tptest, i, netint, values, + text, strlen(text), dbl, flt, mybool); + } + + return 0; +}