[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 5/6] net: Silence 'has no peer' messages in test
From: |
Thomas Huth |
Subject: |
Re: [Qemu-devel] [PATCH 5/6] net: Silence 'has no peer' messages in testing mode |
Date: |
Tue, 14 Aug 2018 18:11:13 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
On 08/14/2018 06:03 PM, Paolo Bonzini wrote:
> On 14/08/2018 18:01, Thomas Huth wrote:
>> On 08/14/2018 05:57 PM, Paolo Bonzini wrote:
>>> On 14/08/2018 17:43, Thomas Huth wrote:
>>>> On 08/14/2018 05:33 PM, Paolo Bonzini wrote:
>>>>> On 14/08/2018 16:46, Thomas Huth wrote:
>>>>>> When running qtests with -nodefaults, we are not interested in
>>>>>> these 'XYZ has no peer' messages.
>>>>>>
>>>>>> Signed-off-by: Thomas Huth <address@hidden>
>>>>>> ---
>>>>>> vl.c | 3 +--
>>>>>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>>>>>
>>>>>> diff --git a/vl.c b/vl.c
>>>>>> index 16b913f..7055df3 100644
>>>>>> --- a/vl.c
>>>>>> +++ b/vl.c
>>>>>> @@ -4559,11 +4559,10 @@ int main(int argc, char **argv, char **envp)
>>>>>> * (2) CONFIG_SLIRP not set, in which case the implicit "-net nic"
>>>>>> * sets up a nic that isn't connected to anything.
>>>>>> */
>>>>>> - if (!default_net) {
>>>>>> + if (!default_net && (!qtest_enabled() || has_defaults)) {
>>>>>> net_check_clients();
>>>>>> }
>>>>>>
>>>>>
>>>>> Why does it have no peer? Not a nack, just curiosity.
>>>>
>>>> The machines which emulate an embedded system often always create a NIC
>>>> (since it is hard-wired on the board, not optional). But since there is
>>>> no back-end on the host side with "-nodefaults", the net_check_clients()
>>>> function complains in this case.
>>>
>>> Ok, the has_defaults test then makes sense. Is the qtest_enabled() part
>>> still needed, or is the message unnecessary even in normal operation?
>>
>> I think it is still needed, since you could also screw up your command
>> line parameters after specifying -nodefaults (e.g. "-nodefaults -net
>> nic" without giving an additional "-net user" or something similar).
>
> True. Though it cannot happen with -nic, so another possibility is to
> give it only if -net was used?
Sorry, I don't quite get you ... this is a generic check in vl.c, how
should this code know whether the NICs have been specified with -nic or
-net?
Thomas
- [Qemu-devel] [PATCH 3/6] hw/timer/mc146818rtc: White space clean-up, (continued)
- [Qemu-devel] [PATCH 3/6] hw/timer/mc146818rtc: White space clean-up, Thomas Huth, 2018/08/14
- [Qemu-devel] [PATCH 4/6] hw/timer/mc146818rtc: Fix introspection problem, Thomas Huth, 2018/08/14
- [Qemu-devel] [PATCH 5/6] net: Silence 'has no peer' messages in testing mode, Thomas Huth, 2018/08/14
- Re: [Qemu-devel] [PATCH 5/6] net: Silence 'has no peer' messages in testing mode, Paolo Bonzini, 2018/08/14
- Re: [Qemu-devel] [PATCH 5/6] net: Silence 'has no peer' messages in testing mode, Thomas Huth, 2018/08/14
- Re: [Qemu-devel] [PATCH 5/6] net: Silence 'has no peer' messages in testing mode, Paolo Bonzini, 2018/08/14
- Re: [Qemu-devel] [PATCH 5/6] net: Silence 'has no peer' messages in testing mode, Thomas Huth, 2018/08/14
- Re: [Qemu-devel] [PATCH 5/6] net: Silence 'has no peer' messages in testing mode, Paolo Bonzini, 2018/08/14
- Re: [Qemu-devel] [PATCH 5/6] net: Silence 'has no peer' messages in testing mode,
Thomas Huth <=
- Re: [Qemu-devel] [PATCH 5/6] net: Silence 'has no peer' messages in testing mode, Paolo Bonzini, 2018/08/14
- Re: [Qemu-devel] [PATCH 5/6] net: Silence 'has no peer' messages in testing mode, Thomas Huth, 2018/08/15
- Re: [Qemu-devel] [PATCH 5/6] net: Silence 'has no peer' messages in testing mode, Thomas Huth, 2018/08/16
[Qemu-devel] [PATCH 6/6] tests/device-introspect: Test with all machines, not only with "none", Thomas Huth, 2018/08/14