when CONFIG_TEST_SYSCTL=y, there is no "/sys/module/test_sysctl/"
when CONFIG_TEST_SYSCTL=m, checking /sys/module/test_sysctl/ is
before kernel module loading
you'll get below error message
root@intel-x86-64:/tmp/sysctl# ./sysctl.sh
Checking production write strict setting ... ok
./sysctl.sh: /sys/module/test_sysctl/ not present
You must have the following enabled in your kernel:
This patch will fix this issue.
when CONFIG_TEST_SYSCTL=y, it has no chance to check "/sys/module/test_sysctl/"
when CONFIG_TEST_SYSCTL=m, it will load kernel module first before checking sys
interface.
Signed-off-by: Lei Yang <Lei.Yang(a)windriver.com>
---
tools/testing/selftests/sysctl/sysctl.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/sysctl/sysctl.sh b/tools/testing/selftests/sysctl/sysctl.sh
index 584eb8e..08dc995 100755
--- a/tools/testing/selftests/sysctl/sysctl.sh
+++ b/tools/testing/selftests/sysctl/sysctl.sh
@@ -120,6 +120,7 @@ test_reqs()
function load_req_mod()
{
+ trap "test_modprobe" EXIT
if [ ! -d $DIR ]; then
if ! modprobe -q -n $TEST_DRIVER; then
echo "$0: module $TEST_DRIVER not found [SKIP]"
@@ -770,7 +771,6 @@ function parse_args()
test_reqs
allow_user_defaults
check_production_sysctl_writes_strict
-test_modprobe
load_req_mod
trap "test_finish" EXIT
--
1.9.1
The listed bpf test case failed due to,
libbpf: object file doesn't contain bpf program
We are cross compiling, installing selftests on device under test
and running tests by using run_kselftest.sh script file.
selftests: bpf: test_maps
libbpf: object file doesn't contain bpf program
Failed to load SK_SKB parse prog
not ok 1..3 selftests: bpf: test_maps [FAIL]
selftests: bpf: test_progs
libbpf: object file doesn't contain bpf program
libbpf: object file doesn't contain bpf program
libbpf: object file doesn't contain bpf program
libbpf: object file doesn't contain bpf program
libbpf: ./test_tcp_estats.o doesn't provide kernel version
libbpf: object file doesn't contain bpf program
selftests: bpf: test_tcpbpf_user
libbpf: object file doesn't contain bpf program
FAILED: load_bpf_file failed for: test_tcpbpf_kern.o
not ok 1..10 selftests: bpf: test_tcpbpf_user [FAIL]
selftests: bpf: test_tcpnotify_user
libbpf: object file doesn't contain bpf program
FAILED: load_bpf_file failed for: test_tcpnotify_kern.o
not ok 1..21 selftests: bpf: test_tcpnotify_user [FAIL]
selftests: bpf: test_flow_dissector.sh
bpffs not mounted. Mounting...
libbpf: object file doesn't contain bpf program
./flow_dissector_load: bpf_prog_load bpf_flow.o
selftests: test_flow_dissector [FAILED]
Do you see problem when running on target devices ?
Best regards
Naresh Kamboju
More details of the seal can be found in the LKML patch:
https://lore.kernel.org/lkml/20181120052137.74317-1-joel@joelfernandes.org/…
Signed-off-by: Joel Fernandes (Google) <joel(a)joelfernandes.org>
---
man2/fcntl.2 | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/man2/fcntl.2 b/man2/fcntl.2
index 03533d65b49d..54772f94964c 100644
--- a/man2/fcntl.2
+++ b/man2/fcntl.2
@@ -1525,6 +1525,21 @@ Furthermore, if there are any asynchronous I/O operations
.RB ( io_submit (2))
pending on the file,
all outstanding writes will be discarded.
+.TP
+.BR F_SEAL_FUTURE_WRITE
+If this seal is set, the contents of the file can be modified only from
+existing writeable mappings that were created prior to the seal being set.
+Any attempt to create a new writeable mapping on the memfd via
+.BR mmap (2)
+will fail with
+.BR EPERM.
+Also any attempts to write to the memfd via
+.BR write (2)
+will fail with
+.BR EPERM.
+This is useful in situations where existing writable mapped regions need to be
+kept intact while preventing any future writes. For example, to share a
+read-only memory buffer to other processes that only the sender can write to.
.\"
.SS File read/write hints
Write lifetime hints can be used to inform the kernel about the relative
--
2.19.1.1215.g8438c0b245-goog
Petr says:
This patchset adds several tests for VXLAN attached to an 802.1d bridge
and fixes a related bug.
First patch #1 fixes a bug in propagating SKB already-forwarded marks
over veth to bridges, where they are irrelevant. This bug causes the
vxlan_bridge_1d test suite from this patchset to fail as the packets
aren't forwarded by br2.
In patches #2 and #3, lib.sh is extended to support network namespaces.
The use of namespaces is necessitated by VXLAN, which allows only one
VXLAN device with a given VNI per namespace. Thus to host full topology
on a single box for selftests, the "remote" endpoints need to be in
namespaces.
In patches #4-#6, lib.sh is extended in other ways to facilitate the
following patches.
In patches #7-#15, first the skeleton, and later the generic tests
themselves are added.
Patch #16 then adds another test that serves as a wrapper around the
previous one, and runs it with a non-default port number.
Patches #17 and #18 add mlxsw-specific tests. About those, Ido writes:
The first test creates various configurations with regards to the VxLAN
and bridge devices and makes sure the driver correctly forbids
unsupported configuration and permits supported ones. It also verifies
that the driver correctly sets the offload indication on FDB entries and
the local route used for VxLAN decapsulation.
The second test verifies that the driver correctly configures the singly
linked list used to flood BUM traffic and that traffic is flooded as
expected.
Ido Schimmel (2):
selftests: mlxsw: Add a test for VxLAN configuration
selftests: mlxsw: Add a test for VxLAN flooding
Petr Machata (16):
net: skb_scrub_packet(): Scrub offload_fwd_mark
selftests: forwarding: lib: Support NUM_NETIFS of 0
selftests: forwarding: lib: Add in_ns()
selftests: forwarding: ping{6,}_test(): Add description argument
selftests: forwarding: ping{6,}_do(): Allow passing ping arguments
selftests: forwarding: lib: Add link_stats_rx_errors_get()
selftests: forwarding: Add a skeleton of vxlan_bridge_1d
selftests: forwarding: vxlan_bridge_1d: Add ping test
selftests: forwarding: vxlan_bridge_1d: Add flood test
selftests: forwarding: vxlan_bridge_1d: Add unicast test
selftests: forwarding: vxlan_bridge_1d: Reconfigure & rerun tests
selftests: forwarding: vxlan_bridge_1d: Add a TTL test
selftests: forwarding: vxlan_bridge_1d: Add a TOS test
selftests: forwarding: vxlan_bridge_1d: Add an ECN encap test
selftests: forwarding: vxlan_bridge_1d: Add an ECN decap test
selftests: forwarding: vxlan_bridge_1d_port_8472: New test
net/core/skbuff.c | 5 +
.../selftests/drivers/net/mlxsw/vxlan.sh | 664 +++++++++++++++++
.../drivers/net/mlxsw/vxlan_flooding.sh | 309 ++++++++
tools/testing/selftests/net/forwarding/lib.sh | 42 +-
.../net/forwarding/vxlan_bridge_1d.sh | 678 ++++++++++++++++++
.../forwarding/vxlan_bridge_1d_port_8472.sh | 10 +
6 files changed, 1700 insertions(+), 8 deletions(-)
create mode 100755 tools/testing/selftests/drivers/net/mlxsw/vxlan.sh
create mode 100755 tools/testing/selftests/drivers/net/mlxsw/vxlan_flooding.sh
create mode 100755 tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh
create mode 100755 tools/testing/selftests/net/forwarding/vxlan_bridge_1d_port_8472.sh
--
2.19.1