tests: only cleanup the gpio-mockup module from the main process
authorBartosz Golaszewski <bartekgola@gmail.com>
Tue, 16 May 2017 09:14:45 +0000 (11:14 +0200)
committerBartosz Golaszewski <bartekgola@gmail.com>
Tue, 16 May 2017 09:14:45 +0000 (11:14 +0200)
commit2c846b8d88fc142cbe02b769444b1d30d82865a7
tree7d1b905d49cf2939027d6c92c07fd04ee992afcb
parent96a17a050132889f4dcbd2f759d9ffcb4fad96f1
tests: only cleanup the gpio-mockup module from the main process

In preparation for adding support for subprocesses: store the pid of
the main process and use it such that we don't try to unload the
mockup module twice leading to a splat from libkmod.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
tests/gpiod-test.c