public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/1] compat_16: Define USE_LEGACY_COMPAT_16_H for legacy tests
Date: Wed, 19 Jul 2023 12:12:25 +0200	[thread overview]
Message-ID: <20230719101225.GB1221211@pevik> (raw)
In-Reply-To: <CAEemH2fAuHrE4XyBjpudMCJJ4ZJ+9TOu=LpHXzizUp-uRqWXdA@mail.gmail.com>

Hi Li,

...
> I'm not sure here if we really need COMPAT_16_H for choosing two compat
> header file.
> As we already use hard code in C source file like #include "compat_16.h" or
> "compat_tst_16.h",
> so compile with -I the header directory is enough I guess.

> Try this simple compat_16.mk, it at least works well on my side.
> Or, did I miss anything in the 16bit compilation?

I like this simplification.

Well, touch compat_16.h causes rebuilding tests which use compat_tst_16.h.
I don't mind that. But OTOH touch compat_tst_16.h does not trigger rebuilding
tests which use compat_tst_16.h :( (tested on
testcases/kernel/syscalls/setregid). Could you please recheck that?

Kind regards,
Petr

> # cat compat_16.mk

> CPPFLAGS += -I$(abs_srcdir) -I$(abs_srcdir)/../utils

> SRCS ?= $(sort $(wildcard $(abs_srcdir)/*.c))

> MAKE_TARGETS := $(notdir $(patsubst %.c,%,$(SRCS)))
> MAKE_TARGETS_OBJS_WO_COMPAT_16 := $(addsuffix .o,$(MAKE_TARGETS))
> MAKE_TARGETS += $(addsuffix _16,$(MAKE_TARGETS))

> DEF_16 := TST_USE_COMPAT16_SYSCALL

> %_16: CPPFLAGS += -D$(DEF_16)=1

> %_16.o: %.c
> $(COMPILE.c) $(OUTPUT_OPTION) $<

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

  reply	other threads:[~2023-07-19 10:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-18 10:00 [LTP] [PATCH 1/1] compat_16: Define USE_LEGACY_COMPAT_16_H for legacy tests Petr Vorel
2023-07-18 14:53 ` Yang Xu (Fujitsu)
2023-07-19  7:15 ` Li Wang
2023-07-19 10:12   ` Petr Vorel [this message]
2023-07-20  3:13     ` Li Wang
2023-07-20  9:43       ` Petr Vorel
2023-07-20 10:03         ` Li Wang
2023-10-27 11:58           ` Cyril Hrubis
2023-10-27 17:38             ` Petr Vorel

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=20230719101225.GB1221211@pevik \
    --to=pvorel@suse.cz \
    --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