mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 18:05:07 -05:00
test: add option to dump traffic to pcaps
This will be useful for debugging.
This commit is contained in:
@@ -78,6 +78,7 @@ default_client_min_mean_out_interval=0.0
|
|||||||
default_client_max_min_out_interval=inf
|
default_client_max_min_out_interval=inf
|
||||||
|
|
||||||
default_cmdmon_unix=1
|
default_cmdmon_unix=1
|
||||||
|
default_pcap_dumps=0
|
||||||
default_dns=0
|
default_dns=0
|
||||||
|
|
||||||
# Initialize test settings from their defaults
|
# Initialize test settings from their defaults
|
||||||
@@ -469,6 +470,9 @@ run_test() {
|
|||||||
|
|
||||||
for i in $(seq 1 $n); do
|
for i in $(seq 1 $n); do
|
||||||
test_message 2 0 "starting node $node:"
|
test_message 2 0 "starting node $node:"
|
||||||
|
|
||||||
|
[ $pcap_dumps -ne 0 ] && export CLKNETSIM_PCAP_DUMP=tmp/pcap.$node
|
||||||
|
|
||||||
if [ $stratum -eq 1 ]; then
|
if [ $stratum -eq 1 ]; then
|
||||||
step=$server_step
|
step=$server_step
|
||||||
start=$server_start
|
start=$server_start
|
||||||
@@ -509,6 +513,8 @@ run_test() {
|
|||||||
for i in $(seq 1 $[$nodes - $node + 1]); do
|
for i in $(seq 1 $[$nodes - $node + 1]); do
|
||||||
test_message 2 0 "starting node $node:"
|
test_message 2 0 "starting node $node:"
|
||||||
|
|
||||||
|
[ $pcap_dumps -ne 0 ] && export CLKNETSIM_PCAP_DUMP=tmp/pcap.$node
|
||||||
|
|
||||||
options=$([ $dns -eq 0 ] && printf "%s" "-n")
|
options=$([ $dns -eq 0 ] && printf "%s" "-n")
|
||||||
if [ $cmdmon_unix -ne 0 ]; then
|
if [ $cmdmon_unix -ne 0 ]; then
|
||||||
options+=" -h /clknetsim/unix/$[$node - $clients]:1"
|
options+=" -h /clknetsim/unix/$[$node - $clients]:1"
|
||||||
|
|||||||
Reference in New Issue
Block a user