-
Notifications
You must be signed in to change notification settings - Fork 7
/
26-transparent
executable file
·43 lines (38 loc) · 979 Bytes
/
26-transparent
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
. test.common
test_start "ptp4l with transparent clocks"
# 1 --- 2 --- 3
# | |
# 4 --- 5 --- 6
subnets="1 2 | 2 3 | 2 4 | 3 5 | 4 5 | 5 6"
nodes=6
max_sync_time=100
for tc_type in E2E P2P; do
if [ "$tc_type" == "E2E" ]; then
time_max_limit=3e-8
freq_max_limit=2e-8
delay_correction="(+ delay (* 8e-11 (+ length 42)))"
else
time_max_limit=5e-6
freq_max_limit=5e-6
delay_correction=""
fi
for free_running in 0 1; do
master_conf="delay_mechanism $tc_type"
slave_conf="delay_mechanism $tc_type"
for transparent_nodes in "2" "3 4" "2 3 4 5"; do
transparent_conf="clock_type ${tc_type}_TC
free_running $free_running
delay_mechanism $tc_type"
[[ $transparent_nodes =~ "2 3 4 5" ]] &&
transparent_conf+="
tc_spanning_tree 1"
[ $free_running -eq 0 ] &&
free_running_nodes="" ||
free_running_nodes=$transparent_nodes
run_ptp4l || test_fail
check_sync || test_fail
done
done
done
test_pass