[LTP] [PATCH v4] Rewrite userns06.c using new LTP API
Petr Vorel
pvorel@suse.cz
Tue Apr 19 09:22:27 CEST 2022
Hi Andrea,
Reviewed-by: Petr Vorel <pvorel@suse.cz>
2 small things:
Actually adding one more #ifdef HAVE_LIBCAP
might be better than calling tst_brk() manually (this is better than my previous
suggestion):
#include "config.h"
#ifdef HAVE_LIBCAP
# define TST_NO_DEFAULT_MAIN
#endif
#include "tst_test.h"
#ifdef HAVE_LIBCAP
#include <string.h>
#include <sys/wait.h>
#include <sys/capability.h>
int main(int argc, char *argv[])
{
...
}
#else
TST_TEST_TCONF("System is missing libcap");
#endif
But if you prefer to original version (define main), then TCONF should be used.
Also #define _GNU_SOURCE is not needed, it should be dropped.
If you agree, I can merge it with proposed changes.
Kind regards,
Petr
More information about the ltp
mailing list