[LTP] [PATCH 2/3] llistxattr/llistxattr02.c: add new testcase

Cyril Hrubis chrubis@suse.cz
Wed Feb 10 14:41:48 CET 2016


Hi!
> +static struct test_case {
> +	const char *path;
> +	size_t size;
> +	int exp_err;
> +} tc[] = {
> +	/* test1 */
> +	{"symlink", 1, ERANGE},
> +	/* test2 */
> +	{"", 20, ENOENT},
> +	/* test3 */
> +	{NULL, 20, EFAULT}

You should use (char *)-1 instead of NULL. AFAIK on sparc there is some
system mapping at NULL and the call will overwrite it.

> +};

Otherwise it looks good.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the Ltp mailing list