tests: Add helper to open a device/module
authorThierry Reding <treding@nvidia.com>
Wed, 9 Dec 2015 17:37:45 +0000 (18:37 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 18 Dec 2015 17:44:13 +0000 (17:44 +0000)
commite744b02375e939e853b4c83979f170bfc89e482c
treefb717d880ebecf0f61e854317f5d272e820c668c
parent89cca28dfbc0c96c13b1dfa3bc3c947876469159
tests: Add helper to open a device/module

The new function util_open() encapsulates the standard method employed
by tests to open a device or module. There is a verbatim copy of this in
almost all test programs, with slight variations in the list of modules.
Moving this code into a common helper allows code reuse and makes tests
more consistent.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
tests/util/kms.c
tests/util/kms.h