Packages with missing %check

Richard W.M. Jones rjones at redhat.com
Wed Feb 26 21:56:53 UTC 2014


On Wed, Feb 26, 2014 at 01:56:22PM +0000, David Howells wrote:
> Alexander Todorov <atodorov at redhat.com> wrote:
> 
> > How about making %check a packaging requirement in all cases - run tests or
> > add a comment explaining why not, how to run them (e.g. make test) or why
> > there are no tests for this package.
> 
> Does %check install the package and run the tests as root?

No, of course not.

> For the keyutils
> package that I maintain, this would be a requirement to be able to run the
> testsuite because:
> 
>  (1) There are certain operations that cannot be tested if you're not root.
> 
>  (2) The kernel must be able to upcall to executables installed by the rpm.
> 
> I imagine this applies to some other packages also.

You can throw up a VM to test this, if you really wanted to do it in
%check.  libguestfs does this.  However it's not especially easy, and
it's fairly ugly.

For the sorts of tests you are talking about it's much better to test
the final RPM installed in a full OS environment.  That is what (I
hope) Taskotron is trying to do.  Also what Colin is doing with his
ostree testing effort.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW


More information about the devel mailing list