* [PATCH] libtraceevent: Fix tests running on big endian arch
@ 2024-03-29 14:25 Paul Mars
2024-03-29 16:58 ` Steven Rostedt
0 siblings, 1 reply; 3+ messages in thread
From: Paul Mars @ 2024-03-29 14:25 UTC (permalink / raw)
To: linux-trace-devel; +Cc: Paul Mars
Tests running on big endian arch (tested on s390x) where failing due to:
- a typo in CPUMASK_BYTEPN.
- a missing call to tep_set_file_bigendian when initializing the test
suite.
Thanks to Mate Kukri <mate.kukri@canonical.com>.
---
utest/traceevent-utest.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/utest/traceevent-utest.c b/utest/traceevent-utest.c
index 041843e..b95e478 100644
--- a/utest/traceevent-utest.c
+++ b/utest/traceevent-utest.c
@@ -216,7 +216,7 @@ DECL_CPUMASK_EVENT_DATA(bytep2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x01);
#define CPUMASK_BYTEP2_FMT "cpumask=0,23"
DECL_CPUMASK_EVENT_DATA(bytepn, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01);
-#define CPUMASK_BYTEPN "ARRAY[80, 00, 00, 00, 00, 00, 80, 01]"
+#define CPUMASK_BYTEPN "ARRAY[80, 00, 00, 00, 00, 00, 00, 01]"
#define CPUMASK_BYTEPN_FMT "cpumask=0,63"
#endif
@@ -392,6 +392,9 @@ static int test_suite_init(void)
test_tep = tep_alloc();
if (!test_tep)
return 1;
+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+ tep_set_file_bigendian(test_tep, TEP_BIG_ENDIAN);
+#endif
return 0;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] libtraceevent: Fix tests running on big endian arch
2024-03-29 14:25 [PATCH] libtraceevent: Fix tests running on big endian arch Paul Mars
@ 2024-03-29 16:58 ` Steven Rostedt
2024-04-02 8:34 ` [PATCH] " Paul Mars
0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2024-03-29 16:58 UTC (permalink / raw)
To: Paul Mars; +Cc: linux-trace-devel
On Fri, 29 Mar 2024 15:25:45 +0100
Paul Mars <paul.mars@canonical.com> wrote:
> Tests running on big endian arch (tested on s390x) where failing due to:
Nice, all my big endian machines have died, so I can no longer test on them.
>
> - a typo in CPUMASK_BYTEPN.
> - a missing call to tep_set_file_bigendian when initializing the test
> suite.
>
> Thanks to Mate Kukri <mate.kukri@canonical.com>.
Can you add a signed-off-by please.
And for a change log, do you want:
Suggested-by: Mate Kukri <mate.kukri@canonical.com>
?
Thanks,
-- Steve
>
> ---
> utest/traceevent-utest.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/utest/traceevent-utest.c b/utest/traceevent-utest.c
> index 041843e..b95e478 100644
> --- a/utest/traceevent-utest.c
> +++ b/utest/traceevent-utest.c
> @@ -216,7 +216,7 @@ DECL_CPUMASK_EVENT_DATA(bytep2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x01);
> #define CPUMASK_BYTEP2_FMT "cpumask=0,23"
>
> DECL_CPUMASK_EVENT_DATA(bytepn, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01);
> -#define CPUMASK_BYTEPN "ARRAY[80, 00, 00, 00, 00, 00, 80, 01]"
> +#define CPUMASK_BYTEPN "ARRAY[80, 00, 00, 00, 00, 00, 00, 01]"
> #define CPUMASK_BYTEPN_FMT "cpumask=0,63"
> #endif
>
> @@ -392,6 +392,9 @@ static int test_suite_init(void)
> test_tep = tep_alloc();
> if (!test_tep)
> return 1;
> +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
> + tep_set_file_bigendian(test_tep, TEP_BIG_ENDIAN);
> +#endif
> return 0;
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix tests running on big endian arch
2024-03-29 16:58 ` Steven Rostedt
@ 2024-04-02 8:34 ` Paul Mars
0 siblings, 0 replies; 3+ messages in thread
From: Paul Mars @ 2024-04-02 8:34 UTC (permalink / raw)
To: rostedt; +Cc: linux-trace-devel, paul.mars, Mate Kukri
> Can you add a signed-off-by please.
Sure, see the updated patch below.
I also added the Suggested-by header as suggested, thanks!
I am not sure if I should send the full updated patch again or not, so here
it is below.
Tests running on big endian arch (tested on s390x) where failing due to:
- a typo in CPUMASK_BYTEPN.
- a missing call to tep_set_file_bigendian when initializing the test
suite.
Suggested-by: Mate Kukri <mate.kukri@canonical.com>
Signed-off-by: Paul Mars <paul.mars@canonical.com>
---
utest/traceevent-utest.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/utest/traceevent-utest.c b/utest/traceevent-utest.c
index 041843e..b95e478 100644
--- a/utest/traceevent-utest.c
+++ b/utest/traceevent-utest.c
@@ -216,7 +216,7 @@ DECL_CPUMASK_EVENT_DATA(bytep2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x01);
#define CPUMASK_BYTEP2_FMT "cpumask=0,23"
DECL_CPUMASK_EVENT_DATA(bytepn, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01);
-#define CPUMASK_BYTEPN "ARRAY[80, 00, 00, 00, 00, 00, 80, 01]"
+#define CPUMASK_BYTEPN "ARRAY[80, 00, 00, 00, 00, 00, 00, 01]"
#define CPUMASK_BYTEPN_FMT "cpumask=0,63"
#endif
@@ -392,6 +392,9 @@ static int test_suite_init(void)
test_tep = tep_alloc();
if (!test_tep)
return 1;
+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+ tep_set_file_bigendian(test_tep, TEP_BIG_ENDIAN);
+#endif
return 0;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-02 8:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-29 14:25 [PATCH] libtraceevent: Fix tests running on big endian arch Paul Mars
2024-03-29 16:58 ` Steven Rostedt
2024-04-02 8:34 ` [PATCH] " Paul Mars
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.