diff mbox series

[RFC,for-faizal,3/4] selftests: net: tsn: allow isochron_do() to skip sync monitoring on sender too

Message ID 20231221132521.2314811-4-vladimir.oltean@nxp.com (mailing list archive)
State RFC
Delegated to: Netdev Maintainers
Headers show
Series tc-taprio selftests | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Guessed tree name to be 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: 8 this patch: 8
netdev/cc_maintainers warning 5 maintainers not CCed: shuah@kernel.org edumazet@google.com pabeni@redhat.com kuba@kernel.org linux-kselftest@vger.kernel.org
netdev/build_clang fail Errors and warnings before: 12 this patch: 12
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest fail Script tsn_lib.sh not found in tools/testing/selftests/net/forwarding/Makefile
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch warning WARNING: line length of 91 exceeds 80 columns
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

Commit Message

Vladimir Oltean Dec. 21, 2023, 1:25 p.m. UTC
For testing the tc-taprio software scheduling path, we don't need PTP
synchronization at all, but isochron_do() was written assuming that we
do.

Allow skipping the UNIX domain socket for the ptp4l instance on the
sender, and pass --omit-sync to isochron instead, so that it sends right
away and does not monitor the PTP quality.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 tools/testing/selftests/net/forwarding/tsn_lib.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tools/testing/selftests/net/forwarding/tsn_lib.sh b/tools/testing/selftests/net/forwarding/tsn_lib.sh
index f081cebb1c65..189bf27bad76 100644
--- a/tools/testing/selftests/net/forwarding/tsn_lib.sh
+++ b/tools/testing/selftests/net/forwarding/tsn_lib.sh
@@ -204,6 +204,12 @@  isochron_do()
 		vid="--vid=${vid}"
 	fi
 
+	if [ -z "${sender_uds}" ]; then
+		sender_extra_args="${sender_extra_args} --omit-sync"
+	else
+		sender_extra_args="${sender_extra_args} --unix-domain-socket ${sender_uds}"
+	fi
+
 	if [ -z "${receiver_uds}" ]; then
 		sender_extra_args="${sender_extra_args} --omit-remote-sync"
 	fi
@@ -226,7 +232,6 @@  isochron_do()
 
 	isochron send \
 		--interface ${sender_if_name} \
-		--unix-domain-socket ${sender_uds} \
 		--priority ${priority} \
 		--base-time ${base_time} \
 		--cycle-time ${cycle_time} \