[LTP] [PATCH v2] network/tc01.sh: Add a regression test for tc qdisc command
Alexey Kodanev
aleksei.kodanev@bell-sw.com
Fri Jul 9 12:05:34 CEST 2021
On 08.07.2021 11:42, Yang Xu wrote:
> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
> ---
...
> +do_test()
> +{
> + tst_res TINFO "Use tc qdisc command to trigger a null-pointer dereference"
> +
> + EXPECT_FAIL tc qdisc add dev teql0 root teql0
> +
> + dmesg | grep RIP | grep teql_destroy | grep sch_teql > /dev/null
It can be simplified to:
if dmesg | grep -q 'RIP:.*sch_teql'; then
> + if [ $? -eq 0 ]; then
> + tst_res TFAIL "This bug is reproduced."
> + else
> + tst_res TPASS "This bug is not reproduced."
> + fi
> +}
> +
> +tst_run
>
More information about the ltp
mailing list