[LTP] [PATCH v8 1/4] Refactor mqns_03 using new LTP API

Cyril Hrubis chrubis@suse.cz
Wed Sep 13 14:17:32 CEST 2023


Hi!
>  static void setup(void)
>  {
> -	tst_require_root();
> -	check_mqns();
> +	char *tmpdir;
> +
> +	if (!str_op || (strcmp(str_op, "clone") && strcmp(str_op, "unshare")))
> +		tst_brk(TCONF, "Please specify clone|unshare child isolation");
> +
> +	tmpdir = tst_get_tmpdir();
> +
> +	SAFE_ASPRINTF(&devdir, "%s/mqueue", tmpdir);
> +	SAFE_MKDIR(devdir, 0755);
> +
> +	SAFE_ASPRINTF(&mqueue1, "%s" MQNAME1, devdir);
> +	SAFE_ASPRINTF(&mqueue2, "%s" MQNAME2, devdir);

Do we really need the devdir and mqueue paths to be absolute?

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list