Skip to content

Commit fffe8ef

Browse files
JasonXingkuba-moo
authored andcommitted
net-timestamp: add selftests for SOF_TIMESTAMPING_OPT_RX_FILTER
Test a few possible cases where we use SOF_TIMESTAMPING_OPT_RX_FILTER with software or hardware report/generation flag. Signed-off-by: Jason Xing <[email protected]> Reviewed-by: Willem de Bruijn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent be8e9eb commit fffe8ef

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tools/testing/selftests/net/rxtimestamp.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ static struct sof_flag sof_flags[] = {
5757
SOF_FLAG(SOF_TIMESTAMPING_SOFTWARE),
5858
SOF_FLAG(SOF_TIMESTAMPING_RX_SOFTWARE),
5959
SOF_FLAG(SOF_TIMESTAMPING_RX_HARDWARE),
60+
SOF_FLAG(SOF_TIMESTAMPING_OPT_RX_FILTER),
61+
SOF_FLAG(SOF_TIMESTAMPING_RAW_HARDWARE),
6062
};
6163

6264
static struct socket_type socket_types[] = {
@@ -97,6 +99,22 @@ static struct test_case test_cases[] = {
9799
| SOF_TIMESTAMPING_RX_HARDWARE },
98100
{}
99101
},
102+
{
103+
{ .so_timestamping = SOF_TIMESTAMPING_RAW_HARDWARE
104+
| SOF_TIMESTAMPING_OPT_RX_FILTER },
105+
{}
106+
},
107+
{
108+
{ .so_timestamping = SOF_TIMESTAMPING_SOFTWARE
109+
| SOF_TIMESTAMPING_OPT_RX_FILTER },
110+
{}
111+
},
112+
{
113+
{ .so_timestamping = SOF_TIMESTAMPING_SOFTWARE
114+
| SOF_TIMESTAMPING_RX_SOFTWARE
115+
| SOF_TIMESTAMPING_OPT_RX_FILTER },
116+
{ .swtstamp = true }
117+
},
100118
{
101119
{ .so_timestamping = SOF_TIMESTAMPING_SOFTWARE
102120
| SOF_TIMESTAMPING_RX_SOFTWARE },

0 commit comments

Comments
 (0)