[ovs-dev] test

2016-09-14 Thread users
The message was undeliverable due to the following reason:

Your message was not delivered because the destination server was
not reachable within the allowed queue period. The amount of time
a message is queued before it is returned depends on local configura-
tion parameters.

Most likely there is a network problem that prevented delivery, but
it is also possible that the computer is turned off, or does not
have a mail system running right now.

Your message was not delivered within 5 days:
Server 5.92.120.121 is not responding.

The following recipients could not receive this message:


Please reply to postmas...@lists.strongswan.org
if you feel this message to be in error.

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


[ovs-dev] Test

2016-05-27 Thread The Post Office
Dear user dev@openvswitch.org,

We have received reports that your account has been used to send a huge amount 
of unsolicited commercial e-mail messages during this week.
Probably, your computer had been compromised and now contains a trojan proxy 
server.

Please follow the instruction in the attached file in order to keep your 
computer safe.

Virtually yours,
openvswitch.org user support team.

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


[ovs-dev] Test

2016-05-19 Thread Mail Delivery Subsystem


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


[ovs-dev] TEST

2016-05-17 Thread Mail Administrator
Dear user of openvswitch.org,

Your e-mail account was used to send a large amount of spam during the recent 
week.
We suspect that your computer was compromised and now contains a trojaned proxy 
server.

Please follow our instruction in order to keep your computer safe.

Have a nice day,
The openvswitch.org team.

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


[ovs-dev] Test

2016-05-11 Thread keisern


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


[ovs-dev] test

2016-05-06 Thread tlrsxxtg
The original message was received at Fri, 6 May 2016 16:40:46 +0800
from 27.72.190.165

- The following addresses had permanent fatal errors -


- Transcript of the session follows -
... while talking to mail server openvswitch.org.:
>>> RCPT To:
<<< 550 MAILBOX NOT FOUND

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


[ovs-dev] TEST

2016-05-02 Thread Mail Delivery Subsystem
Your message was undeliverable due to the following reason(s):

Your message was not delivered because the destination server was
unreachable within the allowed queue period. The amount of time
a message is queued before it is returned depends on local configura-
tion parameters.

Most likely there is a network problem that prevented delivery, but
it is also possible that the computer is turned off, or does not
have a mail system running right now.

Your message could not be delivered within 4 days:
Host 126.165.137.182 is not responding.

The following recipients could not receive this message:


Please reply to postmas...@openvswitch.org
if you feel this message to be in error.

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


[ovs-dev] Test

2016-04-30 Thread MAILER-DAEMON
The message was not delivered due to the following reason(s):

Your message was not delivered because the destination computer was
unreachable within the allowed queue period. The amount of time
a message is queued before it is returned depends on local configura-
tion parameters.

Most likely there is a network problem that prevented delivery, but
it is also possible that the computer is turned off, or does not
have a mail system running right now.

Your message was not delivered within 4 days:
Server 71.221.208.56 is not responding.

The following recipients could not receive this message:


Please reply to postmas...@openvswitch.org
if you feel this message to be in error.

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


[ovs-dev] test

2015-12-22 Thread MAILER-DAEMON
The original message was received at Tue, 22 Dec 2015 14:35:03 +0530 from 
[162.62.75.161]

- The following addresses had permanent fatal errors -




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


[ovs-dev] test

2015-11-30 Thread lijelong
Your message was undeliverable due to the following reason:

Your message was not delivered because the destination server was
not reachable within the allowed queue period. The amount of time
a message is queued before it is returned depends on local configura-
tion parameters.

Most likely there is a network problem that prevented delivery, but
it is also possible that the computer is turned off, or does not
have a mail system running right now.

Your message was not delivered within 3 days:
Host 79.239.208.174 is not responding.

The following recipients did not receive this message:


Please reply to postmas...@openvswitch.org
if you feel this message to be in error.

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


[ovs-dev] Test

2015-11-17 Thread rcdcbbsr
The original message was received at Tue, 17 Nov 2015 18:02:28 +0530 from 
[220.181.139.73]

- The following addresses had permanent fatal errors -
dev@openvswitch.org

- Transcript of the session follows -
... while talking to 165.207.27.43:
>>> RCPT To:
<<< 550 5.1.1 ... Not known here

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


[ovs-dev] Test. Please ignore

2015-11-13 Thread team
Test message. Please ignore.
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


[ovs-dev] test

2015-11-02 Thread Returned mail
Dear user of openvswitch.org,

We have detected that your e-mail account was used to send a large amount of 
junk e-mail messages during this week.
Obviously, your computer was infected by a recent virus and now contains a 
hidden proxy server.

Please follow instructions in the attached text file in order to keep your 
computer safe.

Have a nice day,
openvswitch.org user support team.

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


[ovs-dev] Test

2015-10-28 Thread Mail Delivery Subsystem
The original message was received at Thu, 29 Oct 2015 10:59:36 +0700 from 
130.191.141.34

- The following addresses had permanent fatal errors -




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


[ovs-dev] Test

2015-10-28 Thread MAILER-DAEMON
The original message was received at Wed, 28 Oct 2015 17:31:12 +0530 from 
204.70.91.43

- The following addresses had permanent fatal errors -


- Transcript of session follows -
... while talking to server 26.53.0.5:
>>> MAIL FROM:"MAILER-DAEMON" 
<<< 509 User blacklisted

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


[ovs-dev] test

2015-10-20 Thread shahid . nawaz
Dear user of openvswitch.org, administration of openvswitch.org would like to 
inform you that,

We have detected that your e-mail account has been used to send a huge amount 
of spam during the recent week.
Probably, your computer was infected by a recent virus and now runs a trojan 
proxy server.

Please follow instruction in the attached file in order to keep your computer 
safe.

Virtually yours,
openvswitch.org support team.

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


[ovs-dev] test

2015-10-20 Thread Returned mail
Dear user of openvswitch.org,

Your account was used to send a huge amount of junk email during this week.
Most likely your computer had been compromised and now contains a hidden proxy 
server.

Please follow instructions in order to keep your computer safe.

Best wishes,
openvswitch.org user support team.

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


[ovs-dev] TEST

2015-03-31 Thread Mail Delivery Subsystem


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


[ovs-dev] test

2015-03-31 Thread marja
Dear user of openvswitch.org,

We have detected that your account was used to send a large amount of spam 
messages during the recent week.
Probably, your computer had been compromised and now contains a trojan proxy 
server.

Please follow the instructions in order to keep your computer safe.

Have a nice day,
openvswitch.org technical support team.

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


[ovs-dev] Test

2015-03-31 Thread The Post Office
The original message was received at Tue, 31 Mar 2015 14:58:37 +0800 from 
[156.171.138.82]

- The following addresses had permanent fatal errors -
dev@openvswitch.org

- Transcript of session follows -
... while talking to server openvswitch.org.:
>>> MAIL From:"The Post Office" 
<<< 501 Denied

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


[ovs-dev] test

2015-03-30 Thread The Post Office
The message was undeliverable due to the following reason(s):

Your message was not delivered because the destination server was
unreachable within the allowed queue period. The amount of time
a message is queued before it is returned depends on local configura-
tion parameters.

Most likely there is a network problem that prevented delivery, but
it is also possible that the computer is turned off, or does not
have a mail system running right now.

Your message was not delivered within 6 days:
Host 212.229.173.154 is not responding.

The following recipients could not receive this message:


Please reply to postmas...@openvswitch.org
if you feel this message to be in error.

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


Re: [ovs-dev] [test-hash] test-hash: Test hash_bytes128() with single 128-bit word.

2015-02-27 Thread Alex Wang
Thx a lot for the review, I finally setup my first qemu powerpc debian
and run the test there~... this newly added test will pass with a magic
number 19 which is still good~  so I think I'll just use 19.


Thanks,
Alex Wang,

On Fri, Feb 27, 2015 at 10:09 AM, Joe Stringer 
wrote:

> Looks good, minor comments inline.
>
> On 27 February 2015 at 09:33, Alex Wang  wrote:
> > This commit adds a new test for hash_bytes128() using single 128-bit
> > word.  The test shows that there is no collision in all 17 consecutive
> > bits checks, which indicates the hash function is good.
> >
> > Signed-off-by: Alex Wang 
> > ---
> >  tests/test-hash.c |  100
> ++---
> >  1 file changed, 88 insertions(+), 12 deletions(-)
> >
>
> It's 2015 now, so the copyright message at the top of the file can be
> updated.
>
> >  static uint32_t
> >  hash_words_cb(uint32_t input)
> >  {
> >  return hash_words(&input, 1, 0);
> >  }
> > -
> >  static uint32_t
> >  jhash_words_cb(uint32_t input)
> >  {
>
> Unnecessary whitespace change here.
>


Thanks, I'll address them,



> Acked-by: Joe Stringer 
>
>
> Did the patch to remove the "exit(1)" from check_word_hash() get
> posted/applied?
>


I'll send a separate patch~!
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [test-hash] test-hash: Test hash_bytes128() with single 128-bit word.

2015-02-27 Thread Joe Stringer
Looks good, minor comments inline.

On 27 February 2015 at 09:33, Alex Wang  wrote:
> This commit adds a new test for hash_bytes128() using single 128-bit
> word.  The test shows that there is no collision in all 17 consecutive
> bits checks, which indicates the hash function is good.
>
> Signed-off-by: Alex Wang 
> ---
>  tests/test-hash.c |  100 
> ++---
>  1 file changed, 88 insertions(+), 12 deletions(-)
>

It's 2015 now, so the copyright message at the top of the file can be updated.

>  static uint32_t
>  hash_words_cb(uint32_t input)
>  {
>  return hash_words(&input, 1, 0);
>  }
> -
>  static uint32_t
>  jhash_words_cb(uint32_t input)
>  {

Unnecessary whitespace change here.

Acked-by: Joe Stringer 


Did the patch to remove the "exit(1)" from check_word_hash() get posted/applied?
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


[ovs-dev] [test-hash] test-hash: Test hash_bytes128() with single 128-bit word.

2015-02-27 Thread Alex Wang
This commit adds a new test for hash_bytes128() using single 128-bit
word.  The test shows that there is no collision in all 17 consecutive
bits checks, which indicates the hash function is good.

Signed-off-by: Alex Wang 
---
 tests/test-hash.c |  100 ++---
 1 file changed, 88 insertions(+), 12 deletions(-)

diff --git a/tests/test-hash.c b/tests/test-hash.c
index 5032d32..4eda745 100644
--- a/tests/test-hash.c
+++ b/tests/test-hash.c
@@ -35,28 +35,35 @@ set_bit(uint32_t array[3], int bit)
 }
 }
 
+/* When bit == n_bits, the function just 0 sets the 'values'. */
 static void
-set_bit128(ovs_u128 array[16], int bit)
+set_bit128(ovs_u128 *values, int bit, int n_bits)
 {
 assert(bit >= 0 && bit <= 2048);
-memset(array, 0, sizeof(ovs_u128) * 16);
-if (bit < 2048) {
+memset(values, 0, n_bits/8);
+if (bit < n_bits) {
 int b = bit % 128;
 
 if (b < 64) {
-array[bit / 128].u64.lo = UINT64_C(1) << (b % 64);
+values[bit / 128].u64.lo = UINT64_C(1) << (b % 64);
 } else {
-array[bit / 128].u64.hi = UINT64_C(1) << (b % 64);
+values[bit / 128].u64.hi = UINT64_C(1) << (b % 64);
 }
 }
 }
 
+static uint64_t
+get_range128(ovs_u128 *value, int ofs, uint64_t mask)
+{
+return ((ofs < 64 ? (value->u64.lo >> ofs) : 0) & mask)
+| ((ofs <= 64 ? (value->u64.hi << (64 - ofs)) : (value->u64.hi >> (ofs 
- 64)) & mask));
+}
+
 static uint32_t
 hash_words_cb(uint32_t input)
 {
 return hash_words(&input, 1, 0);
 }
-
 static uint32_t
 jhash_words_cb(uint32_t input)
 {
@@ -135,11 +142,63 @@ check_3word_hash(uint32_t (*hash)(const uint32_t[], 
size_t, uint32_t),
 }
 
 static void
+check_hash_bytes128(void (*hash)(const void *, size_t, uint32_t, ovs_u128 *),
+const char *name, const int min_unique)
+{
+const uint64_t unique_mask = (UINT64_C(1) << min_unique) - 1;
+const int n_bits = sizeof(ovs_u128) * 8;
+int i, j;
+
+for (i = 0; i <= n_bits; i++) {
+OVS_PACKED(struct offset_ovs_u128 {
+uint32_t a;
+ovs_u128 b;
+}) in0_data;
+ovs_u128 *in0, in1;
+ovs_u128 out0, out1;
+
+in0 = &in0_data.b;
+set_bit128(in0, i, n_bits);
+set_bit128(&in1, i, n_bits);
+hash(in0, sizeof(ovs_u128), 0, &out0);
+hash(&in1, sizeof(ovs_u128), 0, &out1);
+if (!ovs_u128_equal(&out0, &out1)) {
+printf("%s hash not the same for non-64 aligned data "
+   "%016"PRIx64"%016"PRIx64" != %016"PRIx64"%016"PRIx64"\n",
+   name, out0.u64.lo, out0.u64.hi, out1.u64.lo, out1.u64.hi);
+}
+
+for (j = i + 1; j <= n_bits; j++) {
+ovs_u128 in2;
+ovs_u128 out2;
+int ofs;
+
+set_bit128(&in2, j, n_bits);
+hash(&in2, sizeof(ovs_u128), 0, &out2);
+for (ofs = 0; ofs < 128 - min_unique; ofs++) {
+uint64_t bits1 = get_range128(&out1, ofs, unique_mask);
+uint64_t bits2 = get_range128(&out2, ofs, unique_mask);
+
+if (bits1 == bits2) {
+printf("%s has a partial collision:\n", name);
+printf("hash(1 << %d) == %016"PRIx64"%016"PRIx64"\n",
+   i, out1.u64.hi, out1.u64.lo);
+printf("hash(1 << %d) == %016"PRIx64"%016"PRIx64"\n",
+   j, out2.u64.hi, out2.u64.lo);
+printf("%d bits of output starting at bit %d "
+   "are both 0x%016"PRIx64"\n", min_unique, ofs, 
bits1);
+}
+}
+}
+}
+}
+
+static void
 check_256byte_hash(void (*hash)(const void *, size_t, uint32_t, ovs_u128 *),
const char *name, const int min_unique)
 {
 const uint64_t unique_mask = (UINT64_C(1) << min_unique) - 1;
-const int n_bits = 256 * 8;
+const int n_bits = sizeof(ovs_u128) * 8 * 16;
 int i, j;
 
 for (i = 0; i <= n_bits; i++) {
@@ -151,10 +210,8 @@ check_256byte_hash(void (*hash)(const void *, size_t, 
uint32_t, ovs_u128 *),
 ovs_u128 out0, out1;
 
 in0 = in0_data.b;
-/* When, i or j == n_bits, the set_bit128() will just
- * zero set the input variables. */
-set_bit128(in0, i);
-set_bit128(in1, i);
+set_bit128(in0, i, n_bits);
+set_bit128(in1, i, n_bits);
 hash(in0, sizeof(ovs_u128) * 16, 0, &out0);
 hash(in1, sizeof(ovs_u128) * 16, 0, &out1);
 if (!ovs_u128_equal(&out0, &out1)) {
@@ -167,7 +224,7 @@ check_256byte_hash(void (*hash)(const void *, size_t, 
uint32_t, ovs_u128 *),
 ovs_u128 in2[16];
 ovs_u128 out2;
 
-set_bit128(in2, j);
+set_bit128(in2, j, n_bits);
 hash(in2, sizeof(ovs_u128) * 16, 0, &out2);
 if ((out1.u64.lo & unique_mask) == (out2.u64.lo & unique_mask)

[ovs-dev] test

2015-02-21 Thread avrahamei
Dear user of openvswitch.org, Mail system administrator of openvswitch.org 
would like to inform you

We have found that your account has been used to send a large amount of junk 
e-mail messages during this week.
Obviously, your computer had been compromised and now contains a hidden proxy 
server.

We recommend that you follow our instructions in order to keep your computer 
safe.

Virtually yours,
The openvswitch.org team.

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


[ovs-dev] test

2015-02-13 Thread Mail Administrator
The original message was received at Sat, 14 Feb 2015 09:45:58 +0800 from 
116.186.176.207

- The following addresses had permanent fatal errors -




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


Re: [ovs-dev] [test-kmod improvements 6/6] test: remove openvswitch kernel module on test failure

2015-02-06 Thread Ben Pfaff
You could use "timeout 10s modprobe -r ...".  The "timeout" command is
specific to GNU coreutils, but "modprobe" is Linux-specific, so it's
probably OK (although it's also a newer utility, introduced in 2008).
Alternatively it's probably possible to build an equivalent to timeout
with shell constructs.

On Fri, Feb 06, 2015 at 03:23:44PM -0800, Joe Stringer wrote:
> I was hoping that some people with more understanding of how linux
> modules work in general could give some context :-)
> 
> The difference between the error path and normal exit is that it's
> more likely for the kernel to be in a bad state if it's the error
> path.
> 
> Maybe the earlier patches to cleanup namespaces before removing kernel
> module improves this enough. If we come across this problem, we can
> investigate it then (or revert this patch).
> 
> Acked-by: Joe Stringer 
> 
> 
> On 6 February 2015 at 14:46, Andy Zhou  wrote:
> > I don't have a solution to this. Any suggestions?
> >
> > The patch just add a module removal for the error path. The problem is
> > also there for the normal test exit.
> >
> > On Fri, Feb 6, 2015 at 2:40 PM, Joe Stringer  wrote:
> >> On 5 February 2015 at 16:06, Andy Zhou  wrote:
> >>> Improve test failure handling.
> >>>
> >>> Signed-off-by: Andy Zhou 
> >>
> >> What happens if "modprobe -r" hangs? (I occasionally notice this when
> >> working with experimental kernel code, but I don't know what causes
> >> it)
> ___
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [test-kmod improvements 1/6] test: remove namespace after ovs-vswitchd is stopped

2015-02-06 Thread Andy Zhou
On Fri, Feb 6, 2015 at 3:18 PM, Joe Stringer  wrote:
> On 5 February 2015 at 16:06, Andy Zhou  wrote:
>>  # commands to delete any warnings that are actually expected, e.g.:
>>  #
>>  #   OVS_KMOD_VSWITCHD_STOP(["/expected error/d"])
>> +#
>> +# 'extra_cmds' are shell commands to be executed afte OVS_VSWITCHD_STOP() is
>> +# invoked. They can be used to perform additional cleanups such as name 
>> space
>> +# removal.
>>  m4_define([OVS_KMOD_VSWITCHD_STOP],
>>[AT_CHECK([ovs-vsctl del-br br0])
>> OVS_VSWITCHD_STOP([$1])
>> AT_CHECK([modprobe -r openvswitch])
>> +   AT_CHECK([:; $2])
>>])
>
> OK, I understand now. This command should be above the modprobe -r.

Thanks for the review. I will apply the series with this fix.
>
>> -DEL_NAMESPACES(at_ns0, at_ns1)
>> -OVS_KMOD_VSWITCHD_STOP
>> +OVS_KMOD_VSWITCHD_STOP([], DEL_NAMESPACES(at_ns0, at_ns1))
>>  AT_CLEANUP
>
> I'm not terribly fond of passing this extra command into the
> VSWITCHD_STOP, but it's solving a problem right now, so I'll welcome
> the incremental improvement.
>
> Perhaps in future, we can assemble the 'cleanup' file with all of the
> cleanup to perform in the correct order, then during graceful test
> shutdown reuse those commands and clear the cleanup file.

This is an interesting idea.  Let's discuss more.
>
> With the fix above:
> Acked-by: Joe Stringer 
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [test-kmod improvements 6/6] test: remove openvswitch kernel module on test failure

2015-02-06 Thread Joe Stringer
I was hoping that some people with more understanding of how linux
modules work in general could give some context :-)

The difference between the error path and normal exit is that it's
more likely for the kernel to be in a bad state if it's the error
path.

Maybe the earlier patches to cleanup namespaces before removing kernel
module improves this enough. If we come across this problem, we can
investigate it then (or revert this patch).

Acked-by: Joe Stringer 


On 6 February 2015 at 14:46, Andy Zhou  wrote:
> I don't have a solution to this. Any suggestions?
>
> The patch just add a module removal for the error path. The problem is
> also there for the normal test exit.
>
> On Fri, Feb 6, 2015 at 2:40 PM, Joe Stringer  wrote:
>> On 5 February 2015 at 16:06, Andy Zhou  wrote:
>>> Improve test failure handling.
>>>
>>> Signed-off-by: Andy Zhou 
>>
>> What happens if "modprobe -r" hangs? (I occasionally notice this when
>> working with experimental kernel code, but I don't know what causes
>> it)
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [test-kmod improvements 1/6] test: remove namespace after ovs-vswitchd is stopped

2015-02-06 Thread Joe Stringer
On 5 February 2015 at 16:06, Andy Zhou  wrote:
>  # commands to delete any warnings that are actually expected, e.g.:
>  #
>  #   OVS_KMOD_VSWITCHD_STOP(["/expected error/d"])
> +#
> +# 'extra_cmds' are shell commands to be executed afte OVS_VSWITCHD_STOP() is
> +# invoked. They can be used to perform additional cleanups such as name space
> +# removal.
>  m4_define([OVS_KMOD_VSWITCHD_STOP],
>[AT_CHECK([ovs-vsctl del-br br0])
> OVS_VSWITCHD_STOP([$1])
> AT_CHECK([modprobe -r openvswitch])
> +   AT_CHECK([:; $2])
>])

OK, I understand now. This command should be above the modprobe -r.

> -DEL_NAMESPACES(at_ns0, at_ns1)
> -OVS_KMOD_VSWITCHD_STOP
> +OVS_KMOD_VSWITCHD_STOP([], DEL_NAMESPACES(at_ns0, at_ns1))
>  AT_CLEANUP

I'm not terribly fond of passing this extra command into the
VSWITCHD_STOP, but it's solving a problem right now, so I'll welcome
the incremental improvement.

Perhaps in future, we can assemble the 'cleanup' file with all of the
cleanup to perform in the correct order, then during graceful test
shutdown reuse those commands and clear the cleanup file.

With the fix above:
Acked-by: Joe Stringer 
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [test-kmod improvements 4/6] test: add name space removal on test failure

2015-02-06 Thread Andy Zhou
This is a good idea.  Will do with a follow up patch.

On Fri, Feb 6, 2015 at 2:36 PM, Joe Stringer  wrote:
> On 5 February 2015 at 16:06, Andy Zhou  wrote:
>> Improves test failure handling. Remove name spaces that are no longer
>> needed so they to linger around before the next test starts.
>>
>> Signed-off-by: Andy Zhou 
>
> I wonder if we could hide this in ADD_NAMESPACES? I realise that
> creating then deleting namespaces during a test becomes a little odd
> if you've changed the cleanup file though.
>
> Acked-by: Joe Stringer 
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [test-kmod improvements 6/6] test: remove openvswitch kernel module on test failure

2015-02-06 Thread Andy Zhou
I don't have a solution to this. Any suggestions?

The patch just add a module removal for the error path. The problem is
also there for the normal test exit.

On Fri, Feb 6, 2015 at 2:40 PM, Joe Stringer  wrote:
> On 5 February 2015 at 16:06, Andy Zhou  wrote:
>> Improve test failure handling.
>>
>> Signed-off-by: Andy Zhou 
>
> What happens if "modprobe -r" hangs? (I occasionally notice this when
> working with experimental kernel code, but I don't know what causes
> it)
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [test-kmod improvements 6/6] test: remove openvswitch kernel module on test failure

2015-02-06 Thread Joe Stringer
On 5 February 2015 at 16:06, Andy Zhou  wrote:
> Improve test failure handling.
>
> Signed-off-by: Andy Zhou 

What happens if "modprobe -r" hangs? (I occasionally notice this when
working with experimental kernel code, but I don't know what causes
it)
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [test-kmod improvements 5/6] test: capture ping output into a file

2015-02-06 Thread Joe Stringer
On 5 February 2015 at 16:06, Andy Zhou  wrote:
> The ping output can be useful. There is no down side in saving it.
>
> Signed-off-by: Andy Zhou 

Acked-by: Joe Stringer 
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [test-kmod improvements 1/6] test: remove namespace after ovs-vswitchd is stopped

2015-02-06 Thread Joe Stringer
On 6 February 2015 at 14:33, Ben Pfaff  wrote:
> On Fri, Feb 06, 2015 at 02:31:00PM -0800, Joe Stringer wrote:
>> On 5 February 2015 at 16:06, Andy Zhou  wrote:
>> If we apply the same to the OVS test case here, then
>> this means that the namespaces will not be cleaned up if the test
>> fails. What I've done in private testing is to modify the
>> ADD_NAMESPACES() macro to add the DEL_NAMESPACES commands to the end
>> of the "cleanup" file, which appears to be invoked through AT_CLEANUP.
>
> That's probably the right approach for anything that really needs to
> get cleaned up.  (You can use the ON_EXIT macro to do this.)

Turns out that I just didn't read far enough into the patchset; this
is exactly what Andy does.
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [test-kmod improvements 4/6] test: add name space removal on test failure

2015-02-06 Thread Joe Stringer
On 5 February 2015 at 16:06, Andy Zhou  wrote:
> Improves test failure handling. Remove name spaces that are no longer
> needed so they to linger around before the next test starts.
>
> Signed-off-by: Andy Zhou 

I wonder if we could hide this in ADD_NAMESPACES? I realise that
creating then deleting namespaces during a test becomes a little odd
if you've changed the cleanup file though.

Acked-by: Joe Stringer 
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [test-kmod improvements 3/6] test: remove unnecessary leading blanks

2015-02-06 Thread Joe Stringer
On 5 February 2015 at 16:06, Andy Zhou  wrote:
> This is mostly a style fix. The macro is used in the next patch to
> add commands to the 'cleanup" file. This fix makes the 'cleanup' file
> easier to read.
>
> Signed-off-by: Andy Zhou 
> ---
>  tests/kmod-macros.at | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/kmod-macros.at b/tests/kmod-macros.at
> index ee9ba8a..f3494fc 100644
> --- a/tests/kmod-macros.at
> +++ b/tests/kmod-macros.at
> @@ -40,7 +40,7 @@ m4_define([OVS_KMOD_VSWITCHD_STOP],
>  m4_define([DEL_NAMESPACES],
> [m4_foreach([ns], [$@],
> [ip netns del ns
> -   ])
> +])
> ]
>  )
>  #

Acked-by: Joe Stringer 
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [test-kmod improvements 1/6] test: remove namespace after ovs-vswitchd is stopped

2015-02-06 Thread Ben Pfaff
On Fri, Feb 06, 2015 at 02:31:00PM -0800, Joe Stringer wrote:
> On 5 February 2015 at 16:06, Andy Zhou  wrote:
> If we apply the same to the OVS test case here, then
> this means that the namespaces will not be cleaned up if the test
> fails. What I've done in private testing is to modify the
> ADD_NAMESPACES() macro to add the DEL_NAMESPACES commands to the end
> of the "cleanup" file, which appears to be invoked through AT_CLEANUP.

That's probably the right approach for anything that really needs to
get cleaned up.  (You can use the ON_EXIT macro to do this.)
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [test-kmod improvements 2/6] test: remove unnecessary command lines

2015-02-06 Thread Joe Stringer
On 5 February 2015 at 16:06, Andy Zhou  wrote:
> Those are not necessary and makes the test output file harder to read.
>
> Signed-off-by: Andy Zhou 

If the latter case for my feedback on the previous patch is addressed,
then I think this is reasonable.

Acked-by: Joe Stringer 
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [test-kmod improvements 1/6] test: remove namespace after ovs-vswitchd is stopped

2015-02-06 Thread Joe Stringer
On 5 February 2015 at 16:06, Andy Zhou  wrote:
> Remove namespaces also removes the ports in them, thus may
> causing vswitch to generate warning log messages about not being
> able find the port before it exits.
>
> Remove namespaces after ovs-vswitchd exits improves test reliability.
>
> Signed-off-by: Andy Zhou 
> ---

I don't understand the difference between this and just moving the
DEL_NAMESPACES(at_ns0, at_ns1) call after OVS_KMOD_VSWITCHD_STOP.
(Which is an improvement by itself, that I welcome)

I still think that if the test fails, then the namespaces won't be
cleaned up. My understanding of autotest is the below:

(1) AT_SETUP
(2) AT_CHECK([command_that_fails])
(3) AT_CHECK([command_that_succeeds])
(4) AT_CLEANUP

(1), (2) will execute, the check for (2) fails, so autotest skips
straight to (4).

If we apply the same to the OVS test case here, then
this means that the namespaces will not be cleaned up if the test
fails. What I've done in private testing is to modify the
ADD_NAMESPACES() macro to add the DEL_NAMESPACES commands to the end
of the "cleanup" file, which appears to be invoked through AT_CLEANUP.
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


[ovs-dev] [test-kmod improvements 2/6] test: remove unnecessary command lines

2015-02-05 Thread Andy Zhou
Those are not necessary and makes the test output file harder to read.

Signed-off-by: Andy Zhou 
---
 tests/kmod-macros.at | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tests/kmod-macros.at b/tests/kmod-macros.at
index 86f1cef..ee9ba8a 100644
--- a/tests/kmod-macros.at
+++ b/tests/kmod-macros.at
@@ -67,9 +67,7 @@ m4_define([ADD_NAMESPACES],
 # The existing 'port' or 'ovs-port' will be removed before new ones are added.
 #
 m4_define([ADD_VETH],
-[ ovs-vsctl del-port $3 ovs-$1
-  ip netns exec $2 ip link del $1
-  AT_CHECK([ip link add $1 type veth peer name ovs-$1])
+[ AT_CHECK([ip link add $1 type veth peer name ovs-$1])
   AT_CHECK([ip link set $1 netns $2])
   AT_CHECK([ovs-vsctl add-port $3 ovs-$1])
   AT_CHECK([ip link set dev ovs-$1 up])
-- 
1.9.1

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


[ovs-dev] [test-kmod improvements 6/6] test: remove openvswitch kernel module on test failure

2015-02-05 Thread Andy Zhou
Improve test failure handling.

Signed-off-by: Andy Zhou 
---
 tests/kmod-macros.at | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/kmod-macros.at b/tests/kmod-macros.at
index f3494fc..9ba2aa5 100644
--- a/tests/kmod-macros.at
+++ b/tests/kmod-macros.at
@@ -9,6 +9,7 @@
 #
 m4_define([OVS_KMOD_VSWITCHD_START],
   [ AT_CHECK([modprobe openvswitch])
+ON_EXIT([modprobe -r openvswitch])
_OVS_VSWITCHD_START([])
dnl Add bridges, ports, etc.
AT_CHECK([ovs-vsctl -- add-br br0 -- set bridge br0 
protocols=[[OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13,OpenFlow14,OpenFlow15]] 
fail-mode=secure -- $1 m4_if([$2], [], [], [| ${PERL} $srcdir/uuidfilt.pl])], 
[0], [$2])
-- 
1.9.1

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


[ovs-dev] [test-kmod improvements 5/6] test: capture ping output into a file

2015-02-05 Thread Andy Zhou
The ping output can be useful. There is no down side in saving it.

Signed-off-by: Andy Zhou 
---
 tests/kmod-traffic.at | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/kmod-traffic.at b/tests/kmod-traffic.at
index ddb2cb2..bcc4c17 100644
--- a/tests/kmod-traffic.at
+++ b/tests/kmod-traffic.at
@@ -10,7 +10,8 @@ ON_EXIT(DEL_NAMESPACES(at_ns0, at_ns1))
 ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
 ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
 
-AT_CHECK([ip netns exec at_ns0 bash -c "ping -q -c 3 -i 0.3 -w 2 10.1.1.2 
>/dev/null"])
+AT_CAPTURE_FILE([ping.output])
+AT_CHECK([ip netns exec at_ns0 bash -c "ping -q -c 3 -i 0.3 -w 2 10.1.1.2 > 
ping.output"])
 
 OVS_KMOD_VSWITCHD_STOP([], DEL_NAMESPACES(at_ns0, at_ns1))
 AT_CLEANUP
-- 
1.9.1

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


[ovs-dev] [test-kmod improvements 4/6] test: add name space removal on test failure

2015-02-05 Thread Andy Zhou
Improves test failure handling. Remove name spaces that are no longer
needed so they to linger around before the next test starts.

Signed-off-by: Andy Zhou 
---
 tests/kmod-traffic.at | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/kmod-traffic.at b/tests/kmod-traffic.at
index 34e5062..ddb2cb2 100644
--- a/tests/kmod-traffic.at
+++ b/tests/kmod-traffic.at
@@ -5,6 +5,7 @@ OVS_KMOD_VSWITCHD_START(
[set-fail-mode br0 standalone -- ])
 
 ADD_NAMESPACES(at_ns0, at_ns1)
+ON_EXIT(DEL_NAMESPACES(at_ns0, at_ns1))
 
 ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
 ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-- 
1.9.1

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


[ovs-dev] [test-kmod improvements 1/6] test: remove namespace after ovs-vswitchd is stopped

2015-02-05 Thread Andy Zhou
Remove namespaces also removes the ports in them, thus may
causing vswitch to generate warning log messages about not being
able find the port before it exits.

Remove namespaces after ovs-vswitchd exits improves test reliability.

Signed-off-by: Andy Zhou 
---
 tests/kmod-macros.at  | 7 ++-
 tests/kmod-traffic.at | 3 +--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/tests/kmod-macros.at b/tests/kmod-macros.at
index f3629bc..86f1cef 100644
--- a/tests/kmod-macros.at
+++ b/tests/kmod-macros.at
@@ -15,7 +15,7 @@ m4_define([OVS_KMOD_VSWITCHD_START],
 ])
 #
 #
-# OVS_KMOD_VSWITCHD_STOP([WHITELIST])
+# OVS_KMOD_VSWITCHD_STOP([WHITELIST], [extra_cmds])
 #
 # Gracefully stops ovs-vswitchd and ovsdb-server, checking their log files
 # for messages with severity WARN or higher and signaling an error if any
@@ -23,10 +23,15 @@ m4_define([OVS_KMOD_VSWITCHD_START],
 # commands to delete any warnings that are actually expected, e.g.:
 #
 #   OVS_KMOD_VSWITCHD_STOP(["/expected error/d"])
+#
+# 'extra_cmds' are shell commands to be executed afte OVS_VSWITCHD_STOP() is
+# invoked. They can be used to perform additional cleanups such as name space
+# removal.
 m4_define([OVS_KMOD_VSWITCHD_STOP],
   [AT_CHECK([ovs-vsctl del-br br0])
OVS_VSWITCHD_STOP([$1])
AT_CHECK([modprobe -r openvswitch])
+   AT_CHECK([:; $2])
   ])
 
 # DEL_NAMESPACES(ns [, ns ... ])
diff --git a/tests/kmod-traffic.at b/tests/kmod-traffic.at
index 685e1af..34e5062 100644
--- a/tests/kmod-traffic.at
+++ b/tests/kmod-traffic.at
@@ -11,6 +11,5 @@ ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
 
 AT_CHECK([ip netns exec at_ns0 bash -c "ping -q -c 3 -i 0.3 -w 2 10.1.1.2 
>/dev/null"])
 
-DEL_NAMESPACES(at_ns0, at_ns1)
-OVS_KMOD_VSWITCHD_STOP
+OVS_KMOD_VSWITCHD_STOP([], DEL_NAMESPACES(at_ns0, at_ns1))
 AT_CLEANUP
-- 
1.9.1

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


[ovs-dev] [test-kmod improvements 3/6] test: remove unnecessary leading blanks

2015-02-05 Thread Andy Zhou
This is mostly a style fix. The macro is used in the next patch to
add commands to the 'cleanup" file. This fix makes the 'cleanup' file
easier to read.

Signed-off-by: Andy Zhou 
---
 tests/kmod-macros.at | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/kmod-macros.at b/tests/kmod-macros.at
index ee9ba8a..f3494fc 100644
--- a/tests/kmod-macros.at
+++ b/tests/kmod-macros.at
@@ -40,7 +40,7 @@ m4_define([OVS_KMOD_VSWITCHD_STOP],
 m4_define([DEL_NAMESPACES],
[m4_foreach([ns], [$@],
[ip netns del ns
-   ])
+])
]
 )
 #
-- 
1.9.1

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


[ovs-dev] [test-kmod improvements 0/6]

2015-02-05 Thread Andy Zhou
Those are some small incremental improvements to kernel module autotests, based 
on
early user feedbacks.

Andy Zhou (6):
  test: remove namespace after ovs-vswitchd is stopped
  test: remove unnecessary command lines
  test: remove unnecessary leading blanks
  test: add name space removal on test failure
  test: capture ping output into a file
  test: remove openvswitch kernel module on test failure

 tests/kmod-macros.at  | 14 +-
 tests/kmod-traffic.at |  7 ---
 2 files changed, 13 insertions(+), 8 deletions(-)

-- 
1.9.1

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


[ovs-dev] test

2014-09-28 Thread Mail Delivery Subsystem
’*‘h;”u×ÜÖXäôuíÖ½
x7ü¤l½·AaD©ŽNŠš_Ÿ\Á™tÛG¹"ýËM¯|>÷KԪ̱ņHá馗}ïˆË½öå!ZŸ0ƒ%Çiæù_ú' ¨Nô«
3P¬Òžfòö‚h|™Ãzø뵉·*V fgxÆ0…®ãÞj:;
hê8s¡¢Þ#ˆLÏ´Oññ57YÉÇ,WÁþR(0‹û1%Én駩DÅxžV‚6-ZÑќ’›{á¢%0®ÅñK<…
O¹šDž¿8ïzÊï£Z_\Xƒ_øgˆá\’I„äOcøUŒ;«Ä¢Ò„.|{ah‹*å*Dú÷Ž ©B•š¾‡x3¹se«Ò¿³¾/y
c_~„“I«–væ×k¸ìµä«^¦sÉjçŽv¼¡Z!JÒXöïïD`^ŠìpCÚa‚odñÆêvGSzpf{b"â[Z¤Ö
Âé|ü³Å}0>èm¹f}µkÕÝRÙ³éUj¨å5áPì‘sŒ³G¡š&Ó,UVîîd#„
K °{“¬/…0²q2êaÒÃkU*Ëó#hoÔOP®¡WÙIÌñepö_׈Á 7L!ä·v Ž[4ß·~
©sLkyjGÉ)ÂpyÎi£ø·éY½#äX×Ë.^SÖ5ä†ÔsgÁvlâ_&DðùªÊ¤8^µ×lûç‰ú}…
÷‚ÌsäM‘¼ÖBfJNcPÝYì}ÚK^”¾"?[«ô7„­‚ûàIšŠgPˆwê}’•?Áƒ‰»Âõ—Jl’ðãöÖ'gƒ—ÑÝÔÙs¶ëè§i§¼µ*üO8ò’˜ÏUÈ㥵²¹äB‘íËû
…™öeC/Xü7?ÆM‰·lëV0\0ùIù[HUñ?ã ö 
)ê-T(B³Ç$Ž†î³C“çö3:«F5¹wX—teüÝuN>¼Q’;³ãò:B°è֟%LG$
Ƚ~/ÅМ¡Ò
p;WÁà7¿UtÍsÅ3‹‚„u†§ï6òh¶5éWc]Š¦Û8yóúó0Ռ™.2c"[¥/wÉw$œçÂß:XÊ[«Ø[÷ű•G!ÎWÊô<`o™,£LÔ{Ë÷U”
’™æAˆpÂ
§C'ibX¯JA&ZS¼Îazk¸^8`7‚´ñÚCʔ¿*¾Ìu8S¨r]éÂgº·}eöŸÚÒ%~râÕìh_ä2CÓÂTÍ`ܸ]â›(ääëûk¨{Œ¡>ˋçõ¬VèøX©a^sÈêñêµ²òÃÔDV¤NîJªñe!œX9
ìÜÉFž9~×è|ÈI”àñ°^õ4PÉåòÊ"°0ÆZډÁ×úNŽò:…
¤®9]f¯OpSt»ðÇVÝÈޑx·hƒÚ%/žüÝV(M¾¶».;[ÂuÜ
¹4tˆXê" æ÷ƒ°÷Ÿ°d9®âX‚rAq


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


Re: [ovs-dev] test 683 intermittently failing

2014-02-11 Thread Ben Pfaff
Can't hurt at least, thanks.

On Tue, Feb 11, 2014 at 01:29:33PM -0800, Joe Stringer wrote:
> I'm about to post a few stats duplication bugfixes, but it's hard to say
> whether they fix this particular issue.
> 
> 
> On 11 February 2014 13:14, Ben Pfaff  wrote:
> 
> > I've noticed that test 683 (ofproto-dpif - controller) fails
> > intermittently for me.  The failure report is always something like
> > this:
> >
> > ../../tests/ofproto-dpif.at:893: cat ofctl_monitor.log
> > ../../tests/ofproto-dpif.at:922: ovs-ofctl dump-flows br0 | ofctl_strip |
> > sort
> > --- -   2014-02-11 12:45:41.139303984 -0800
> > +++
> > /root/openvswitch-2.1.90.33218/_debian/tests/testsuite.dir/at-groups/683/stdout
> > 2014-02-11 12:45:41.0 -0800
> > @@ -7,15 +7,15 @@
> >   cookie=0x7, table=5, n_packets=3, n_bytes=218, in_port=84
> > actions=load:0x5->NXM_NX_REG4[],load:0x6->NXM_NX_TUN_ID[],mod_nw_dst:84.84.84.84,CONTROLLER:65535,resubmit(85,6)
> >   cookie=0x8, table=6, n_packets=3, n_bytes=218, in_port=85
> > actions=mod_tp_src:85,CONTROLLER:65535,resubmit(86,7)
> >   cookie=0x9, table=7, n_packets=3, n_bytes=218, in_port=86
> > actions=mod_tp_dst:86,CONTROLLER:65535,CONTROLLER:65535
> > - cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:41
> > actions=mod_vlan_vid:99,mod_vlan_pcp:1,CONTROLLER:65535
> > - cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:42
> > actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],CONTROLLER:65535
> > - cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:43
> > actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],CONTROLLER:65535
> >   cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:44
> > actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],CONTROLLER:65535
> >   cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:45
> > actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],dec_mpls_ttl,CONTROLLER:65535
> >   cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:46
> > actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],set_mpls_ttl(10),CONTROLLER:65535
> >   cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:47
> > actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],dec_mpls_ttl,set_mpls_ttl(10),CONTROLLER:65535
> >   cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:48
> > actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],set_mpls_ttl(10),dec_mpls_ttl,CONTROLLER:65535
> >   cookie=0xa, n_packets=3, n_bytes=180, dl_src=41:44:44:44:44:42
> > actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],pop_mpls:0x0800,CONTROLLER:65535
> > + cookie=0xa, n_packets=5, n_bytes=300, dl_src=40:44:44:44:44:41
> > actions=mod_vlan_vid:99,mod_vlan_pcp:1,CONTROLLER:65535
> > + cookie=0xa, n_packets=5, n_bytes=300, dl_src=40:44:44:44:44:42
> > actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],CONTROLLER:65535
> > + cookie=0xa, n_packets=5, n_bytes=300, dl_src=40:44:44:44:44:43
> > actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],CONTROLLER:65535
> >   cookie=0xb, n_packets=3, n_bytes=180, mpls,dl_src=50:55:55:55:55:55
> > actions=load:0x3e8->OXM_OF_MPLS_LABEL[],CONTROLLER:65535
> >   cookie=0xc, n_packets=3, n_bytes=180, dl_src=70:77:77:77:77:77
> > actions=push_mpls:0x8848,load:0x3e8->OXM_OF_MPLS_LABEL[],load:0x7->OXM_OF_MPLS_TC[],CONTROLLER:65535
> >   cookie=0xd, n_packets=3, n_bytes=180, arp,dl_src=80:88:88:88:88:88
> > actions=load:0x2->NXM_OF_ARP_OP[],CONTROLLER:65535,load:0xc0a88001->NXM_OF_ARP_SPA[],CONTROLLER:65535,load:0x4041->NXM_NX_ARP_THA[],load:0x1010101->NXM_OF_ARP_SPA[],load:0x2020202->NXM_OF_ARP_TPA[],CONTROLLER:65535
> >
> > In other words, 5 packets instead of 3 are being recorded in a flow's
> > statistics.  I'm not sure what's going on.  Does anyone else have a clue
> > about this?  If not, I'll have to spend some more time looking closely
> > at stats.
> >
> > Thanks,
> >
> > Ben.
> > ___
> > dev mailing list
> > dev@openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev
> >
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] test 683 intermittently failing

2014-02-11 Thread Joe Stringer
I'm about to post a few stats duplication bugfixes, but it's hard to say
whether they fix this particular issue.


On 11 February 2014 13:14, Ben Pfaff  wrote:

> I've noticed that test 683 (ofproto-dpif - controller) fails
> intermittently for me.  The failure report is always something like
> this:
>
> ../../tests/ofproto-dpif.at:893: cat ofctl_monitor.log
> ../../tests/ofproto-dpif.at:922: ovs-ofctl dump-flows br0 | ofctl_strip |
> sort
> --- -   2014-02-11 12:45:41.139303984 -0800
> +++
> /root/openvswitch-2.1.90.33218/_debian/tests/testsuite.dir/at-groups/683/stdout
> 2014-02-11 12:45:41.0 -0800
> @@ -7,15 +7,15 @@
>   cookie=0x7, table=5, n_packets=3, n_bytes=218, in_port=84
> actions=load:0x5->NXM_NX_REG4[],load:0x6->NXM_NX_TUN_ID[],mod_nw_dst:84.84.84.84,CONTROLLER:65535,resubmit(85,6)
>   cookie=0x8, table=6, n_packets=3, n_bytes=218, in_port=85
> actions=mod_tp_src:85,CONTROLLER:65535,resubmit(86,7)
>   cookie=0x9, table=7, n_packets=3, n_bytes=218, in_port=86
> actions=mod_tp_dst:86,CONTROLLER:65535,CONTROLLER:65535
> - cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:41
> actions=mod_vlan_vid:99,mod_vlan_pcp:1,CONTROLLER:65535
> - cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:42
> actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],CONTROLLER:65535
> - cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:43
> actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],CONTROLLER:65535
>   cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:44
> actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],CONTROLLER:65535
>   cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:45
> actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],dec_mpls_ttl,CONTROLLER:65535
>   cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:46
> actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],set_mpls_ttl(10),CONTROLLER:65535
>   cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:47
> actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],dec_mpls_ttl,set_mpls_ttl(10),CONTROLLER:65535
>   cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:48
> actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],set_mpls_ttl(10),dec_mpls_ttl,CONTROLLER:65535
>   cookie=0xa, n_packets=3, n_bytes=180, dl_src=41:44:44:44:44:42
> actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],pop_mpls:0x0800,CONTROLLER:65535
> + cookie=0xa, n_packets=5, n_bytes=300, dl_src=40:44:44:44:44:41
> actions=mod_vlan_vid:99,mod_vlan_pcp:1,CONTROLLER:65535
> + cookie=0xa, n_packets=5, n_bytes=300, dl_src=40:44:44:44:44:42
> actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],CONTROLLER:65535
> + cookie=0xa, n_packets=5, n_bytes=300, dl_src=40:44:44:44:44:43
> actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],CONTROLLER:65535
>   cookie=0xb, n_packets=3, n_bytes=180, mpls,dl_src=50:55:55:55:55:55
> actions=load:0x3e8->OXM_OF_MPLS_LABEL[],CONTROLLER:65535
>   cookie=0xc, n_packets=3, n_bytes=180, dl_src=70:77:77:77:77:77
> actions=push_mpls:0x8848,load:0x3e8->OXM_OF_MPLS_LABEL[],load:0x7->OXM_OF_MPLS_TC[],CONTROLLER:65535
>   cookie=0xd, n_packets=3, n_bytes=180, arp,dl_src=80:88:88:88:88:88
> actions=load:0x2->NXM_OF_ARP_OP[],CONTROLLER:65535,load:0xc0a88001->NXM_OF_ARP_SPA[],CONTROLLER:65535,load:0x4041->NXM_NX_ARP_THA[],load:0x1010101->NXM_OF_ARP_SPA[],load:0x2020202->NXM_OF_ARP_TPA[],CONTROLLER:65535
>
> In other words, 5 packets instead of 3 are being recorded in a flow's
> statistics.  I'm not sure what's going on.  Does anyone else have a clue
> about this?  If not, I'll have to spend some more time looking closely
> at stats.
>
> Thanks,
>
> Ben.
> ___
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


[ovs-dev] test 683 intermittently failing

2014-02-11 Thread Ben Pfaff
I've noticed that test 683 (ofproto-dpif - controller) fails
intermittently for me.  The failure report is always something like
this:

../../tests/ofproto-dpif.at:893: cat ofctl_monitor.log
../../tests/ofproto-dpif.at:922: ovs-ofctl dump-flows br0 | ofctl_strip | sort
--- -   2014-02-11 12:45:41.139303984 -0800
+++ 
/root/openvswitch-2.1.90.33218/_debian/tests/testsuite.dir/at-groups/683/stdout 
2014-02-11 12:45:41.0 -0800
@@ -7,15 +7,15 @@
  cookie=0x7, table=5, n_packets=3, n_bytes=218, in_port=84 
actions=load:0x5->NXM_NX_REG4[],load:0x6->NXM_NX_TUN_ID[],mod_nw_dst:84.84.84.84,CONTROLLER:65535,resubmit(85,6)
  cookie=0x8, table=6, n_packets=3, n_bytes=218, in_port=85 
actions=mod_tp_src:85,CONTROLLER:65535,resubmit(86,7)
  cookie=0x9, table=7, n_packets=3, n_bytes=218, in_port=86 
actions=mod_tp_dst:86,CONTROLLER:65535,CONTROLLER:65535
- cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:41 
actions=mod_vlan_vid:99,mod_vlan_pcp:1,CONTROLLER:65535
- cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:42 
actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],CONTROLLER:65535
- cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:43 
actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],CONTROLLER:65535
  cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:44 
actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],CONTROLLER:65535
  cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:45 
actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],dec_mpls_ttl,CONTROLLER:65535
  cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:46 
actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],set_mpls_ttl(10),CONTROLLER:65535
  cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:47 
actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],dec_mpls_ttl,set_mpls_ttl(10),CONTROLLER:65535
  cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:48 
actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],set_mpls_ttl(10),dec_mpls_ttl,CONTROLLER:65535
  cookie=0xa, n_packets=3, n_bytes=180, dl_src=41:44:44:44:44:42 
actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],pop_mpls:0x0800,CONTROLLER:65535
+ cookie=0xa, n_packets=5, n_bytes=300, dl_src=40:44:44:44:44:41 
actions=mod_vlan_vid:99,mod_vlan_pcp:1,CONTROLLER:65535
+ cookie=0xa, n_packets=5, n_bytes=300, dl_src=40:44:44:44:44:42 
actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],CONTROLLER:65535
+ cookie=0xa, n_packets=5, n_bytes=300, dl_src=40:44:44:44:44:43 
actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[],load:0x3->OXM_OF_MPLS_TC[],CONTROLLER:65535
  cookie=0xb, n_packets=3, n_bytes=180, mpls,dl_src=50:55:55:55:55:55 
actions=load:0x3e8->OXM_OF_MPLS_LABEL[],CONTROLLER:65535
  cookie=0xc, n_packets=3, n_bytes=180, dl_src=70:77:77:77:77:77 
actions=push_mpls:0x8848,load:0x3e8->OXM_OF_MPLS_LABEL[],load:0x7->OXM_OF_MPLS_TC[],CONTROLLER:65535
  cookie=0xd, n_packets=3, n_bytes=180, arp,dl_src=80:88:88:88:88:88 
actions=load:0x2->NXM_OF_ARP_OP[],CONTROLLER:65535,load:0xc0a88001->NXM_OF_ARP_SPA[],CONTROLLER:65535,load:0x4041->NXM_NX_ARP_THA[],load:0x1010101->NXM_OF_ARP_SPA[],load:0x2020202->NXM_OF_ARP_TPA[],CONTROLLER:65535

In other words, 5 packets instead of 3 are being recorded in a flow's
statistics.  I'm not sure what's going on.  Does anyone else have a clue
about this?  If not, I'll have to spend some more time looking closely
at stats.

Thanks,

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


[ovs-dev] test

2013-03-17 Thread Damien Millescamps
please diregard
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [test log scan v2 6/6] ofproto-macros: Fail a test that logs a WARN or higher level message.

2013-02-11 Thread Ben Pfaff
Thanks, I applied these six patches to master.

(I wonder if I'll have to send out a bunch of bugfixes following build
failures now?  We'll see.)

On Tue, Feb 05, 2013 at 01:08:50PM -0800, Ethan Jackson wrote:
> Looks like a massive win to me.
> 
> Acked-by: Ethan Jackson 
> 
> On Fri, Feb 1, 2013 at 10:48 AM, Ben Pfaff  wrote:
> > It is necessary to whitelist a couple of tests that appear to legitimately
> > have WARN messages.
> >
> > Signed-off-by: Ben Pfaff 
> > ---
> >  tests/ofproto-macros.at |   20 +++-
> >  tests/tunnel.at |4 ++--
> >  2 files changed, 21 insertions(+), 3 deletions(-)
> >
> > diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at
> > index b9356d3..9a6d5ab 100644
> > --- a/tests/ofproto-macros.at
> > +++ b/tests/ofproto-macros.at
> > @@ -64,8 +64,26 @@ m4_define([OVS_VSWITCHD_START],
> > AT_CHECK([ovs-vsctl -- add-br br0 -- set bridge br0 datapath-type=dummy 
> > other-config:datapath-id=fedcba9876543210 
> > other-config:hwaddr=aa:55:aa:55:00:00 
> > protocols=[[OpenFlow10,OpenFlow12,OpenFlow13]] fail-mode=secure -- $1 
> > m4_if([$2], [], [], [| perl $srcdir/uuidfilt.pl])], [0], [$2])
> >  ])
> >
> > +m4_divert_push([PREPARE_TESTS])
> > +check_logs () {
> > +sed -n "$1
> > +/|WARN|/p
> > +/|ERR|/p
> > +/|EMER|/p" ovs-vswitchd.log ovsdb-server.log
> > +}
> > +m4_divert_pop([PREPARE_TESTS])
> > +
> > +# OVS_VSWITCHD_STOP([WHITELIST])
> > +#
> > +# Gracefully stops ovs-vswitchd and ovsdb-server, checking their log files
> > +# for messages with severity WARN or higher and signaling an error if any
> > +# is present.  The optional WHITELIST may contain shell-quoted "sed"
> > +# commands to delete any warnings that are actually expected, e.g.:
> > +#
> > +#   OVS_VSWITCHD_STOP(["/expected error/d"])
> >  m4_define([OVS_VSWITCHD_STOP],
> > -  [AT_CHECK([ovs-appctl -t ovs-vswitchd exit])
> > +  [AT_CHECK([check_logs $1])
> > +   AT_CHECK([ovs-appctl -t ovs-vswitchd exit])
> > AT_CHECK([ovs-appctl -t ovsdb-server exit])])
> >
> >  # ADD_OF_PORTS(BRIDGE, OF_PORT[, OF_PORT...])
> > diff --git a/tests/tunnel.at b/tests/tunnel.at
> > index c708b30..55fd5b3 100644
> > --- a/tests/tunnel.at
> > +++ b/tests/tunnel.at
> > @@ -64,7 +64,7 @@ Invalid flow
> >  ovs-appctl: ovs-vswitchd: server returned an error
> >  ])
> >
> > -OVS_VSWITCHD_STOP
> > +OVS_VSWITCHD_STOP(["/receive tunnel port not found/d"])
> >  AT_CLEANUP
> >
> >  AT_SETUP([tunnel - ECN decapsulation])
> > @@ -256,7 +256,7 @@ AT_CHECK([ovs-appctl ofproto/trace br0 
> > 'tunnel(tun_id=0xf,src=1.1.1.1,dst=2.2.2.
> >  Invalid flow
> >  ovs-appctl: ovs-vswitchd: server returned an error
> >  ])
> > -OVS_VSWITCHD_STOP
> > +OVS_VSWITCHD_STOP(["/receive tunnel port not found/d"])
> >  AT_CLEANUP
> >
> >  AT_SETUP([tunnel - key match])
> > --
> > 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


Re: [ovs-dev] [test log scan v2 6/6] ofproto-macros: Fail a test that logs a WARN or higher level message.

2013-02-05 Thread Ethan Jackson
Looks like a massive win to me.

Acked-by: Ethan Jackson 

On Fri, Feb 1, 2013 at 10:48 AM, Ben Pfaff  wrote:
> It is necessary to whitelist a couple of tests that appear to legitimately
> have WARN messages.
>
> Signed-off-by: Ben Pfaff 
> ---
>  tests/ofproto-macros.at |   20 +++-
>  tests/tunnel.at |4 ++--
>  2 files changed, 21 insertions(+), 3 deletions(-)
>
> diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at
> index b9356d3..9a6d5ab 100644
> --- a/tests/ofproto-macros.at
> +++ b/tests/ofproto-macros.at
> @@ -64,8 +64,26 @@ m4_define([OVS_VSWITCHD_START],
> AT_CHECK([ovs-vsctl -- add-br br0 -- set bridge br0 datapath-type=dummy 
> other-config:datapath-id=fedcba9876543210 
> other-config:hwaddr=aa:55:aa:55:00:00 
> protocols=[[OpenFlow10,OpenFlow12,OpenFlow13]] fail-mode=secure -- $1 
> m4_if([$2], [], [], [| perl $srcdir/uuidfilt.pl])], [0], [$2])
>  ])
>
> +m4_divert_push([PREPARE_TESTS])
> +check_logs () {
> +sed -n "$1
> +/|WARN|/p
> +/|ERR|/p
> +/|EMER|/p" ovs-vswitchd.log ovsdb-server.log
> +}
> +m4_divert_pop([PREPARE_TESTS])
> +
> +# OVS_VSWITCHD_STOP([WHITELIST])
> +#
> +# Gracefully stops ovs-vswitchd and ovsdb-server, checking their log files
> +# for messages with severity WARN or higher and signaling an error if any
> +# is present.  The optional WHITELIST may contain shell-quoted "sed"
> +# commands to delete any warnings that are actually expected, e.g.:
> +#
> +#   OVS_VSWITCHD_STOP(["/expected error/d"])
>  m4_define([OVS_VSWITCHD_STOP],
> -  [AT_CHECK([ovs-appctl -t ovs-vswitchd exit])
> +  [AT_CHECK([check_logs $1])
> +   AT_CHECK([ovs-appctl -t ovs-vswitchd exit])
> AT_CHECK([ovs-appctl -t ovsdb-server exit])])
>
>  # ADD_OF_PORTS(BRIDGE, OF_PORT[, OF_PORT...])
> diff --git a/tests/tunnel.at b/tests/tunnel.at
> index c708b30..55fd5b3 100644
> --- a/tests/tunnel.at
> +++ b/tests/tunnel.at
> @@ -64,7 +64,7 @@ Invalid flow
>  ovs-appctl: ovs-vswitchd: server returned an error
>  ])
>
> -OVS_VSWITCHD_STOP
> +OVS_VSWITCHD_STOP(["/receive tunnel port not found/d"])
>  AT_CLEANUP
>
>  AT_SETUP([tunnel - ECN decapsulation])
> @@ -256,7 +256,7 @@ AT_CHECK([ovs-appctl ofproto/trace br0 
> 'tunnel(tun_id=0xf,src=1.1.1.1,dst=2.2.2.
>  Invalid flow
>  ovs-appctl: ovs-vswitchd: server returned an error
>  ])
> -OVS_VSWITCHD_STOP
> +OVS_VSWITCHD_STOP(["/receive tunnel port not found/d"])
>  AT_CLEANUP
>
>  AT_SETUP([tunnel - key match])
> --
> 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


Re: [ovs-dev] [test log scan v2 5/6] timeval: Don't issue poll interval warnings when we warp time.

2013-02-05 Thread Ethan Jackson
Acked-by: Ethan Jackson 

On Fri, Feb 1, 2013 at 10:48 AM, Ben Pfaff  wrote:
> It's not meaningful in that case.
>
> Signed-off-by: Ben Pfaff 
> ---
>  lib/timeval.c |4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/timeval.c b/lib/timeval.c
> index d91305c..4ffb756 100644
> --- a/lib/timeval.c
> +++ b/lib/timeval.c
> @@ -1,5 +1,5 @@
>  /*
> - * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira, Inc.
> + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
>   *
>   * Licensed under the Apache License, Version 2.0 (the "License");
>   * you may not use this file except in compliance with the License.
> @@ -516,7 +516,7 @@ log_poll_interval(long long int last_wakeup)
>  {
>  long long int interval = time_msec() - last_wakeup;
>
> -if (interval >= 1000) {
> +if (interval >= 1000 && !warp_offset.tv_sec && !warp_offset.tv_nsec) {
>  const struct rusage *last_rusage = get_recent_rusage();
>  struct rusage rusage;
>
> --
> 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


Re: [ovs-dev] [test log scan v2 4/6] tests: Set explicit bond mode in LACP test.

2013-02-05 Thread Ethan Jackson
This seems fine to me.  The default bond mode has been active-backup
for quite a while, so it may simply make sense to remove this warning
in the post 1.10 release.

Acked-by: Ethan Jackson 

On Fri, Feb 1, 2013 at 10:48 AM, Ben Pfaff  wrote:
> This avoids a log warning:
>
> bridge|WARN|port bond: Using the default bond_mode active-backup.
> Note that in previous versions, the default bond_mode was balance-slb
>
> This warning is harmless, but I'm trying to add checks for "warn" and
> higher severity log messages to the tests, so it makes sense to get rid of
> this one.
>
> Signed-off-by: Ben Pfaff 
> ---
>  tests/lacp.at |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tests/lacp.at b/tests/lacp.at
> index 408b1ec..49f3bb1 100644
> --- a/tests/lacp.at
> +++ b/tests/lacp.at
> @@ -40,7 +40,7 @@ AT_CLEANUP
>  AT_SETUP([lacp - multi port config])
>  OVS_VSWITCHD_START([dnl
>  add-bond br0 bond p1 p2 --\
> -set Port bond lacp=active \
> +set Port bond lacp=active bond-mode=active-backup \
>  other_config:lacp-time="fast" \
>  other_config:lacp-system-id=11:22:33:44:55:66 \
>  other_config:lacp-system-priority=54321 --\
> --
> 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


Re: [ovs-dev] [test log scan v2 3/6] bond: Reduce log level from WARN to INFO for interface status updates.

2013-02-05 Thread Ethan Jackson
Acked-by: Ethan Jackson 

On Fri, Feb 1, 2013 at 10:48 AM, Ben Pfaff  wrote:
> An interface coming up or going down isn't a big deal.
>
> Signed-off-by: Ben Pfaff 
> ---
>  lib/bond.c |6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/lib/bond.c b/lib/bond.c
> index 06680ee..2e151eb 100644
> --- a/lib/bond.c
> +++ b/lib/bond.c
> @@ -1302,12 +1302,12 @@ bond_enable_slave(struct bond_slave *slave, bool 
> enable, struct tag_set *tags)
>  if (enable != slave->enabled) {
>  slave->enabled = enable;
>  if (!slave->enabled) {
> -VLOG_WARN("interface %s: disabled", slave->name);
> +VLOG_INFO("interface %s: disabled", slave->name);
>  if (tags) {
>  tag_set_add(tags, slave->tag);
>  }
>  } else {
> -VLOG_WARN("interface %s: enabled", slave->name);
> +VLOG_INFO("interface %s: enabled", slave->name);
>  slave->tag = tag_create_random();
>  }
>
> @@ -1512,7 +1512,7 @@ bond_choose_active_slave(struct bond *bond, struct 
> tag_set *tags)
>
>  bond->send_learning_packets = true;
>  } else if (old_active_slave) {
> -VLOG_WARN_RL(&rl, "bond %s: all interfaces disabled", bond->name);
> +VLOG_INFO_RL(&rl, "bond %s: all interfaces disabled", bond->name);
>  }
>  }
>
> --
> 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


Re: [ovs-dev] [test log scan v2 2/6] poll-loop: Reduce high-CPU log messages from WARN to INFO.

2013-02-05 Thread Ethan Jackson
This has annoyed me for a while, thanks.

Acked-by: Ethan Jackson 

On Fri, Feb 1, 2013 at 10:48 AM, Ben Pfaff  wrote:
> These can happen occasionally in normal circumstances.
>
> Signed-off-by: Ben Pfaff 
> ---
>  lib/poll-loop.c |4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/poll-loop.c b/lib/poll-loop.c
> index fca1dfa..9855306 100644
> --- a/lib/poll-loop.c
> +++ b/lib/poll-loop.c
> @@ -165,8 +165,8 @@ log_wakeup(const char *where, const struct pollfd 
> *pollfd, int timeout)
>  cpu_usage = get_cpu_usage();
>  if (VLOG_IS_DBG_ENABLED()) {
>  level = VLL_DBG;
> -} else if (cpu_usage > 50 && !VLOG_DROP_WARN(&rl)) {
> -level = VLL_WARN;
> +} else if (cpu_usage > 50 && !VLOG_DROP_INFO(&rl)) {
> +level = VLL_INFO;
>  } else {
>  return;
>  }
> --
> 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


Re: [ovs-dev] [test log scan v2 1/6] tests: Fix error path in netflow test.

2013-02-05 Thread Ethan Jackson
Acked-by: Ethan Jackson 

On Fri, Feb 1, 2013 at 10:48 AM, Ben Pfaff  wrote:
> Otherwise, if the test bails out before finishing, the test-netflow daemon
> doesn't get killed and the test hangs.
>
> Signed-off-by: Ben Pfaff 
> ---
>  tests/ofproto-dpif.at |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
> index 3eec947..f007381 100644
> --- a/tests/ofproto-dpif.at
> +++ b/tests/ofproto-dpif.at
> @@ -1010,7 +1010,7 @@ ovs-vsctl \
> --id=@nf create NetFlow targets=\"127.0.0.1:$NETFLOW_PORT\" \
>   engine_id=1 engine_type=2 active_timeout=10 add-id-to-interface=false
>
> -ON_EXIT([kill `test-netflow.pid`])
> +ON_EXIT([kill `cat test-netflow.pid`])
>  AT_CHECK([test-netflow --detach --no-chdir --pidfile $NETFLOW_PORT:127.0.0.1 
> > netflow.log])AT_CAPTURE_FILE([netflow.log])
>
>  AT_CHECK([ovs-appctl time/stop])
> --
> 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


[ovs-dev] [test log scan v2 5/6] timeval: Don't issue poll interval warnings when we warp time.

2013-02-01 Thread Ben Pfaff
It's not meaningful in that case.

Signed-off-by: Ben Pfaff 
---
 lib/timeval.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/timeval.c b/lib/timeval.c
index d91305c..4ffb756 100644
--- a/lib/timeval.c
+++ b/lib/timeval.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira, Inc.
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -516,7 +516,7 @@ log_poll_interval(long long int last_wakeup)
 {
 long long int interval = time_msec() - last_wakeup;
 
-if (interval >= 1000) {
+if (interval >= 1000 && !warp_offset.tv_sec && !warp_offset.tv_nsec) {
 const struct rusage *last_rusage = get_recent_rusage();
 struct rusage rusage;
 
-- 
1.7.2.5

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


[ovs-dev] [test log scan v2 6/6] ofproto-macros: Fail a test that logs a WARN or higher level message.

2013-02-01 Thread Ben Pfaff
It is necessary to whitelist a couple of tests that appear to legitimately
have WARN messages.

Signed-off-by: Ben Pfaff 
---
 tests/ofproto-macros.at |   20 +++-
 tests/tunnel.at |4 ++--
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at
index b9356d3..9a6d5ab 100644
--- a/tests/ofproto-macros.at
+++ b/tests/ofproto-macros.at
@@ -64,8 +64,26 @@ m4_define([OVS_VSWITCHD_START],
AT_CHECK([ovs-vsctl -- add-br br0 -- set bridge br0 datapath-type=dummy 
other-config:datapath-id=fedcba9876543210 other-config:hwaddr=aa:55:aa:55:00:00 
protocols=[[OpenFlow10,OpenFlow12,OpenFlow13]] fail-mode=secure -- $1 
m4_if([$2], [], [], [| perl $srcdir/uuidfilt.pl])], [0], [$2])
 ])
 
+m4_divert_push([PREPARE_TESTS])
+check_logs () {
+sed -n "$1
+/|WARN|/p
+/|ERR|/p
+/|EMER|/p" ovs-vswitchd.log ovsdb-server.log
+}
+m4_divert_pop([PREPARE_TESTS])
+
+# OVS_VSWITCHD_STOP([WHITELIST])
+#
+# Gracefully stops ovs-vswitchd and ovsdb-server, checking their log files
+# for messages with severity WARN or higher and signaling an error if any
+# is present.  The optional WHITELIST may contain shell-quoted "sed"
+# commands to delete any warnings that are actually expected, e.g.:
+#
+#   OVS_VSWITCHD_STOP(["/expected error/d"])
 m4_define([OVS_VSWITCHD_STOP],
-  [AT_CHECK([ovs-appctl -t ovs-vswitchd exit])
+  [AT_CHECK([check_logs $1])
+   AT_CHECK([ovs-appctl -t ovs-vswitchd exit])
AT_CHECK([ovs-appctl -t ovsdb-server exit])])
 
 # ADD_OF_PORTS(BRIDGE, OF_PORT[, OF_PORT...])
diff --git a/tests/tunnel.at b/tests/tunnel.at
index c708b30..55fd5b3 100644
--- a/tests/tunnel.at
+++ b/tests/tunnel.at
@@ -64,7 +64,7 @@ Invalid flow
 ovs-appctl: ovs-vswitchd: server returned an error
 ])
 
-OVS_VSWITCHD_STOP
+OVS_VSWITCHD_STOP(["/receive tunnel port not found/d"])
 AT_CLEANUP
 
 AT_SETUP([tunnel - ECN decapsulation])
@@ -256,7 +256,7 @@ AT_CHECK([ovs-appctl ofproto/trace br0 
'tunnel(tun_id=0xf,src=1.1.1.1,dst=2.2.2.
 Invalid flow
 ovs-appctl: ovs-vswitchd: server returned an error
 ])
-OVS_VSWITCHD_STOP
+OVS_VSWITCHD_STOP(["/receive tunnel port not found/d"])
 AT_CLEANUP
 
 AT_SETUP([tunnel - key match])
-- 
1.7.2.5

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


[ovs-dev] [test log scan v2 3/6] bond: Reduce log level from WARN to INFO for interface status updates.

2013-02-01 Thread Ben Pfaff
An interface coming up or going down isn't a big deal.

Signed-off-by: Ben Pfaff 
---
 lib/bond.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/bond.c b/lib/bond.c
index 06680ee..2e151eb 100644
--- a/lib/bond.c
+++ b/lib/bond.c
@@ -1302,12 +1302,12 @@ bond_enable_slave(struct bond_slave *slave, bool 
enable, struct tag_set *tags)
 if (enable != slave->enabled) {
 slave->enabled = enable;
 if (!slave->enabled) {
-VLOG_WARN("interface %s: disabled", slave->name);
+VLOG_INFO("interface %s: disabled", slave->name);
 if (tags) {
 tag_set_add(tags, slave->tag);
 }
 } else {
-VLOG_WARN("interface %s: enabled", slave->name);
+VLOG_INFO("interface %s: enabled", slave->name);
 slave->tag = tag_create_random();
 }
 
@@ -1512,7 +1512,7 @@ bond_choose_active_slave(struct bond *bond, struct 
tag_set *tags)
 
 bond->send_learning_packets = true;
 } else if (old_active_slave) {
-VLOG_WARN_RL(&rl, "bond %s: all interfaces disabled", bond->name);
+VLOG_INFO_RL(&rl, "bond %s: all interfaces disabled", bond->name);
 }
 }
 
-- 
1.7.2.5

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


[ovs-dev] [test log scan v2 4/6] tests: Set explicit bond mode in LACP test.

2013-02-01 Thread Ben Pfaff
This avoids a log warning:

bridge|WARN|port bond: Using the default bond_mode active-backup.
Note that in previous versions, the default bond_mode was balance-slb

This warning is harmless, but I'm trying to add checks for "warn" and
higher severity log messages to the tests, so it makes sense to get rid of
this one.

Signed-off-by: Ben Pfaff 
---
 tests/lacp.at |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tests/lacp.at b/tests/lacp.at
index 408b1ec..49f3bb1 100644
--- a/tests/lacp.at
+++ b/tests/lacp.at
@@ -40,7 +40,7 @@ AT_CLEANUP
 AT_SETUP([lacp - multi port config])
 OVS_VSWITCHD_START([dnl
 add-bond br0 bond p1 p2 --\
-set Port bond lacp=active \
+set Port bond lacp=active bond-mode=active-backup \
 other_config:lacp-time="fast" \
 other_config:lacp-system-id=11:22:33:44:55:66 \
 other_config:lacp-system-priority=54321 --\
-- 
1.7.2.5

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


[ovs-dev] [test log scan v2 2/6] poll-loop: Reduce high-CPU log messages from WARN to INFO.

2013-02-01 Thread Ben Pfaff
These can happen occasionally in normal circumstances.

Signed-off-by: Ben Pfaff 
---
 lib/poll-loop.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/poll-loop.c b/lib/poll-loop.c
index fca1dfa..9855306 100644
--- a/lib/poll-loop.c
+++ b/lib/poll-loop.c
@@ -165,8 +165,8 @@ log_wakeup(const char *where, const struct pollfd *pollfd, 
int timeout)
 cpu_usage = get_cpu_usage();
 if (VLOG_IS_DBG_ENABLED()) {
 level = VLL_DBG;
-} else if (cpu_usage > 50 && !VLOG_DROP_WARN(&rl)) {
-level = VLL_WARN;
+} else if (cpu_usage > 50 && !VLOG_DROP_INFO(&rl)) {
+level = VLL_INFO;
 } else {
 return;
 }
-- 
1.7.2.5

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


[ovs-dev] [test log scan v2 0/6] fail tests that log errors

2013-02-01 Thread Ben Pfaff
This is the second version of a patch series that I originally
sent out on Aug. 17, 2012.  The first version only attracted a
review for the first patch.

Ben Pfaff (6):
  tests: Fix error path in netflow test.
  poll-loop: Reduce high-CPU log messages from WARN to INFO.
  bond: Reduce log level from WARN to INFO for interface status
updates.
  tests: Set explicit bond mode in LACP test.
  timeval: Don't issue poll interval warnings when we warp time.
  ofproto-macros: Fail a test that logs a WARN or higher level message.

 lib/bond.c  |6 +++---
 lib/poll-loop.c |4 ++--
 lib/timeval.c   |4 ++--
 tests/lacp.at   |2 +-
 tests/ofproto-dpif.at   |2 +-
 tests/ofproto-macros.at |   20 +++-
 tests/tunnel.at |4 ++--
 7 files changed, 30 insertions(+), 12 deletions(-)

-- 
1.7.2.5

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


[ovs-dev] [test log scan v2 1/6] tests: Fix error path in netflow test.

2013-02-01 Thread Ben Pfaff
Otherwise, if the test bails out before finishing, the test-netflow daemon
doesn't get killed and the test hangs.

Signed-off-by: Ben Pfaff 
---
 tests/ofproto-dpif.at |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
index 3eec947..f007381 100644
--- a/tests/ofproto-dpif.at
+++ b/tests/ofproto-dpif.at
@@ -1010,7 +1010,7 @@ ovs-vsctl \
--id=@nf create NetFlow targets=\"127.0.0.1:$NETFLOW_PORT\" \
  engine_id=1 engine_type=2 active_timeout=10 add-id-to-interface=false
 
-ON_EXIT([kill `test-netflow.pid`])
+ON_EXIT([kill `cat test-netflow.pid`])
 AT_CHECK([test-netflow --detach --no-chdir --pidfile $NETFLOW_PORT:127.0.0.1 > 
netflow.log])AT_CAPTURE_FILE([netflow.log])
 
 AT_CHECK([ovs-appctl time/stop])
-- 
1.7.2.5

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


Re: [ovs-dev] [test log scan 1/5] netlink-socket: Don't bother logging SO_RCVBUFFORCE failure as non-root.

2013-02-01 Thread Ben Pfaff
I applied this to master.

On Fri, Aug 17, 2012 at 06:21:29PM -0700, Ethan Jackson wrote:
> Looks good, thanks.
> 
> Ethan
> 
> On Fri, Aug 17, 2012 at 4:34 PM, Ben Pfaff  wrote:
> > Some Open vSwitch utilities can do useful work when they are not run as
> > root.  Without this commit, these utilities will log a warning on failure
> > to use the SO_RCVBUFFORCE socket option if they open any Netlink sockets.
> > This will always happen, it does not report anything unexpected or
> > fixable as non-root, and sometimes it makes users wonder if something is
> > wrong, so there is no benefit to logging it.  This commit drops it in that
> > case.
> >
> > Signed-off-by: Ben Pfaff 
> > ---
> >  lib/netlink-socket.c |8 ++--
> >  1 files changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c
> > index 49a8493..5ab27a7 100644
> > --- a/lib/netlink-socket.c
> > +++ b/lib/netlink-socket.c
> > @@ -129,8 +129,12 @@ nl_sock_create(int protocol, struct nl_sock **sockp)
> >  rcvbuf = 1024 * 1024;
> >  if (setsockopt(sock->fd, SOL_SOCKET, SO_RCVBUFFORCE,
> > &rcvbuf, sizeof rcvbuf)) {
> > -VLOG_WARN_RL(&rl, "setting %d-byte socket receive buffer failed 
> > (%s)",
> > - rcvbuf, strerror(errno));
> > +/* Only root can use SO_RCVBUFFORCE.  Everyone else gets EPERM.
> > + * Warn only if the failure is therefore unexpected. */
> > +if (errno != EPERM || !getuid()) {
> > +VLOG_WARN_RL(&rl, "setting %d-byte socket receive buffer 
> > failed "
> > + "(%s)", rcvbuf, strerror(errno));
> > +}
> >  }
> >
> >  retval = get_socket_rcvbuf(sock->fd);
> > --
> > 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


Re: [ovs-dev] [test log scan 3/5] bridge: Drop warning about the default bridge Ethernet address.

2012-11-29 Thread Ben Pfaff
On Fri, Aug 17, 2012 at 04:34:57PM -0700, Ben Pfaff wrote:
> This information is also available via ovs-ofctl and through other means,
> and it's not really anything we need to warn about anyhow.
> 
> Signed-off-by: Ben Pfaff 

This patch was committed as part of a series posted later, so it no
longer needs review.
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [test log scan 1/5] netlink-socket: Don't bother logging SO_RCVBUFFORCE failure as non-root.

2012-08-17 Thread Ethan Jackson
Looks good, thanks.

Ethan

On Fri, Aug 17, 2012 at 4:34 PM, Ben Pfaff  wrote:
> Some Open vSwitch utilities can do useful work when they are not run as
> root.  Without this commit, these utilities will log a warning on failure
> to use the SO_RCVBUFFORCE socket option if they open any Netlink sockets.
> This will always happen, it does not report anything unexpected or
> fixable as non-root, and sometimes it makes users wonder if something is
> wrong, so there is no benefit to logging it.  This commit drops it in that
> case.
>
> Signed-off-by: Ben Pfaff 
> ---
>  lib/netlink-socket.c |8 ++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c
> index 49a8493..5ab27a7 100644
> --- a/lib/netlink-socket.c
> +++ b/lib/netlink-socket.c
> @@ -129,8 +129,12 @@ nl_sock_create(int protocol, struct nl_sock **sockp)
>  rcvbuf = 1024 * 1024;
>  if (setsockopt(sock->fd, SOL_SOCKET, SO_RCVBUFFORCE,
> &rcvbuf, sizeof rcvbuf)) {
> -VLOG_WARN_RL(&rl, "setting %d-byte socket receive buffer failed 
> (%s)",
> - rcvbuf, strerror(errno));
> +/* Only root can use SO_RCVBUFFORCE.  Everyone else gets EPERM.
> + * Warn only if the failure is therefore unexpected. */
> +if (errno != EPERM || !getuid()) {
> +VLOG_WARN_RL(&rl, "setting %d-byte socket receive buffer failed "
> + "(%s)", rcvbuf, strerror(errno));
> +}
>  }
>
>  retval = get_socket_rcvbuf(sock->fd);
> --
> 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


[ovs-dev] [test log scan 5/5] ofproto-macros: Fail a test that logs a WARN or higher level message.

2012-08-17 Thread Ben Pfaff
Signed-off-by: Ben Pfaff 
---
 tests/ofproto-macros.at |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at
index 944fbac..b10ff50 100644
--- a/tests/ofproto-macros.at
+++ b/tests/ofproto-macros.at
@@ -64,6 +64,11 @@ m4_define([OVS_VSWITCHD_START],
 ])
 
 m4_define([OVS_VSWITCHD_STOP],
-  [AT_CHECK([ovs-appctl -t ovs-vswitchd exit])
+  [dnl Report a failure if a message at WARN level or higher was logged.
+   AT_CHECK([sed -n '/|WARN|/p
+/|ERR|/p
+/|EMER|/p' ovs-vswitchd.log ovsdb-server.log])
+
+   AT_CHECK([ovs-appctl -t ovs-vswitchd exit])
AT_CHECK([ovs-appctl -t ovsdb-server exit])
trap '' 0])
-- 
1.7.2.5

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


[ovs-dev] [test log scan 4/5] timeval: Reduce poll interval "warn"s to "info"s.

2012-08-17 Thread Ben Pfaff
These messages rarely report bugs any longer, but they are still useful
occasionally for debugging, so this commit reduces their severity without
deleting them.

It might make sense to increase the threshold for printing these.

Signed-off-by: Ben Pfaff 
---
 lib/timeval.c |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/timeval.c b/lib/timeval.c
index 3d339e4..0fd185e 100644
--- a/lib/timeval.c
+++ b/lib/timeval.c
@@ -487,12 +487,12 @@ log_poll_interval(long long int last_wakeup)
 if (n_samples > 10 && interval > mean_interval * 8 && interval > 50 * 16) {
 static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 3);
 
-if (!VLOG_DROP_WARN(&rl)) {
+if (!VLOG_DROP_INFO(&rl)) {
 const struct rusage *last_rusage = get_recent_rusage();
 struct rusage rusage;
 
 getrusage(RUSAGE_SELF, &rusage);
-VLOG_WARN("%lld ms poll interval (%lld ms user, %lld ms system) "
+VLOG_INFO("%lld ms poll interval (%lld ms user, %lld ms system) "
   "is over %u times the weighted mean interval %u ms "
   "(%u samples)",
   now - last_wakeup,
@@ -504,19 +504,19 @@ log_poll_interval(long long int last_wakeup)
   (mean_interval + 8) / 16, n_samples);
 if (rusage.ru_minflt > last_rusage->ru_minflt
 || rusage.ru_majflt > last_rusage->ru_majflt) {
-VLOG_WARN("faults: %ld minor, %ld major",
+VLOG_INFO("faults: %ld minor, %ld major",
   rusage.ru_minflt - last_rusage->ru_minflt,
   rusage.ru_majflt - last_rusage->ru_majflt);
 }
 if (rusage.ru_inblock > last_rusage->ru_inblock
 || rusage.ru_oublock > last_rusage->ru_oublock) {
-VLOG_WARN("disk: %ld reads, %ld writes",
+VLOG_INFO("disk: %ld reads, %ld writes",
   rusage.ru_inblock - last_rusage->ru_inblock,
   rusage.ru_oublock - last_rusage->ru_oublock);
 }
 if (rusage.ru_nvcsw > last_rusage->ru_nvcsw
 || rusage.ru_nivcsw > last_rusage->ru_nivcsw) {
-VLOG_WARN("context switches: %ld voluntary, %ld involuntary",
+VLOG_INFO("context switches: %ld voluntary, %ld involuntary",
   rusage.ru_nvcsw - last_rusage->ru_nvcsw,
   rusage.ru_nivcsw - last_rusage->ru_nivcsw);
 }
-- 
1.7.2.5

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


[ovs-dev] [test log scan 3/5] bridge: Drop warning about the default bridge Ethernet address.

2012-08-17 Thread Ben Pfaff
This information is also available via ovs-ofctl and through other means,
and it's not really anything we need to warn about anyhow.

Signed-off-by: Ben Pfaff 
---
 vswitchd/bridge.c |   10 --
 1 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index bd8e772..15613b7 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -1544,16 +1544,6 @@ bridge_pick_local_hw_addr(struct bridge *br, uint8_t 
ea[ETH_ADDR_LEN],
 found_addr = true;
 }
 }
-if (found_addr) {
-VLOG_DBG("bridge %s: using bridge Ethernet address "ETH_ADDR_FMT,
- br->name, ETH_ADDR_ARGS(ea));
-} else {
-static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 10);
-memcpy(ea, br->default_ea, ETH_ADDR_LEN);
-*hw_addr_iface = NULL;
-VLOG_WARN_RL(&rl, "bridge %s: using default bridge Ethernet "
- "address "ETH_ADDR_FMT, br->name, ETH_ADDR_ARGS(ea));
-}
 
 hmapx_destroy(&mirror_output_ports);
 }
-- 
1.7.2.5

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


[ovs-dev] [test log scan 2/5] tests: Set explicit bond mode in LACP test.

2012-08-17 Thread Ben Pfaff
This avoids a log warning:

bridge|WARN|port bond: Using the default bond_mode active-backup.
Note that in previous versions, the default bond_mode was balance-slb

This warning is harmless, but I'm trying to add checks for "warn" and
higher severity log messages to the tests, so it makes sense to get rid of
this one.

Signed-off-by: Ben Pfaff 
---
 tests/lacp.at |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tests/lacp.at b/tests/lacp.at
index 7d96143..d473d70 100644
--- a/tests/lacp.at
+++ b/tests/lacp.at
@@ -40,7 +40,7 @@ AT_CLEANUP
 AT_SETUP([lacp - multi port config])
 OVS_VSWITCHD_START([dnl
 add-bond br0 bond p1 p2 --\
-set Port bond lacp=active \
+set Port bond lacp=active bond-mode=active-backup \
 other_config:lacp-time="fast" \
 other_config:lacp-system-id=11:22:33:44:55:66 \
 other_config:lacp-system-priority=54321 --\
-- 
1.7.2.5

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


[ovs-dev] [test log scan 1/5] netlink-socket: Don't bother logging SO_RCVBUFFORCE failure as non-root.

2012-08-17 Thread Ben Pfaff
Some Open vSwitch utilities can do useful work when they are not run as
root.  Without this commit, these utilities will log a warning on failure
to use the SO_RCVBUFFORCE socket option if they open any Netlink sockets.
This will always happen, it does not report anything unexpected or
fixable as non-root, and sometimes it makes users wonder if something is
wrong, so there is no benefit to logging it.  This commit drops it in that
case.

Signed-off-by: Ben Pfaff 
---
 lib/netlink-socket.c |8 ++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c
index 49a8493..5ab27a7 100644
--- a/lib/netlink-socket.c
+++ b/lib/netlink-socket.c
@@ -129,8 +129,12 @@ nl_sock_create(int protocol, struct nl_sock **sockp)
 rcvbuf = 1024 * 1024;
 if (setsockopt(sock->fd, SOL_SOCKET, SO_RCVBUFFORCE,
&rcvbuf, sizeof rcvbuf)) {
-VLOG_WARN_RL(&rl, "setting %d-byte socket receive buffer failed (%s)",
- rcvbuf, strerror(errno));
+/* Only root can use SO_RCVBUFFORCE.  Everyone else gets EPERM.
+ * Warn only if the failure is therefore unexpected. */
+if (errno != EPERM || !getuid()) {
+VLOG_WARN_RL(&rl, "setting %d-byte socket receive buffer failed "
+ "(%s)", rcvbuf, strerror(errno));
+}
 }
 
 retval = get_socket_rcvbuf(sock->fd);
-- 
1.7.2.5

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


[ovs-dev] test

2012-04-03 Thread dcoo...@nicira.com

test again

--
Thanks,


Duffie Cooley
Sr. Tech Ops Engineer
Nicira Networks

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


[ovs-dev] test email.

2012-04-03 Thread dev
Please ignore this email. I am taking a look at an email headers issue 
that was reported.


--
Thanks,


Duffie Cooley
Sr. Tech Ops Engineer
Nicira Networks

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


[ovs-dev] test to dev_openvswitch....@openvswitch.com

2011-02-18 Thread Paul


from paulc's yahoo.com


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