[LTP] [PATCH v7 1/1] mmapstress01: refactor to tst_test framework
Richard Palethorpe
rpalethorpe@suse.de
Mon Nov 14 10:44:56 CET 2022
Hello,
Petr Vorel <pvorel@suse.cz> writes:
> Hi Edward, Richard, all,
>
>> Hello,
>
>> Richard Palethorpe <rpalethorpe@suse.de> writes:
>
>> > Hello,
>
>> > Edward Liaw via ltp <ltp@lists.linux.it> writes:
>
>> >> Use ltp framework and apply make check corrections. Reorder functions
>> >> and variables. Use safe macros.
>> >> Drop leavefile option.
>> >> Build tests with FILE_OFFSET_BITS=64 instead of doing LARGE_FILE checks
>> >> to switch between 32 and 64 bit types and syscalls.
>> >> Define fsize bounds by file offset bits.
>> >> Move sighandler to setup and remove sig blocks.
>> >> Add option to specify pattern.
>> >> Set default nprocs to ncpus with min of 1 and max of 20.
>
>> >> Signed-off-by: Edward Liaw <edliaw@google.com>
>
>> > Reviewed-by: Richard Palethorpe <rpalethorpe@suse.com>
>
>> > Will merge this today if the CI is happy and nobody comments.
>
>> Merged, thanks!
>
> Thanks for your work! FYI 2 tiny problems sneaked in, see below.
>
> runtest/mm contained -t 0.20 option, which caused failure. Fixed in:
> https://github.com/linux-test-project/ltp/commit/36321277a294c0467219f650fd76aa1a8d310c1d
>
>> >> ---
>> >> testcases/kernel/mem/mmapstress/Makefile | 2 +
> ...
>> >> +static struct tst_option options[] = {
>> >> + {"d", &debug, "Enable debug output"},
>> >> + {"f:", &opt_filesize, "Initial filesize (default 4096)"},
>> >> + {"m", &do_sync, "Do random msync/fsyncs as well"},
>> >> + {"o", &do_offset, "Randomize the offset of file to map"},
>> >> + {"p:", &opt_nprocs,
>> >> + "Number of mapping children to create (default 1 < ncpus < 20)"},
>> >> + {"P:", &opt_pattern,
>> >> + "Use a fixed pattern (default random)"},
>> >> + {"r", &randloops,
>> >> + "Randomize number of pages map children check (random % 500), "
>> >> + "otherwise each child checks 500 pages"},
>> >> + {"S:", &opt_sparseoffset,
>> >> + "When non-zero, causes the sparse area to be left before the data, "
>> >> + "so that the actual initial filesize is sparseoffset + filesize "
>> >> + "(default 0)"},
>> >> + {},
>> >> +};
> Using options as non-inline leads to our docparse documentation
> having the name of the variable (options) i this case instead of listing
> options. Fixed in
> https://github.com/linux-test-project/ltp/commit/72de038ff54496c5ced6ddc2d76713376aababb1
>
> @Metan: I wonder if this can be fixed in docparser.
> @Richie: If not, it would be nice to have check for it (I'll add issue with
> "check" label).
Yeah, the checker could also produce the metadata. I'm not sure I want
to start down that path though. This is an AST level operation which
Sparse is pretty bad at.
I think both tools have serious issues. Perhaps using tree-sitter or
even Arocc would be far more profitable.
>
> @Edward FYI to build doc:
> cd metadata && make # open ../docparse/metadata.html
>
> Here is stable version:
> http://linux-test-project.github.io/metadata/metadata.stable.html
>
> I plan to write hook to put version for master branch, being updated after each
> commit.
>
> Kind regards,
> Petr
--
Thank you,
Richard.
More information about the ltp
mailing list