Looks good.

--Justin


On Sep 14, 2012, at 1:25 PM, Ben Pfaff <b...@nicira.com> wrote:

> The order of records in a NetFlow message is essentially random, but the
> test case was picky about it.  I started getting failures when I modified
> apparently unrelated code, so here's a fix.
> 
> Signed-off-by: Ben Pfaff <b...@nicira.com>
> ---
> tests/ofproto-dpif.at |   18 +++++++++---------
> tests/test-netflow.c  |    2 +-
> 2 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
> index cc5d770..de56ef8 100644
> --- a/tests/ofproto-dpif.at
> +++ b/tests/ofproto-dpif.at
> @@ -968,13 +968,13 @@ AT_CHECK([[sed -e 's/, uptime [0-9]*//
> s/, now [0-9.]*//
> s/time \([0-9]*\)\.\.\.\1$/time <moment>/
> s/time [0-9]*\.\.\.[0-9]*/time <range>/
> -' netflow.log]], [0],
> -  [header: v5, seq 0, engine 2,1
> -rec: 192.168.0.1 > 192.168.0.2, if 1 > 65535, 1 pkts, 60 bytes, ICMP 8:0, 
> time <moment>
> -
> +' netflow.log | sort]], [0],
> +  [
> +header: v5, seq 0, engine 2,1
> header: v5, seq 1, engine 2,1
> -rec: 192.168.0.2 > 192.168.0.1, if 2 > 1, 2 pkts, 120 bytes, ICMP 0:0, time 
> <range>
> -rec: 192.168.0.1 > 192.168.0.2, if 1 > 2, 1 pkts, 60 bytes, ICMP 8:0, time 
> <moment>
> +seq 0: 192.168.0.1 > 192.168.0.2, if 1 > 65535, 1 pkts, 60 bytes, ICMP 8:0, 
> time <moment>
> +seq 1: 192.168.0.1 > 192.168.0.2, if 1 > 2, 1 pkts, 60 bytes, ICMP 8:0, time 
> <moment>
> +seq 1: 192.168.0.2 > 192.168.0.1, if 2 > 1, 2 pkts, 120 bytes, ICMP 0:0, 
> time <range>
> ])
> AT_CLEANUP
> 
> @@ -1032,13 +1032,13 @@ while read line; do
>     esac
> 
>     case $line in
> -        "rec: 192.168.0.1 > 192.168.0.2, if 1 > 65535, "*" pkts, "*" bytes, 
> TCP 1234 > 80, time "*)
> +        "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 65535, "*" pkts, "*" 
> bytes, TCP 1234 > 80, time "*)
>             counter=n_learn
>           ;;
> -     "rec: 192.168.0.1 > 192.168.0.2, if 1 > 2, "*" pkts, "*" bytes, TCP 
> 1234 > 80, time "*)
> +     "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 2, "*" pkts, "*" bytes, TCP 
> 1234 > 80, time "*)
>           counter=n_in
>           ;;
> -     "rec: 192.168.0.2 > 192.168.0.1, if 2 > 1, "*" pkts, "*" bytes, TCP 80 
> > 1234, time "*)
> +     "seq "*": 192.168.0.2 > 192.168.0.1, if 2 > 1, "*" pkts, "*" bytes, TCP 
> 80 > 1234, time "*)
>           counter=n_out
>           ;;
>       *)
> diff --git a/tests/test-netflow.c b/tests/test-netflow.c
> index 85ab5e7..c37eeaf 100644
> --- a/tests/test-netflow.c
> +++ b/tests/test-netflow.c
> @@ -74,7 +74,7 @@ print_netflow(struct ofpbuf *buf)
>             return;
>         }
> 
> -        printf("rec: "IP_FMT" > "IP_FMT,
> +        printf("seq %"PRIu32": "IP_FMT" > "IP_FMT, ntohl(hdr->flow_seq),
>                IP_ARGS(&rec->src_addr), IP_ARGS(&rec->dst_addr));
> 
>         printf(", if %"PRIu16" > %"PRIu16,
> -- 
> 1.7.2.5
> 
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to