[LTP] fsconfig04: Check FSCONFIG_SET_PATH
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Wed Oct 21 15:34:46 CEST 2026
Hi Wei,
On Wed, 21 Oct 2026 at 08:49:12 +0000, Wei Gao via ltp wrote:
> fsconfig04: Check FSCONFIG_SET_PATH
> + if (dev1[0])
> + tst_detach_device(dev1);
> +
> + if (dev2[0])
> + tst_detach_device(dev2);
High severity: If another process claims a loop device between
tst_find_free_loopdev() and LOOP_SET_FD, attachment fails with EBUSY but
leaves dev1/dev2 populated, so tst_brk() runs this cleanup against the other
process's device. Track attachment ownership, including partial-attachment
failures, and detach only associations created by this test.
> + snprintf(path, sizeof(path), "tune2fs -l %s 2>&1", tst_device->dev);
> + tune2fs = SAFE_POPEN(path, "r");
Medium severity: LTP_DEV can name a valid device alias containing spaces;
the preceding calls preserve that path, but popen() splits it into multiple
arguments and tune2fs exits with usage, producing a false TFAIL. Use
tst_cmd() with an argv array and captured output instead of a shell.
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
More information about the ltp
mailing list