[LTP] [PATCH v3] ioctl_loop01.c: Use proper device for partitioning
Petr Vorel
pvorel@suse.cz
Fri Sep 19 15:22:14 CEST 2025
Hi Cyril,
> Hi!
> > > > The test should have needs_cmds set to parted (we do that properly in
> > > > ioctl09.c) then we do not have to handle the 255 exit code here since
> > > > the test would be skipped if it's missing.
> > > If we use needs_cmds all the check will be skipped in this case.
> > @Cyril: only single test require 'parted' as I reported in v1 [1].
> > Yeah, code gets slightly more complicated just because single test requires
> > parted. Or you would not care? IMHO it does not make sense to split test into
> > two (too much duplicity).
> The problem here is how to handle the metadata. One posible solution is
> to add a notion of optional dependencies so that we would have
> 'needs_foo' and 'wants_foo'. Or turn the needs_foo into a structure with
> an .optional boolean flag.
+1 but that should wait after the release.
Can I merge it with your RBT with the following diff below?
Kind regards,
Petr
> > But TINFO message should be turned in TCONF so that people notice.
> > tst_res(TINFO, "Current environment doesn't have parted disk, skip it");
> Yes please.
+++ testcases/kernel/syscalls/ioctl/ioctl_loop01.c
@@ -59,7 +59,7 @@ static void check_loop_value(int set_flag, int get_flag, int autoclear_field)
TST_ASSERT_INT(autoclear_path, autoclear_field);
if (!parted_sup) {
- tst_res(TINFO, "Current environment doesn't have parted disk, skip it");
+ tst_res(TCONF, "Current environment doesn't have parted disk, skip it");
return;
}
More information about the ltp
mailing list