diff mbox series

[net-next,v4,4/4] rxtimestamp.c: add the test for SOF_TIMESTAMPING_OPT_RX_FILTER

Message ID 20240905071738.3725-5-kerneljasonxing@gmail.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series net-timestamp: introduce a flag to filter out rx software and hardware report | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 7 this patch: 7
netdev/build_tools success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 7 this patch: 7
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 7 this patch: 7
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 23 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-09-05--12-00 (tests: 718)

Commit Message

Jason Xing Sept. 5, 2024, 7:17 a.m. UTC
From: Jason Xing <kernelxing@tencent.com>

Test when we use SOF_TIMESTAMPING_OPT_RX_FILTER with software
or hardware report flag. The expected result is no rx timestamp
report.

Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Jason Xing <kernelxing@tencent.com>
---
 tools/testing/selftests/net/rxtimestamp.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Jason Xing Sept. 5, 2024, 10:31 a.m. UTC | #1
On Thu, Sep 5, 2024 at 3:18 PM Jason Xing <kerneljasonxing@gmail.com> wrote:
>
> From: Jason Xing <kernelxing@tencent.com>
>
> Test when we use SOF_TIMESTAMPING_OPT_RX_FILTER with software
> or hardware report flag. The expected result is no rx timestamp
> report.
>
> Reviewed-by: Willem de Bruijn <willemb@google.com>
> Signed-off-by: Jason Xing <kernelxing@tencent.com>
> ---
>  tools/testing/selftests/net/rxtimestamp.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/tools/testing/selftests/net/rxtimestamp.c b/tools/testing/selftests/net/rxtimestamp.c
> index 9eb42570294d..9760abdb6e05 100644
> --- a/tools/testing/selftests/net/rxtimestamp.c
> +++ b/tools/testing/selftests/net/rxtimestamp.c
> @@ -57,6 +57,7 @@ static struct sof_flag sof_flags[] = {
>         SOF_FLAG(SOF_TIMESTAMPING_SOFTWARE),
>         SOF_FLAG(SOF_TIMESTAMPING_RX_SOFTWARE),
>         SOF_FLAG(SOF_TIMESTAMPING_RX_HARDWARE),
> +       SOF_FLAG(SOF_TIMESTAMPING_OPT_RX_FILTER),

Ah.. I missed adding SOF_TIMESTAMPING_RAW_HARDWARE :S

I'll repost it in 24 hour.

>  };
>
>  static struct socket_type socket_types[] = {
> @@ -97,6 +98,16 @@ static struct test_case test_cases[] = {
>                         | SOF_TIMESTAMPING_RX_HARDWARE },
>                 {}
>         },
> +       {
> +               { .so_timestamping = SOF_TIMESTAMPING_RAW_HARDWARE
> +                       | SOF_TIMESTAMPING_OPT_RX_FILTER },
> +               {}
> +       },
> +       {
> +               { .so_timestamping = SOF_TIMESTAMPING_SOFTWARE
> +                       | SOF_TIMESTAMPING_OPT_RX_FILTER },
> +               {}
> +       },
>         {
>                 { .so_timestamping = SOF_TIMESTAMPING_SOFTWARE
>                         | SOF_TIMESTAMPING_RX_SOFTWARE },
> --
> 2.37.3
>
diff mbox series

Patch

diff --git a/tools/testing/selftests/net/rxtimestamp.c b/tools/testing/selftests/net/rxtimestamp.c
index 9eb42570294d..9760abdb6e05 100644
--- a/tools/testing/selftests/net/rxtimestamp.c
+++ b/tools/testing/selftests/net/rxtimestamp.c
@@ -57,6 +57,7 @@  static struct sof_flag sof_flags[] = {
 	SOF_FLAG(SOF_TIMESTAMPING_SOFTWARE),
 	SOF_FLAG(SOF_TIMESTAMPING_RX_SOFTWARE),
 	SOF_FLAG(SOF_TIMESTAMPING_RX_HARDWARE),
+	SOF_FLAG(SOF_TIMESTAMPING_OPT_RX_FILTER),
 };
 
 static struct socket_type socket_types[] = {
@@ -97,6 +98,16 @@  static struct test_case test_cases[] = {
 			| SOF_TIMESTAMPING_RX_HARDWARE },
 		{}
 	},
+	{
+		{ .so_timestamping = SOF_TIMESTAMPING_RAW_HARDWARE
+			| SOF_TIMESTAMPING_OPT_RX_FILTER },
+		{}
+	},
+	{
+		{ .so_timestamping = SOF_TIMESTAMPING_SOFTWARE
+			| SOF_TIMESTAMPING_OPT_RX_FILTER },
+		{}
+	},
 	{
 		{ .so_timestamping = SOF_TIMESTAMPING_SOFTWARE
 			| SOF_TIMESTAMPING_RX_SOFTWARE },