selftests: uevent: add missing gitignoreThe 'uevent_filtering' test generates an object with the same name,but there is no .gitignore file in the directory to add the objectas stated in the selft
selftests: uevent: add missing gitignoreThe 'uevent_filtering' test generates an object with the same name,but there is no .gitignore file in the directory to add the objectas stated in the selftest documentation.Add the missing .gitignore file and include 'uevent_filtering'.Signed-off-by: Javier Carrasco <[email protected]>Signed-off-by: Shuah Khan <[email protected]>
show more ...
selftests: uevent filtering: fix return on error in uevent_listenerThe ret variable is used to check function return values and assigningvalues to it on error has no effect as it is an unused valu
selftests: uevent filtering: fix return on error in uevent_listenerThe ret variable is used to check function return values and assigningvalues to it on error has no effect as it is an unused value.The current implementation uses an additional variable (fret) to returnthe error value, which in this case is unnecessary and lead to the abovedescribed misuse. There is no restriction in the current implementationto always return -1 on error and the actual negative error value can bereturned safely without storing -1 in a specific variable.Simplify the error checking by using a single variable which alwaysholds the returned value.Signed-off-by: Javier Carrasco <[email protected]>Signed-off-by: Shuah Khan <[email protected]>
selftests: Remove unneeded selftest API headersRemove unused includes of the kselftest.h header.Acked-by: Christian Brauner <[email protected]>Signed-off-by: Kees Cook <keescook@chrom
selftests: Remove unneeded selftest API headersRemove unused includes of the kselftest.h header.Acked-by: Christian Brauner <[email protected]>Signed-off-by: Kees Cook <[email protected]>Signed-off-by: Shuah Khan <[email protected]>
selftests: uevent filteringRecent discussions around uevent filtering (cf. net-next commit [1], [2],and [3] and discussions in [4], [5], and [6]) have shown that the semanticsaround uevent filter
selftests: uevent filteringRecent discussions around uevent filtering (cf. net-next commit [1], [2],and [3] and discussions in [4], [5], and [6]) have shown that the semanticsaround uevent filtering where not well understood.Now that we have settled - at least for the moment - how uevent filteringshould look like let's add some selftests to ensure we don't regressanything in the future.Note, the semantics of uevent filtering are described in detail in mycommit message to [2] so I won't repeat them here.[1]: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=90d52d4fd82007005125d9a8d2d560a1ca059b9d[2]: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=a3498436b3a0f8ec289e6847e1de40b4123e1639[3]: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=26045a7b14bc7a5455e411d820110f66557d6589[4]: https://lkml.org/lkml/2018/4/4/739[5]: https://lkml.org/lkml/2018/4/26/767[6]: https://lkml.org/lkml/2018/4/26/738Signed-off-by: Christian Brauner <[email protected]>Signed-off-by: David S. Miller <[email protected]>