• S
    samples, bpf: Add automated test for cgroup filter attachments · 9b474ece
    Sargun Dhillon 提交于
    This patch adds the sample program test_cgrp2_attach2. This program is
    similar to test_cgrp2_attach, but it performs automated testing of the
    cgroupv2 BPF attached filters. It runs the following checks:
    * Simple filter attachment
    * Application of filters to child cgroups
    * Overriding filters on child cgroups
    	* Checking that this still works when the parent filter is removed
    
    The filters that are used here are simply allow all / deny all filters, so
    it isn't checking the actual functionality of the filters, but rather
    the behaviour  around detachment / attachment. If net_cls is enabled,
    this test will fail.
    Signed-off-by: NSargun Dhillon <sargun@sargun.me>
    Acked-by: NAlexei Starovoitov <ast@kernel.org>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    9b474ece
Makefile 6.1 KB