[LTP] [PATCH] Add missing mode argument to open(..., O_CREAT)

Petr Vorel pvorel@suse.cz
Thu May 14 09:11:21 CEST 2020


Hi Marting,

thank you, good catch.

According to man open(2), mode must be specified when O_CREAT or O_TMPFILE is
specified in flags. Thus it looks to me that also these files are missing mode:

testcases/kernel/syscalls/fallocate/fallocate05.c
fd = SAFE_OPEN(MNTPOINT "/test_file", O_WRONLY | O_CREAT);
fd = SAFE_OPEN(MNTPOINT "/test_file", O_WRONLY | O_CREAT | O_TRUNC);

testcases/kernel/syscalls/fallocate/fallocate06.c
fd = SAFE_OPEN(TEMPFILE, O_RDWR | O_CREAT | O_TRUNC);

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr


More information about the ltp mailing list