From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: Richard Palethorpe <rpalethorpe@suse.com>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/2] hugemmap15.c: Use TST_TEST_TCONF() for unsupported archs
Date: Thu, 26 Jan 2023 11:35:07 +0100 [thread overview]
Message-ID: <Y9JXW4c9FkZEKqXx@yuki> (raw)
In-Reply-To: <20230125222703.19943-3-pvorel@suse.cz>
Hi!
> 15625f6185 broke LTP build at least on riscv32 and mipsel32
> (and for any new arch in the future). Replace #error directive with
> TST_TEST_TCONF() fixes that.
>
> Fixes: 15625f6185 ("Hugetlb: Migrating libhugetlbfs icache-hygiene")
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c
> index 4730d8d184..836225acd8 100644
> --- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c
> +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c
> @@ -19,6 +19,13 @@
> */
>
> #define _GNU_SOURCE
> +
> +#include "hugetlb.h"
> +#if defined(__powerpc__) || defined(__powerpc64__) || defined(__ia64__) || \
> + defined(__s390__) || defined(__s390x__) || defined(__sparc__) || \
> + defined(__aarch64__) || (defined(__riscv) && __riscv_xlen == 64) || \
> + defined(__i386__) || defined(__x86_64__) || defined(__arm__)
> +
> #include <stdio.h>
> #include <stdlib.h>
> #include <setjmp.h>
> @@ -30,8 +37,6 @@
> #include <sys/param.h>
> #include <sys/types.h>
>
> -#include "hugetlb.h"
> -
> #define SUCC_JMP 1
> #define FAIL_JMP 2
> #define COPY_SIZE 128
> @@ -142,8 +147,6 @@ static void sig_handler(int signum, siginfo_t *si, void *uc)
> siglongjmp(sig_escape, FAIL_JMP + SIGSEGV);
> }
> #endif
> -#else
> -#error "Need to setup signal conditions for this arch"
> #endif
> }
>
> @@ -241,3 +244,6 @@ static struct tst_test test = {
> .test_all = run_test,
> .hugepages = {3, TST_NEEDS},
> };
> +#else
> + TST_TEST_TCONF("Architecture not supported");
^
Maybe I would change this to be closer to the
original, so that it's clear that a piece of
code needs to be written for the test to be
enabled and that this is not inherently not
supported
Something as:
TST_TEST_TCONF("Signal handler for this architecture hasn't been written");
Other than this it looks fine, with a better message:
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2023-01-26 10:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-25 22:27 [LTP] [PATCH 0/2] hugemmap15 pre-release testing Petr Vorel
2023-01-25 22:27 ` [LTP] [PATCH 1/2] hugemmap15: Compile with -O Petr Vorel
2023-01-26 21:05 ` Tarun Sahu
2023-01-26 23:00 ` Petr Vorel
2023-01-26 23:38 ` Tarun Sahu
2023-01-27 8:28 ` Petr Vorel
2023-01-27 9:20 ` Cyril Hrubis
2023-02-10 22:04 ` Tarun Sahu
2023-02-10 22:33 ` [LTP] [PATCH] hugepage15: Resolve compile time warning generating with -O0 Tarun Sahu
2023-02-12 21:34 ` Petr Vorel
2023-02-13 15:29 ` Tarun Sahu
2023-02-13 15:26 ` [LTP] [PATCH v2] " Tarun Sahu
2023-02-13 17:26 ` Petr Vorel
2023-01-25 22:27 ` [LTP] [PATCH 2/2] hugemmap15.c: Use TST_TEST_TCONF() for unsupported archs Petr Vorel
2023-01-26 10:35 ` Cyril Hrubis [this message]
2023-01-26 10:36 ` Petr Vorel
2023-01-26 17:55 ` 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=Y9JXW4c9FkZEKqXx@yuki \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=pvorel@suse.cz \
--cc=rpalethorpe@suse.com \
/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