public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Marius Kittler <mkittler@suse.de>
To: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v1] Port getxattr03.c to new test API
Date: Mon, 25 Sep 2023 15:10:12 +0200	[thread overview]
Message-ID: <4513172.LvFx2qVVIh@linux-9lzf> (raw)
In-Reply-To: <ZQ2GltNFaQIrszXl@wegao>

Am Freitag, 22. September 2023, 14:20:38 CEST schrieb Wei Gao:
> On Fri, Sep 22, 2023 at 11:23:47AM +0200, Marius Kittler wrote:
> > Am Freitag, 22. September 2023, 02:00:32 CEST schrieb Wei Gao:
> > > > #ifdef HAVE_SYS_XATTR_H
> > > 
> > > Normally i saw this kind of ifdef in include/lapi/xattr.h
> > > I suppose we need create include/lapi/xattr.h?
> > 
> > No, we don't need that header here. This macro is actually defined in
> > `config.h` which also makes sense as it is generated at configuration
> > time. Note that also all builds (including musl) are passing with this
> > change, see
> > https://github.com/Martchus/ltp/actions/runs/6259530698.
> 
> Maybe some misunderstanding, i mean put ifdef logic into
> include/lapi/xattr.h instead of define HAVE_SYS_XATTR_H, since i saw ifdef
> logic for judge exist of xxx.h normally handled in include/lapi/xxx.h.

Ah, so I'd add `include/lapi/xattr.h` and to the `#ifdef HAVE_SYS_XATTR_H` 
there. But is that really the way to go in that situation? I've just checked a 
few header files in the `include/lapi` directory and there's no precedence for 
the case when a header is not supported at all and the corresponding test 
should thus be disabled. These headers seem more for abstracting differences 
between different (versions) of C libraries but not for handling the case when 
a test should be skipped completely.

Note that the way I wrote this test was suggested to me in "Re: [LTP] [PATCH 
v1] Port `getxattr01.c` to new test API".



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

  reply	other threads:[~2023-09-25 13:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-21  9:06 [LTP] [PATCH v1] Port getxattr03.c to new test API Marius Kittler
2023-09-22  0:00 ` Wei Gao via ltp
2023-09-22  9:23   ` Marius Kittler
2023-09-22 12:20     ` Wei Gao via ltp
2023-09-25 13:10       ` Marius Kittler [this message]
2023-11-23 10:46         ` Richard Palethorpe

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=4513172.LvFx2qVVIh@linux-9lzf \
    --to=mkittler@suse.de \
    --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