[LTP] [PATCH v1] Add mkdir10 test

Cyril Hrubis chrubis@suse.cz
Fri Feb 2 18:10:52 CET 2024


Hi!
> +static void run(void)
> +{
> +	char *symname = "my_symlink0";
> +
> +	SAFE_SYMLINK(tst_get_tmpdir(), symname);
> +	TST_EXP_FAIL(mkdir(symname, 0777), EEXIST);

This can be easily added into mkdir03.c as well as a few more different
cases (we can't overwrite named pipe, directory, device node, etc.) if
we wanted to.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list