All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] lib: do_setup(): Check for supported arch first
Date: Tue, 29 Apr 2025 23:22:53 +0200	[thread overview]
Message-ID: <20250429212253.GA273859@pevik> (raw)
In-Reply-To: <20250429135542.19680-1-chrubis@suse.cz>

Hi Cyril,

> This commit moves the check for supported architecture before the check
> for test function existence. This allows us do ifdef out the run
> function pointer initialization and properly TCONF on unsupported
> platform.

LGTM. Ideally could you also convert some test (as example which others
can follow - like they do for docparse fixes).

Reviewed-by: Petr Vorel <pvorel@suse.cz>

> Example usage:

>  #include "tst_test.h"

>  #ifdef __x86_64__
I would personally did not bother with #ifdef, but it's true it makes resulted
binary smaller (for non-intel arch).

Kind regards,
Petr

>  static void run(void)
>  {
> 	...
>  }
>  #endif

>  struct tst_test test = {
>  #ifdef __x86_64__

> 	.run = run,
>  #endif
> 	.supported_archs = {"x86_64", NULL},
>  }

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

  parent reply	other threads:[~2025-04-29 21:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-29 13:55 [LTP] [PATCH] lib: do_setup(): Check for supported arch first Cyril Hrubis
2025-04-29 14:55 ` Andrea Cervesato via ltp
2025-04-29 15:06   ` Cyril Hrubis
2025-04-29 15:17     ` Andrea Cervesato via ltp
2025-04-29 15:20       ` Cyril Hrubis
2025-04-29 15:29         ` Andrea Cervesato via ltp
2025-04-29 21:22 ` Petr Vorel [this message]
2025-04-30  7:14   ` Cyril Hrubis

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=20250429212253.GA273859@pevik \
    --to=pvorel@suse.cz \
    --cc=chrubis@suse.cz \
    --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.