Mon, Oct 12, 2020 at 02:48:34PM CEST, jtluka(a)redhat.com wrote:
Just a question, this patch does not include the docs on
PacketAssertTestAndEvaluate module.
Do you plan to send this in a separate patch?
Please disregard this comment, this is documented in the previous patch
of the patch set. I got confused by same class name.
-Jan
Otherwise,
Acked-by: Jan Tluka <jtluka(a)redhat.com>
-Jan
Wed, Oct 07, 2020 at 03:48:09PM CEST, jurbanov(a)redhat.com wrote:
>From: Jozef Urbanovsky <jurbanov(a)redhat.com>
>
>Signed-off-by: Jozef Urbanovsky <jurbanov(a)redhat.com>
>---
> lnst/Tests/PacketAssert.py | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
>diff --git a/lnst/Tests/PacketAssert.py b/lnst/Tests/PacketAssert.py
>index 25a92ba..ca1284e 100644
>--- a/lnst/Tests/PacketAssert.py
>+++ b/lnst/Tests/PacketAssert.py
>@@ -8,6 +8,29 @@ from lnst.Tests.BaseTestModule import BaseTestModule
> from lnst.Common.LnstError import LnstError
>
> class PacketAssert(BaseTestModule):
>+ """
>+ This test module utilizes tcpdump to capture packets on a network interface
>+ based on filters defined by the test module parameters. It returns the number
>+ of captured packets that match the filter criteria.
>+
>+ This test module is usually used in conjunction with :any:`Ping` test module,
>+ for example:
>+
>+ pa_job = host1.run(PacketAssert())
>+
>+ host1.run(Ping())
>+
>+ pa_job.kill()
>+
>+ if pa_job.res_data['p_recv'] < 10:
>+ print("failed")
>+
>+ :param interface: interface to be used by the tcpdump
>+ :param p_filter: tcpdump's pcap filter expression to be matched
>+ :param grep_for: regex to be matched in the string representation of a
>+ packet in the tcpdump output
>+ :param promiscuous: toggle of promiscuous mode
>+ """
> interface = DeviceParam(mandatory=True)
> p_filter = StrParam(default='')
> grep_for = ListParam(default=[])
>--
>2.25.4
>_______________________________________________
>LNST-developers mailing list -- lnst-developers(a)lists.fedorahosted.org
>To unsubscribe send an email to lnst-developers-leave(a)lists.fedorahosted.org
>Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
>List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
>List Archives:
https://lists.fedorahosted.org/archives/list/lnst-developers@lists.fedora...