[LTP] [PATCH v2 0/4] sched_{g,s}etattr01: Add missing policies

Cyril Hrubis chrubis@suse.cz
Tue Jan 25 16:05:04 CET 2022


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.

> 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.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list