@@ -14,7 +14,7 @@ fail() { #msg
}
yield() {
- ping localhost -c 1 || sleep .001 || usleep 1 || sleep 1
+ ping 127.0.0.1 -c 1 || sleep .001 || usleep 1 || sleep 1
}
if [ ! -f set_event -o ! -d events/sched ]; then
@@ -17,7 +17,7 @@ fail() { #msg
}
yield() {
- ping localhost -c 1 || sleep .001 || usleep 1 || sleep 1
+ ping 127.0.0.1 -c 1 || sleep .001 || usleep 1 || sleep 1
}
if [ ! -f set_event -o ! -d events/sched ]; then
@@ -14,7 +14,7 @@ fail() { #msg
}
yield() {
- ping localhost -c 1 || sleep .001 || usleep 1 || sleep 1
+ ping 127.0.0.1 -c 1 || sleep .001 || usleep 1 || sleep 1
}
if [ ! -f set_event -o ! -d events/sched ]; then
@@ -13,7 +13,7 @@ fail() { #msg
}
yield() {
- ping localhost -c 1 || sleep .001 || usleep 1 || sleep 1
+ ping 127.0.0.1 -c 1 || sleep .001 || usleep 1 || sleep 1
}
if [ ! -f available_events -o ! -f set_event -o ! -d events ]; then
@@ -49,7 +49,7 @@ fail() { # msg
}
yield() {
- ping localhost -c 1 || sleep .001 || usleep 1 || sleep 1
+ ping 127.0.0.1 -c 1 || sleep .001 || usleep 1 || sleep 1
}
do_test() {
@@ -23,7 +23,7 @@ echo 'hist:keys=comm:ts0=common_timestamp.usecs if comm=="ping"' > events/sched/
echo 'hist:keys=next_comm:wakeup_lat=common_timestamp.usecs-$ts0:onmatch(sched.sched_waking).wakeup_latency($wakeup_lat,next_pid,sched.sched_waking.prio,next_comm) if next_comm=="ping"' > events/sched/sched_switch/trigger
echo 'hist:keys=pid,prio,comm:vals=lat:sort=pid,prio' > events/synthetic/wakeup_latency/trigger
-ping localhost -c 3
+ping 127.0.0.1 -c 3
if ! grep -q "ping" events/synthetic/wakeup_latency/hist; then
fail "Failed to create inter-event histogram"
fi
@@ -37,7 +37,7 @@ echo 'waking+wakeup_latency u64 lat; pid_t pid' >> synthetic_events
echo 'hist:keys=pid,lat:sort=pid,lat:ww_lat=$waking_lat+$wakeup_lat:onmatch(synthetic.wakeup_latency).waking+wakeup_latency($ww_lat,pid)' >> events/synthetic/wakeup_latency/trigger
echo 'hist:keys=pid,lat:sort=pid,lat' >> events/synthetic/waking+wakeup_latency/trigger
-ping localhost -c 3
+ping 127.0.0.1 -c 3
if ! grep -q "pid:" events/synthetic/waking+wakeup_latency/hist; then
fail "Failed to create combined histogram"
fi
@@ -29,7 +29,7 @@ echo "Test histogram variables,simple expression support and onmatch action"
echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="ping"' > events/sched/sched_wakeup/trigger
echo 'hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0:onmatch(sched.sched_wakeup).wakeup_latency($wakeup_lat,next_pid,next_comm) if next_comm=="ping"' > events/sched/sched_switch/trigger
echo 'hist:keys=comm,pid,lat:wakeup_lat=lat:sort=lat' > events/synthetic/wakeup_latency/trigger
-ping localhost -c 5
+ping 127.0.0.1 -c 5
if ! grep -q "ping" events/synthetic/wakeup_latency/hist; then
fail "Failed to create onmatch action inter-event histogram"
fi
@@ -29,7 +29,7 @@ echo "Test histogram variables,simple expression support and onmatch-onmax actio
echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="ping"' > events/sched/sched_wakeup/trigger
echo 'hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0:onmatch(sched.sched_wakeup).wakeup_latency($wakeup_lat,next_pid,next_comm):onmax($wakeup_lat).save(next_comm,prev_pid,prev_prio,prev_comm) if next_comm=="ping"' >> events/sched/sched_switch/trigger
echo 'hist:keys=comm,pid,lat:wakeup_lat=lat:sort=lat' > events/synthetic/wakeup_latency/trigger
-ping localhost -c 5
+ping 127.0.0.1 -c 5
if [ ! grep -q "ping" events/synthetic/wakeup_latency/hist -o ! grep -q "max:" events/sched/sched_switch/hist]; then
fail "Failed to create onmatch-onmax action inter-event histogram"
fi
@@ -27,7 +27,7 @@ echo "Test onmax action"
echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="ping"' >> events/sched/sched_waking/trigger
echo 'hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0:onmax($wakeup_lat).save(next_comm,prev_pid,prev_prio,prev_comm) if next_comm=="ping"' >> events/sched/sched_switch/trigger
-ping localhost -c 3
+ping 127.0.0.1 -c 3
if ! grep -q "max:" events/sched/sched_switch/hist; then
fail "Failed to create onmax action inter-event histogram"
fi
Use raw loopback address instead of localhost, because "localhost" can depend on nsswitch and in some case we can not resolve the localhost. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> --- .../selftests/ftrace/test.d/event/event-enable.tc | 2 +- .../selftests/ftrace/test.d/event/event-pid.tc | 2 +- .../ftrace/test.d/event/subsystem-enable.tc | 2 +- .../ftrace/test.d/event/toplevel-enable.tc | 2 +- .../ftrace/test.d/ftrace/func-filter-pid.tc | 2 +- .../inter-event/trigger-field-variable-support.tc | 2 +- .../trigger-inter-event-combined-hist.tc | 2 +- .../inter-event/trigger-onmatch-action-hist.tc | 2 +- .../trigger-onmatch-onmax-action-hist.tc | 2 +- .../inter-event/trigger-onmax-action-hist.tc | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html