All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [RFC] Remove [Description] subtitle from docparse
Date: Fri, 31 Jan 2025 12:50:46 +0100	[thread overview]
Message-ID: <20250131115046.GA1116925@pevik> (raw)
In-Reply-To: <Z5y03QTwjlgsuJ88@yuki.lan>

> Hi!
> > Can we remove [Description] part from docparse documentation in tests?
> > This is transformed into "Description" subtitle in resulted html/pdf.

> > 1) It's not really needed (it's obvious that it's a description of the test)
> > 2) Sometimes it's missing (inconsistency).

> That part can be fixed with something as:

> diff --git a/metadata/metaparse.c b/metadata/metaparse.c
> index 2b96149dc..422604a2c 100644
> --- a/metadata/metaparse.c
> +++ b/metadata/metaparse.c
> @@ -852,6 +852,14 @@ static struct data_node *parse_file(const char *fname)

>         if (data_node_array_len(doc)) {
>                 data_node_hash_add(res, "doc", doc);
> +
> +               char *str = doc->array.array[0]->string.val;
> +
> +               if (!strstr("[Description]", str)) {
> +                       fprintf(stderr, "%s: Missing [Description] in doc comment!\n", fname);
> +                       exit(1);
> +               }
> +
>                 found = 1;
>         } else {
>                 data_node_free(doc);

Sure, that could work as well.

> > I would keep other subtitles (e.g. [Algorithm]), just remove the first one.

> I find it a bit inconsistent if we do it this way, but I guess either
> way is fine.

The reason why suggested to remove it is that I don't see much information value
in "Description" title. "Algorithm" has at least little bit of information value.

Besides these two we have only:
* [Prerequisites] (testcases/kernel/mem/ksm/ksm07.c)
* [Race Description] (testcases/kernel/syscalls/fork/fork13.c)

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      reply	other threads:[~2025-01-31 11:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-31  9:15 [LTP] [RFC] Remove [Description] subtitle from docparse Petr Vorel
2025-01-31  9:38 ` Andrea Cervesato via ltp
2025-01-31 10:34   ` Petr Vorel
2025-01-31 10:48     ` Andrea Cervesato via ltp
2025-01-31 11:58       ` Petr Vorel
2025-01-31 11:32 ` Cyril Hrubis
2025-01-31 11:50   ` Petr Vorel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250131115046.GA1116925@pevik \
    --to=pvorel@suse.cz \
    --cc=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.