[LTP] [PATCH 1/2] syscalls/open01: Cleanup && convert to new library

Cyril Hrubis chrubis@suse.cz
Tue Jun 13 13:43:39 CEST 2017


Hi!
> +static struct tcase {
> +	char *filename;
> +	int flag;
> +	mode_t mode;
> +	unsigned short tst_bit;
> +	char *desc;
> +} tcases[] = {
> +	{TEST_FILE, O_RDWR | O_CREAT, 01444, S_ISVTX, "Sticky bit"},
> +	{TEST_DIR, O_DIRECTORY, NULL, S_IFDIR, "Directory bit"}
                                  ^
				  This should be just 0 or 00 but not
				  NULL.

Also it would be a bit safer if we opened a directory created in a the
test temporary directory instead of "/tmp". We just have to do
SAFE_MKDIR() in setup() and use it's name as a relative path.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list