[LTP] [PATCH 1/1] endian_switch01.c: Remove useless TST_NO_DEFAULT_MAIN
Petr Vorel
pvorel@suse.cz
Thu Mar 9 22:02:01 CET 2023
> On Thu, Mar 9, 2023 at 12:17 PM Jan Stancek <jstancek@redhat.com> wrote:
> > On Thu, Mar 9, 2023 at 11:44 AM Petr Vorel <pvorel@suse.cz> wrote:
> > > Hi Jan,
> > > out of curiosity, what is main4() used for?
> > It's from 086c14f7a465 ("The following hack fixes the
> > "endian_switch01.c:115: warning: ‘main’ takes only zero or two
> > arguments" warning. Signed-off-by: CAI Qian <caiqian@cclom.cn>.")
> > but I'm not sure it is still used these days.
+1
> > As you found my misplaced TST_NO_DEFAULT_MAIN, that seems to confirm
> > we can do without it. I'll have a look on a ppc system.
> So I agree with your patch here. And then I'd suggest we follow it
Thank you, I merged this patch.
> with one that replaces main4 with
> @@ -42,6 +42,9 @@ void check_le_switch_supported(void)
> exit(errno);
> }
> + if (!(getauxval(AT_HWCAP) & PPC_FEATURE_TRUE_LE))
> + tst_brk(TCONF, "Processor does not support little-endian mode");
> +
> What do you think?
Indeed, that's looks to me better. You can add my ack to the patch.
But please test it.
Kind regards,
Petr
More information about the ltp
mailing list