[LTP] fsconfig04: Check FSCONFIG_SET_PATH
Wei Gao
wegao@suse.com
Thu Oct 22 03:59:00 CEST 2026
On Wed, Oct 21, 2026 at 01:34:46PM +0000, linuxtestproject.agent@gmail.com wrote:
> 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
Above comments looks like over-engineering to me. If anyone think change is needed,
I can send a follow-up patch.
>
> ---
> 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