]> git.ipfire.org Git - thirdparty/kmod.git/commit
testsuite: factor out fd related parameters to a structure
authorYauheni Kaliuta <yauheni.kaliuta@redhat.com>
Fri, 4 Jan 2019 21:41:34 +0000 (23:41 +0200)
committerLucas De Marchi <lucas.demarchi@intel.com>
Fri, 4 Jan 2019 22:39:39 +0000 (14:39 -0800)
commitea37a74246b8640bc5acdd5709aabbe396f08210
treebebb39763795d74bb958c535e8b35ea00bb0f632
parentb7cd0fdab0c172c155af9fc6d0e6e95e28b89364
testsuite: factor out fd related parameters to a structure

This is a more abstract implementation of "file descriptor
comparation". With the current implementation the code is full of
conditions based on the descriptor type. It makes sense to
initialize the parameters once based on the descriptor type.

stdout and stderr are handled in almost the same way, but for
monitor descriptor branch, based on the type check is necessary in
some cases.

Since epoll's context now contains pointers to the structures, so no
direct manipulations there.

Most of the patch is just replacing direct buffer manipulations with
the structures' ones.

Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
testsuite/testsuite.c