public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Aishwarya TCV <aishwarya.tcv@arm.com>,
	adhemerval.zanella@linaro.org, linux-kernel@vger.kernel.org,
	Naresh Kamboju <naresh.kamboju@linaro.org>,
	Mark Brown <broonie@kernel.org>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>
Subject: [PATCH v2] selftests: vDSO: don't include generated headers for chacha test
Date: Wed, 11 Sep 2024 15:36:32 +0200	[thread overview]
Message-ID: <20240911133745.3124327-2-Jason@zx2c4.com> (raw)
In-Reply-To: <ZuGcQnzUev6eAy0w@zx2c4.com>

It's not correct to use $(top_srcdir) for generated header files, for
builds that are done out of tree via O=, and $(objtree) isn't valid in
the selftests context. Instead, just obviate the need for these
generated header files by defining empty stubs in tools/include, which
is the same thing that's done for rwlock.h.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
I'll replace the broken commit with this one. I've verified the
kselftests are fine now, particularly for kvm.

 tools/include/generated/asm-offsets.h     | 0
 tools/include/generated/asm/cpucap-defs.h | 0
 tools/include/generated/asm/sysreg-defs.h | 0
 tools/testing/selftests/vDSO/Makefile     | 2 +-
 4 files changed, 1 insertion(+), 1 deletion(-)
 create mode 100644 tools/include/generated/asm-offsets.h
 create mode 100644 tools/include/generated/asm/cpucap-defs.h
 create mode 100644 tools/include/generated/asm/sysreg-defs.h

diff --git a/tools/include/generated/asm-offsets.h b/tools/include/generated/asm-offsets.h
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/tools/include/generated/asm/cpucap-defs.h b/tools/include/generated/asm/cpucap-defs.h
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/tools/include/generated/asm/sysreg-defs.h b/tools/include/generated/asm/sysreg-defs.h
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/tools/testing/selftests/vDSO/Makefile b/tools/testing/selftests/vDSO/Makefile
index 3c6fafbd83a6..610056acc1b7 100644
--- a/tools/testing/selftests/vDSO/Makefile
+++ b/tools/testing/selftests/vDSO/Makefile
@@ -39,7 +39,7 @@ $(OUTPUT)/vdso_test_getrandom: CFLAGS += -isystem $(top_srcdir)/tools/include \
 
 $(OUTPUT)/vdso_test_chacha: $(top_srcdir)/tools/arch/$(SRCARCH)/vdso/vgetrandom-chacha.S
 $(OUTPUT)/vdso_test_chacha: CFLAGS += -idirafter $(top_srcdir)/tools/include \
+                                      -idirafter $(top_srcdir)/tools/include/generated \
                                       -idirafter $(top_srcdir)/arch/$(SRCARCH)/include \
-                                      -idirafter $(top_srcdir)/arch/$(SRCARCH)/include/generated \
                                       -idirafter $(top_srcdir)/include \
                                       -D__ASSEMBLY__ -Wa,--noexecstack
-- 
2.46.0


  reply	other threads:[~2024-09-11 13:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-04 15:58 [PATCH] selftests: vDSO: don't include generated headers for chacha test Jason A. Donenfeld
2024-09-04 16:19 ` Adhemerval Zanella Netto
2024-09-10 22:52 ` Aishwarya TCV
2024-09-11  2:44   ` Jason A. Donenfeld
2024-09-11 10:14     ` Mark Brown
2024-09-11 12:47       ` Jason A. Donenfeld
2024-09-11 13:01         ` Jason A. Donenfeld
2024-09-11 13:33           ` Jason A. Donenfeld
2024-09-11 13:36             ` Jason A. Donenfeld [this message]
2024-09-11 14:12               ` [PATCH v2] " Mark Brown
2024-09-11 14:40                 ` Jason A. Donenfeld

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=20240911133745.3124327-2-Jason@zx2c4.com \
    --to=jason@zx2c4.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=aishwarya.tcv@arm.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=naresh.kamboju@linaro.org \
    /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