Re: [LTP] [PATCH v2 1/3] lib: adding .arch field in tst_test structure

Li Wang
2021-11-04T10:18:52Z

[-- Attachment #1.1: Type: text/plain, Size: 1196 bytes --]

On Wed, Nov 3, 2021 at 10:09 PM Cyril Hrubis <chrubis@suse.cz> wrote:

> Hi!
> > Um, I can't recall why the V3 development for .arch
> > was suspended.
> >
> > Maybe we thought there is not much sense to replace
> > ifdef __arch__ from code at that moment.
> >
> > Now, if that can benefit the tst_test metadata more in the next
> runltp-ng.
> > Should we keep going to work out the patch V3?
> >
> > @Cyril Hrubis <chrubis@suse.cz> any suggestions?
>
> Hmm, I guess that I said that it still makes to add the metadata, at
>

Agreed.

> least array of supported architectures in the test_test structure would
> be a good addition.
>

I guess defining .arch as a string and making a valid check will be enough.
Array for that sounds a bit complicated in use.

>
> However the hard part would be keeping the actual code and metadata in
> sync, we still have to keep the ifdefs in the code.
>

Yes, some inline assemble require ifdefs.

Btw, I look back at the reviews and find Jan said:
"I can see how tst_on_arch() would be useful. Test is valid
on all arches, but needs different input/constants/code/etc."

That may be a slight reason for keeping tst_on_arch.

--
Regards,
Li Wang

[-- Attachment #1.2: Type: text/html, Size: 3053 bytes --]

[-- Attachment #2: Type: text/plain, Size: 60 bytes --]

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