On 08/17/2017 10:54 PM, Sam wrote:
> Could I use regular match in AT_CHECK? Like this:
Please don't top-post on technical lists; it makes it harder to follow
the conversation.
>
> m4_define([OVS_VSWITCHD_STOP],
>> [AT_CHECK([/etc/init.d/openvswitch stop], [0], [stdout], [])
>> AT_CHECK([[awk
Could I use regular match in AT_CHECK? Like this:
m4_define([OVS_VSWITCHD_STOP],
> [AT_CHECK([/etc/init.d/openvswitch stop], [0], [stdout], [])
> AT_CHECK([[awk '/Killing ovsdb-server/' stdout | sed -e 's/[ ]*$//g']],
> [0], [Killing ovsdb-server ([0-9]*)
> ])
> ])
2017-08-10 21:40 GMT+08:0
On 08/09/2017 09:56 PM, Sam wrote:
> Yes, it's because a space at the end of line:
>
> --- -^I2017-08-10 10:51:06.097868811 +0800$
>> +++
> but in my match, I add a space, I don't know why it doesn't work.
>
> AT_CHECK([[awk '/ACTIVE/' stdout | head -4]], [0], [LACP actor_state ACTIVE
>> AGGREGA
At last, I trim end line space, then it works. I have to say, compare to
python, shell is really hard, autotest is harder...
2017-08-10 10:56 GMT+08:00 Sam :
> Yes, it's because a space at the end of line:
>
> --- -^I2017-08-10 10:51:06.097868811 +0800$
>> +++
>> /home/gangyewei-3/mvs/mvs/tests/
Yes, it's because a space at the end of line:
--- -^I2017-08-10 10:51:06.097868811 +0800$
> +++
> /home/gangyewei-3/mvs/mvs/tests/testsuite.dir/at-groups/789/stdout^I2017-08-10
> 10:51:06.096038720 +0800$
> @@ -1,5 +1,5 @@$
> -LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING$
> -
On Wed, Aug 9, 2017 at 10:34 AM, Eric Blake wrote:
> On 08/09/2017 04:45 AM, Sam wrote:
>> Then I change commd into `awk '/ACTIVE/' stdout | head -4`, it failed
>> again, log is :
>>
>> ./netdev-dpdk.at:28: awk '/ACTIVE/' stdout | head -4
>>> --- - 2017-08-09 17:41:24.809066088 +0800
>>> +++ /ho
On 08/09/2017 04:45 AM, Sam wrote:
> Then I change commd into `awk '/ACTIVE/' stdout | head -4`, it failed
> again, log is :
>
> ./netdev-dpdk.at:28: awk '/ACTIVE/' stdout | head -4
>> --- - 2017-08-09 17:41:24.809066088 +0800
>> +++ /home/gangyewei-3/mvs/mvs/tests/testsuite.dir/at-groups/789/st
On 08/09/2017 04:15 AM, Sam wrote:
> Hi all,
>
> I'm using autotest to test ovs, and I write a new *.at file using only one
> AT_CHECK sentence like this:
>
> AT_CHECK([ovs-appctl dpdk/bond-show dpdkb2], [0], [stdout])
>> AT_CHECK([[sed '/ACTIVE/p' stdout | head -4]], [0], [[LACP actor_state
Not
Then I change commd into `awk '/ACTIVE/' stdout | head -4`, it failed
again, log is :
./netdev-dpdk.at:28: awk '/ACTIVE/' stdout | head -4
> --- - 2017-08-09 17:41:24.809066088 +0800
> +++ /home/gangyewei-3/mvs/mvs/tests/testsuite.dir/at-groups/789/stdout
> 2017-08-09 17:41:24.807150522 +0800
>