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

Andrea Cervesato andrea.cervesato@suse.com
Wed Sep 13 14:57:08 CEST 2023


Hi,

On 9/13/23 14:17, Cyril Hrubis wrote:
> 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?
>
I tried absolute and relative path for devdir and they both work well 
with SAFE_UMOUNT() function, but any other combination of SAFE_MOUNT() 
parameters doesn't really work.

I think we can left it absolute, unless we really want to get rid of it.

Andrea



More information about the ltp mailing list