X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Futils%2Ftestapp%2Fgen-ust-events-ns%2Fgen-ust-events-ns.c;h=7b02a03ea9a3aadc6ae547b971ac78220fadaf48;hp=58a2066322ac79ed3695cc4382bc62bcac3fd478;hb=93d0d1f7ded46987ea752b6fcfe81e3281fc533c;hpb=df0b021fe4d7e6096062b63c330709f44761838a diff --git a/tests/utils/testapp/gen-ust-events-ns/gen-ust-events-ns.c b/tests/utils/testapp/gen-ust-events-ns/gen-ust-events-ns.c index 58a206632..7b02a03ea 100644 --- a/tests/utils/testapp/gen-ust-events-ns/gen-ust-events-ns.c +++ b/tests/utils/testapp/gen-ust-events-ns/gen-ust-events-ns.c @@ -38,6 +38,34 @@ #define LTTNG_PROC_NS_PATH_MAX 40 +/* + * The runner of this test validates that the kernel supports the + * namespace for which it is invoked. However, these defines are added + * to allow tests to run on systems that support a given namespace, + * but that use a libc that doesn't define its associated clone flag. + */ +#ifndef CLONE_NEWNS +#define CLONE_NEWNS 0x00020000 +#endif +#ifndef CLONE_NEWCGROUP +#define CLONE_NEWCGROUP 0x02000000 +#endif +#ifndef CLONE_NEWUTS +#define CLONE_NEWUTS 0x04000000 +#endif +#ifndef CLONE_NEWIPC +#define CLONE_NEWIPC 0x08000000 +#endif +#ifndef CLONE_NEWUSER +#define CLONE_NEWUSER 0x10000000 +#endif +#ifndef CLONE_NEWPID +#define CLONE_NEWPID 0x20000000 +#endif +#ifndef CLONE_NEWNET +#define CLONE_NEWNET 0x40000000 +#endif + static int nr_iter = 100; static int debug = 0; static char *ns_opt = NULL;