[LTP] [PATCH 1/1] Docparse: Escape | in table content

Petr Vorel pvorel@suse.cz
Wed Dec 16 17:02:25 CET 2020


> Hi!
> > BTW I wonder how to fix .test_variants in JSON:
> > "test_variants": "ARRAY_SIZE"

> > It's in many tests, e.g.  testcases/kernel/syscalls/clock_gettime/clock_gettime02.c.

> I guess that we can filter out test_variants for now, I do not think
> that it will be useful for the metadata that much.

+1, I'll do it.

> > Also many arrays should be anonymous, e.g. exe_options (for .options) and
> > resource_files (for .resource_files) in testcases/kernel/syscalls/execve/execve05.c.
> > I wonder if there can be smarter solution before we fix it.

> Well either we teach the C parser about variables, or we move all the
> definitions inline. I would just move them since that's easier to do.

+1.

> > But using inline for .options (and other two dimensional array needs to be fixed
> > again in the parser: it now prints array reference: ARRAY(0x563186f58048)
> > (for testcases/kernel/syscalls/ioctl/ioctl01.c).

> That's a bug in the perl that produces the asciidoc, it's parsed just
> fine in the json:

Sure, I meant perl parser, which is actually formatter.
I'll try to send a patch soon.

>   "ioctl01": {
>    "needs_root": "1",
>    "needs_tmpdir": "1",
>    "options": [
>      [
>       "D:",
>       "device",
>       "-D <tty device> : for example, /dev/tty[0-9]"
>      ]
>     ],
>    "fname": "testcases/kernel/syscalls/ioctl/ioctl01.c"
>   },

> > Because this disables reusing things (putting them in the header). But you
> > probably prefer it than slower down parsing with preprocessor.
> > But we need to state this policy in docs.

> Indeed, that should be done.


Kind regards,
Petr


More information about the ltp mailing list