[LTP] [PATCH v3] growfiles:fix test failure due to missing directory /test/growfiles/reiser

Andrea Cervesato andrea.cervesato@suse.com
Wed May 6 19:22:43 CEST 2026


Hi,

our Agent review was missing in the ML.
Here it is the result, which seems ok, unless you want to
add some notes to it.

On Fri, 10 Apr 2026, lekshmi-cpillai wrote:
> growfiles:fix test failure due to missing directory /test/growfiles/reiser

Hi lekshmi,

> -The test attempts to creates the required directory structure recursively(which was not
> in current code),Sets appropria te permissions (0755)and  Verifies the directory is accessible

The body only describes what was changed, not why the directory is missing at
runtime. Please explain the root cause: under what conditions does growfiles
encounter a path whose intermediate directories do not exist, and why is
/test/growfiles/reiser specifically affected?

The body also has typos ("appropria te" → "appropriate", "attempts to creates"
→ "attempts to create") and the subject is missing a space after the colon
("growfiles:fix" → "growfiles: fix").

> +	struct stat st;
> ...
> +		if (stat(tmp, &st) == -1) {
> +			if (mkdir(tmp, mode) == -1 && errno != EEXIST) {

The stat() result (st) is never read — only its return value is used. Drop the
stat() call and call mkdir() directly; treat EEXIST as success. This simplifies
the code and avoids a TOCTOU window between stat and mkdir.

Regards,
LTP AI Reviewer

--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com


More information about the ltp mailing list