On 6/25/21 10:20 AM, Huw Davies wrote:
ok( row->InterfaceLuid.Value == luid->Value, "%d: mismatch\n", i );
ok( row->InterfaceIndex == stat->if_index, "%d: mismatch\n", i );
ok( IsEqualGUID( &row->InterfaceGuid, &stat->if_guid ), "%d: mismatch\n", i );
ok( !memcmp( row->Alias, rw->alias.String, rw->alias.Length ), "%d: mismatch\n", i );
ok( lstrlenW( row->Alias ) * 2 == rw->alias.Length, "%d: mismatch\n", i );
ok( !memcmp( row->Description, stat->descr.String, sizeof(row->Description) ), "%d: mismatch\n", i );
ok( lstrlenW( row->Description ) * 2 == stat->descr.Length, "%d: mismatch\n", i );
ok( row->PhysicalAddressLength == rw->phys_addr.Length, "%d: mismatch\n", i );
ok( !memcmp( row->PhysicalAddress, rw->phys_addr.Address, IF_MAX_PHYS_ADDRESS_LENGTH ), "%d: mismatch\n", i );
ok( row->PhysicalAddressLength == stat->perm_phys_addr.Length, "%d: mismatch\n", i );
ok( !memcmp( row->PermanentPhysicalAddress, stat->perm_phys_addr.Address, IF_MAX_PHYS_ADDRESS_LENGTH ), "%d: mismatch\n", i );
ok( row->Mtu == dyn->mtu, "%d: mismatch\n", i );
ok( row->Type == stat->type, "%d: mismatch\n", i );
/* TunnelType */
ok( row->MediaType == stat->media_type, "%d: mismatch\n", i );
ok( row->PhysicalMediumType == stat->phys_medium_type, "%d: mismatch\n", i );
ok( row->AccessType == stat->access_type, "%d: mismatch\n", i );
/* DirectionType */
ok( row->InterfaceAndOperStatusFlags.HardwareInterface == stat->flags.hw, "%d: mismatch\n", i );
ok( row->InterfaceAndOperStatusFlags.FilterInterface == stat->flags.filter, "%d: mismatch\n", i );
ok( row->InterfaceAndOperStatusFlags.ConnectorPresent == stat->conn_present, "%d: mismatch\n", i );
/* NotAuthenticated */
ok( row->InterfaceAndOperStatusFlags.NotMediaConnected == dyn->flags.not_media_conn, "%d: mismatch\n", i );
/* Paused */
/* LowPower */
/* EndPointInterface */
ok( row->OperStatus == dyn->oper_status, "%d: mismatch\n", i );
ok( row->AdminStatus == rw->admin_status, "%d: mismatch\n", i );
ok( row->MediaConnectState == dyn->media_conn_state, "%d: status mismatch\n", i );
ok( IsEqualGUID( &row->NetworkGuid, &rw->network_guid ), "%d: mismatch\n", i );
ok( row->ConnectionType == stat->conn_type, "%d: mismatch\n", i );
if (dyn->xmit_speed == ~0ULL) dyn->xmit_speed = 0;
ok( row->TransmitLinkSpeed == dyn->xmit_speed, "%d: mismatch\n", i );
if (dyn->rcv_speed == ~0ULL) dyn->rcv_speed = 0;
ok( row->ReceiveLinkSpeed == dyn->rcv_speed, "%d: mismatch\n", i );
ok( bounded( row->InOctets, dyn->in_octets, dyn_2->in_octets ), "%d: mismatch\n", i );
ok( bounded( row->InUcastPkts, dyn->in_ucast_pkts, dyn_2->in_ucast_pkts ), "%d: mismatch\n", i );
ok( bounded( row->InNUcastPkts, dyn->in_mcast_pkts + dyn->in_bcast_pkts,
dyn_2->in_mcast_pkts + dyn_2->in_bcast_pkts ), "%d: mismatch\n", i );
ok( bounded( row->InDiscards, dyn->in_discards, dyn_2->in_discards ), "%d: mismatch\n", i );
ok( bounded( row->InErrors, dyn->in_errors, dyn_2->in_errors ), "%d: mismatch\n", i );
/* InUnknownProtos */
ok( bounded( row->InUcastOctets, dyn->in_ucast_octs, dyn_2->in_ucast_octs ), "%d: mismatch\n", i );
ok( bounded( row->InMulticastOctets, dyn->in_mcast_octs, dyn_2->in_mcast_octs ), "%d: mismatch\n", i );
ok( bounded( row->InBroadcastOctets, dyn->in_bcast_octs, dyn_2->in_bcast_octs ), "%d: mismatch\n", i );
ok( bounded( row->OutOctets, dyn->out_octets, dyn_2->out_octets ), "%d: mismatch\n", i );
ok( bounded( row->OutUcastPkts, dyn->out_ucast_pkts, dyn_2->out_ucast_pkts ), "%d: mismatch\n", i );
ok( bounded( row->OutNUcastPkts, dyn->out_mcast_pkts + dyn->out_bcast_pkts,
dyn_2->out_mcast_pkts + dyn_2->out_bcast_pkts ), "%d: mismatch\n", i );
ok( bounded( row->OutDiscards, dyn->out_discards, dyn_2->out_discards ), "%d: mismatch\n", i );
ok( bounded( row->OutErrors, dyn->out_errors, dyn_2->out_errors ), "%d: mismatch\n", i );
ok( bounded( row->OutUcastOctets, dyn->out_ucast_octs, dyn_2->out_ucast_octs ), "%d: mismatch\n", i );
ok( bounded( row->OutMulticastOctets, dyn->out_mcast_octs, dyn_2->out_mcast_octs ), "%d: mismatch\n", i );
ok( bounded( row->OutBroadcastOctets, dyn->out_bcast_octs, dyn_2->out_bcast_octs ), "%d: mismatch\n", i );
/* OutQLen */
- }
FWIW we have a nice winetest_push_context / winetest_pop_context which saves the day in cases like this to prepend loop index on all messages.
Cheers,