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 <batmanustc@xxxxxxxxx>: > 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$ >> - partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING$ >> -LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING$ >> - partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING$ >> +LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $ >> + partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $ >> +LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $ >> + partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $ > > > 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 AGGREGATION SYNC COLLECTING DISTRIBUTING $ >> partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $ >> LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $ >> partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $ >> ])$ > > > 2017-08-09 22:34 GMT+08:00 Eric Blake <eblake@xxxxxxxxxx>: > >> 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/stdout >> >> 2017-08-09 17:41:24.807150522 +0800 >> >> @@ -1,5 +1,5 @@ >> >> -LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING >> >> - partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING >> >> -LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING >> >> - partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING >> >> +LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING >> >> + partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING >> >> +LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING >> >> + partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING >> >> Could this be a difference in line endings between what your .at file >> used and what stdout contains (which in turn is what line endings >> ovs-appctl outputs)? >> >> -- >> Eric Blake, Principal Software Engineer >> Red Hat, Inc. +1-919-301-3266 >> Virtualization: qemu.org | libvirt.org >> >> > _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf