From: Richard Palethorpe <rpalethorpe@suse.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3 7/8] API: Move libtsc.h from realtime tests include to tst_tsc.h
Date: Wed, 28 Jul 2021 13:34:11 +0100 [thread overview]
Message-ID: <20210728123412.31858-8-rpalethorpe@suse.com> (raw)
In-Reply-To: <20210728123412.31858-1-rpalethorpe@suse.com>
Allow the meltdown test to use this file without modifying the
CFLAGS. This avoids having to add the include also to the CHECK_FLAGS.
Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
---
testcases/realtime/include/libtsc.h => include/tst_tsc.h | 0
testcases/cve/Makefile | 2 --
testcases/cve/meltdown.c | 2 +-
testcases/realtime/func/async_handler/async_handler_tsc.c | 3 ++-
testcases/realtime/func/measurement/preempt_timing.c | 3 ++-
testcases/realtime/func/measurement/rdtsc-latency.c | 3 ++-
6 files changed, 7 insertions(+), 6 deletions(-)
rename testcases/realtime/include/libtsc.h => include/tst_tsc.h (100%)
diff --git a/testcases/realtime/include/libtsc.h b/include/tst_tsc.h
similarity index 100%
rename from testcases/realtime/include/libtsc.h
rename to include/tst_tsc.h
diff --git a/testcases/cve/Makefile b/testcases/cve/Makefile
index ddf8b6fe1..c5308794d 100644
--- a/testcases/cve/Makefile
+++ b/testcases/cve/Makefile
@@ -18,8 +18,6 @@ ifneq ($(ANDROID),1)
cve-2014-0196: LDLIBS += -lutil
endif
-meltdown: CFLAGS += -I$(abs_srcdir)/../realtime/include
-
ifneq (,$(filter $(HOST_CPU),x86 x86_64))
meltdown: CFLAGS += -msse2
endif
diff --git a/testcases/cve/meltdown.c b/testcases/cve/meltdown.c
index a387b3205..5a984aba3 100644
--- a/testcases/cve/meltdown.c
+++ b/testcases/cve/meltdown.c
@@ -19,7 +19,7 @@
#include <emmintrin.h>
-#include "libtsc.h"
+#include "tst_tsc.h"
#define TARGET_OFFSET 9
#define TARGET_SIZE (1 << TARGET_OFFSET)
diff --git a/testcases/realtime/func/async_handler/async_handler_tsc.c b/testcases/realtime/func/async_handler/async_handler_tsc.c
index 7da4324a5..73d4ee5c6 100644
--- a/testcases/realtime/func/async_handler/async_handler_tsc.c
+++ b/testcases/realtime/func/async_handler/async_handler_tsc.c
@@ -46,7 +46,8 @@
#include <pthread.h>
#include <librttest.h>
#include <libstats.h>
-#include <libtsc.h>
+
+#include "tst_tsc.h"
#define HANDLER_PRIO 98
#define SIGNAL_PRIO 99
diff --git a/testcases/realtime/func/measurement/preempt_timing.c b/testcases/realtime/func/measurement/preempt_timing.c
index 8b5333480..b84d54692 100644
--- a/testcases/realtime/func/measurement/preempt_timing.c
+++ b/testcases/realtime/func/measurement/preempt_timing.c
@@ -52,7 +52,8 @@
#include <sys/mman.h>
#include <stdint.h>
#include <librttest.h>
-#include <libtsc.h>
+
+#include "tst_tsc.h"
#define ITERATIONS 1000000ULL
#define INTERVALS 10
diff --git a/testcases/realtime/func/measurement/rdtsc-latency.c b/testcases/realtime/func/measurement/rdtsc-latency.c
index d6ab89ff0..3829947bc 100644
--- a/testcases/realtime/func/measurement/rdtsc-latency.c
+++ b/testcases/realtime/func/measurement/rdtsc-latency.c
@@ -44,7 +44,8 @@
#include <errno.h>
#include <stdint.h>
#include <librttest.h>
-#include <libtsc.h>
+
+#include "tst_tsc.h"
#define ITERATIONS 1000000
--
2.31.1
next prev parent reply other threads:[~2021-07-28 12:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-28 12:34 [LTP] [PATCH v3 0/8] Sparse based checker and rule proposal Richard Palethorpe
2021-07-28 12:34 ` [LTP] [PATCH v3 1/8] Add Sparse based checker and TST_RET/ERR check Richard Palethorpe
2021-07-28 12:34 ` [LTP] [PATCH v3 2/8] Add 'make check' to the build system Richard Palethorpe
2021-08-27 12:06 ` Petr Vorel
2021-08-30 14:33 ` Cyril Hrubis
2021-08-30 18:13 ` Petr Vorel
2021-07-28 12:34 ` [LTP] [PATCH v3 3/8] doc: Add rules and recommendations list Richard Palethorpe
2021-07-28 12:34 ` [LTP] [PATCH v3 4/8] doc: Remind authors and maintainers to run make check Richard Palethorpe
2021-07-28 12:34 ` [LTP] [PATCH v3 5/8] doc: Document TEST macro and state TST_RET/ERR rule LTP-002 Richard Palethorpe
2021-07-29 15:27 ` Cyril Hrubis
2021-07-28 12:34 ` [LTP] [PATCH v3 6/8] Reference LTP-002 rule in Cocci scripts Richard Palethorpe
2021-07-28 12:34 ` Richard Palethorpe [this message]
2021-07-28 12:34 ` [LTP] [PATCH v3 8/8] API/tst_tsc: Add guards and remove some boilerplate Richard Palethorpe
2021-08-09 20:12 ` [LTP] Review of C static analyses tools 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=20210728123412.31858-8-rpalethorpe@suse.com \
--to=rpalethorpe@suse.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 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.