Skip to content

Commit

Permalink
selftests: uevent filtering
Browse files Browse the repository at this point in the history
Recent discussions around uevent filtering (cf. net-next commit [1], [2],
and [3] and discussions in [4], [5], and [6]) have shown that the semantics
around uevent filtering where not well understood.
Now that we have settled - at least for the moment - how uevent filtering
should look like let's add some selftests to ensure we don't regress
anything in the future.
Note, the semantics of uevent filtering are described in detail in my
commit 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/738

Signed-off-by: Christian Brauner <christian@brauner.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Christian Brauner authored and David S. Miller committed May 23, 2018
1 parent 8fcb097 commit 9d3df88
Show file tree
Hide file tree
Showing 3 changed files with 505 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tools/testing/selftests/uevent/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# SPDX-License-Identifier: GPL-2.0
all:

include ../lib.mk

.PHONY: all clean

BINARIES := uevent_filtering
CFLAGS += -Wl,-no-as-needed -Wall

uevent_filtering: uevent_filtering.c ../kselftest.h ../kselftest_harness.h
$(CC) $(CFLAGS) $< -o $@

TEST_PROGS += $(BINARIES)
EXTRA_CLEAN := $(BINARIES)

all: $(BINARIES)
2 changes: 2 additions & 0 deletions tools/testing/selftests/uevent/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CONFIG_USER_NS=y
CONFIG_NET=y
Loading

0 comments on commit 9d3df88

Please sign in to comment.