selftests: complete kselftest include centralizationThis follow-up patch completes centralization of kselftest.h andksefltest_harness.h includes in remaining seltests files, replacing allrelative
selftests: complete kselftest include centralizationThis follow-up patch completes centralization of kselftest.h andksefltest_harness.h includes in remaining seltests files, replacing allrelative paths with a non-relative paths using shared -I include path inlib.mkTested with gcc-13.3 and clang-18.1, and cross-compiled successfully onriscv, arm64, x86_64 and powerpc arch.[reddybalavignesh9979@gmail.com: add selftests include path for kselftest.h] Link: https://lkml.kernel.org/r/20251017090201.317521-1-reddybalavignesh9979@gmail.comLink: https://lkml.kernel.org/r/20251016104409.68985-1-reddybalavignesh9979@gmail.comSigned-off-by: Bala-Vignesh-Reddy <reddybalavignesh9979@gmail.com>Suggested-by: Andrew Morton <akpm@linux-foundation.org>Link: https://lore.kernel.org/lkml/20250820143954.33d95635e504e94df01930d0@linux-foundation.org/Reviewed-by: Wei Yang <richard.weiyang@gmail.com>Cc: David Hildenbrand <david@redhat.com>Cc: David S. Miller <davem@davemloft.net>Cc: Eric Dumazet <edumazet@google.com>Cc: Günther Noack <gnoack@google.com>Cc: Jakub Kacinski <kuba@kernel.org>Cc: Liam Howlett <liam.howlett@oracle.com>Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>Cc: Michal Hocko <mhocko@suse.com>Cc: Mickael Salaun <mic@digikod.net>Cc: Ming Lei <ming.lei@redhat.com>Cc: Paolo Abeni <pabeni@redhat.com>Cc: Shuah Khan <shuah@kernel.org>Cc: Simon Horman <horms@kernel.org>Cc: Suren Baghdasaryan <surenb@google.com>Cc: Vlastimil Babka <vbabka@suse.cz>Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
show more ...
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 <javier.carrasco.cruz@gmail.com>Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
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 <javier.carrasco.cruz@gmail.com>Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
selftests: Remove unneeded selftest API headersRemove unused includes of the kselftest.h header.Acked-by: Christian Brauner <christian.brauner@ubuntu.com>Signed-off-by: Kees Cook <keescook@chrom
selftests: Remove unneeded selftest API headersRemove unused includes of the kselftest.h header.Acked-by: Christian Brauner <christian.brauner@ubuntu.com>Signed-off-by: Kees Cook <keescook@chromium.org>Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
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 <christian@brauner.io>Signed-off-by: David S. Miller <davem@davemloft.net>