[LTP] [PATCH] tcindex01: Simplify test
Cyril Hrubis
chrubis@suse.cz
Wed Sep 13 16:30:28 CEST 2023
Hi!
> + NETDEV_ADD_QDISC(DEVNAME, AF_UNSPEC, TC_H_ROOT, qd_handle, "htb",
> + qd_config);
> + NETDEV_ADD_TRAFFIC_CLASS(DEVNAME, qd_handle, clsid, "htb", cls_config);
> + NETDEV_ADD_TRAFFIC_FILTER(DEVNAME, qd_handle, 10, ETH_P_IP, 1,
> + "tcindex", f_config);
> + NETDEV_REMOVE_TRAFFIC_FILTER(DEVNAME, qd_handle, 10, ETH_P_IP,
> + 1, "tcindex");
> + tst_res(TINFO, "Trying to add removed tcindex filter again...");
> + NETDEV_ADD_TRAFFIC_FILTER(DEVNAME, qd_handle, 10, ETH_P_IP, 1,
> + "tcindex", f_config);
I suppose that this will now produce TBROK in case of vunerable kernel?
I wonder if we can turn that somehow into TFAIL instead so that it's
clear that the kernel is vunerable and that this isn't broken test.
Maybe we can pass down a flag to modify_qdisc() that would use
tst_res_(TFAIL, ...) in a case that the send_validate() has failed, pass
it down as disabled in all the current macros and create
NETDEV_TEST_ADD_TRAFIC_FITLER() that would pass the flag enabled.
> + NETDEV_REMOVE_QDISC(DEVNAME, AF_UNSPEC, TC_H_ROOT, qd_handle, "htb");
> + tst_res(TPASS, "Removing tcindex filter works correctly");
> }
>
> static void cleanup(void)
> --
> 2.41.0
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list