[LTP] [PATCH v4] Rewrite userns06.c using new LTP API

Petr Vorel pvorel@suse.cz
Mon Apr 4 14:55:41 CEST 2022


Hi Andrea,

> Hi Petr,

> can TST_TEST_CONF be used even if TST_NO_DEFAULT_MAIN is defined?
I'm sorry, you're right it can't be used like that.

TST_NO_DEFAULT_MAIN could be defined only in #ifdef HAVE_LIBCAP:

#include "config.h"
#ifdef HAVE_LIBCAP

#define _GNU_SOURCE
#define TST_NO_DEFAULT_MAIN
#include "tst_test.h"
...
#else
#include "tst_test.h"
TST_TEST_TCONF("System is missing libcap");

But that's not much improvement indeed, thus lets ignore it.

Also, #define _GNU_SOURCE should be IMHO before any first include,
i.e. even before tst_test.h (it includes many system headers).

Kind regards,
Petr

> Andrea


More information about the ltp mailing list