[LTP] [PATCH v2 0/4] sched_{g,s}etattr01: Add missing policies
Petr Vorel
pvorel@suse.cz
Tue Jan 25 16:55:13 CET 2022
Hi Cyril,
> Hi!
> > sched_getattr and sched_setattr are 99% identical (2 values are
> > different). I was thinking to use the same approach from e197796f22
> > ("sethostname: Convert to new API"), but not sure if it's a good
> > approach.
> Actually I do not think that the approach in sethostname is good. There
> should be a C file for each test. If they share code that should be put
> into headers or libraries.
> We used to have more tests like that that build binaries in different
> directories from a single source with different macros and I find it
> utterly confusing.
Thanks for info. Agree, it's confusing.
I guess in tests which are very simple like sethostname or even these
sched_getattr we'll just endup with duplicity, right?
Because putting one function into header which is shared with tests in different
directory is just confusing and not worth of doing.
So I can recreate sethostname01.c.
And for these tests I can make a note just to remember update struct for the
other test.
> > Do we want to reduce files needed to be updated after new policy is
> > added? If yes, shouldn't there be just a single directory?
> > (what name should be using to show 2 syscalls are in sources in this
> > directory?)
> I would vote against this.
Understand now.
Kind regards,
Petr
More information about the ltp
mailing list