testsuite: Wrap syscall() to get calls to finit_module()
authorLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 9 Apr 2013 08:21:42 +0000 (05:21 -0300)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 9 Apr 2013 08:45:44 +0000 (05:45 -0300)
commit0ae58609dc0b983aa17ea7aa38c071cf1830819a
treefda6077a3c5abbecede073477ceb79722e1cccbe
parent55112d19f7067dff89b1481d5bd8cc49139c4ecb
testsuite: Wrap syscall() to get calls to finit_module()

When we don't have finit_module() in libc (most likely because as of
today glibc didn't add it yet), we end up using
syscall(__NR_finit_module, ...). In this case we would not wrap the
function in the testsuite and thus having some tests failing:

TESTSUITE: ERR: could not insert module: Operation not permitted

This implementation relies on the fact that this is the only caller of
syscall(2), because we can't call libc's syscall(). There's an abort()
in place to be future safe: as soon as we need more calls to syscall(),
we can detect (and decide what to do).

Now we have all tests passing in the testsuite again.
testsuite/init_module.c