Linux Test Project
 help / color / mirror / Atom feed
From: "xuyang2018.jy@fujitsu.com" <xuyang2018.jy@fujitsu.com>
To: Li Wang <liwang@redhat.com>
Cc: "ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] [COMMITTED] save_restore: remove the duplicate 'const' declaration
Date: Thu, 10 Mar 2022 08:53:16 +0000	[thread overview]
Message-ID: <6229BCAF.1020502@fujitsu.com> (raw)
In-Reply-To: <CAEemH2dwawam7iK+E7KnY8Qi0vwz9NWXEf4Bzo3o_9tz-75kjg@mail.gmail.com>

Hi Li
>
>
> On Thu, Mar 10, 2022 at 4:38 PM xuyang2018.jy@fujitsu.com
> <mailto:xuyang2018.jy@fujitsu.com> <xuyang2018.jy@fujitsu.com
> <mailto:xuyang2018.jy@fujitsu.com>> wrote:
>
>     Hi Li
>      > --- a/lib/newlib_tests/test19.c
>      > +++ b/lib/newlib_tests/test19.c
>      > @@ -23,7 +23,7 @@ static struct tst_test test = {
>      > .needs_root = 1,
>      > .test_all = run,
>      > .setup = setup,
>      > - .save_restore = (const struct tst_path_val const[]) {
>      > + .save_restore = (const struct tst_path_val[]) {
>      > {"?/proc/nonexistent", NULL},
>      > {"!/proc/sys/kernel/numa_balancing", NULL},
>      > {"/proc/sys/kernel/core_pattern", NULL},
>
>     Since tst_path_val is a struct array, we should use {NULL, NULL} or {}
>     terminated instead of NULL terminated , otherwise it will report
>     missing
>     braces warning.
>
> Ah, right. Sorry!!!
Never mind.
>
> Seems I was in so hurry to fix the const issue but overlook this.
I also think you can add a separate patch to fix this comment in doc or 
in  tst_test.h for other struct pointers.

         /*
          * NULL-terminated array to be allocated buffers.
          */
         struct tst_buffers *bufs;

         /*
          * NULL-terminated array of capability settings
          */
         struct tst_cap *caps;

Best Regards
Yang Xu
>
> --
> Regards,
> Li Wang

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

  reply	other threads:[~2022-03-10  8:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-10  8:22 [LTP] [COMMITTED] save_restore: remove the duplicate 'const' declaration Li Wang
2022-03-10  8:38 ` xuyang2018.jy
2022-03-10  8:45   ` Li Wang
2022-03-10  8:53     ` xuyang2018.jy [this message]
2022-03-10  8:58       ` Li Wang
2022-03-10  9:06   ` xuyang2018.jy
2022-03-10 12:09     ` Richard Palethorpe
2022-03-11  1:18       ` xuyang2018.jy

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=6229BCAF.1020502@fujitsu.com \
    --to=xuyang2018.jy@fujitsu.com \
    --cc=liwang@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox