Re: [Avocado-devel] Issues: pf assignable testing

2022-08-22 Thread Xu Han
On Tue, Aug 23, 2022 at 9:32 AM  wrote:

> Hi Xu Han,
>
>
> Thanks very much for your help.
>
> And I found that testcases can pass just with "set the `mac` param to the
> PF nic device with its actual value".
>

My pleasure, thanks!

Best regards,
Xu Han


>
> Best Regards,
>
> Zhiguo Wu
>
> -Original Messages-
> *From:*"Xu Han" 
> *Sent Time:*2022-08-19 17:38:00 (Friday)
> *To:* wuzhi...@loongson.cn
> *Cc:* "avocado-devel@redhat.com" , "Lukas
> Doktor" , "Kyla Zhang" 
> *Subject:* Re: [Avocado-devel] Issues: pf assignable testing
>
> Hello Zhiguo Wu,
>
> Firstly, thank you for your attention to the avocado project!
>
> It seems that the PF/VF assignment functionality has not been maintained
> for a few years, and hence I don't even sure about if these kinds of tests
> could be run properly. But I will try to answer your questions as much as I
> can.
>
> On Mon, Aug 15, 2022 at 8:46 PM  wrote:
> >
> > Dear avocado development team,
> >
> >
> > In pf assignable testing, I found some issue:
> >
> > 1. guest-hw.cfg:  driver not set in pf_assignable variants.
>
> Would you please elaborate more about the issue you encountered so that it
> can help me understand that? thanks!
>
> >
> > 2. Avocado always try to find IP for mac which is generated by
> virtnet.generate_mac_address(), not for pf assignable device's mac. So test
> failed.
> >
> > For example, mac of pf assignable device is "90:e2:ba:34:bf:e6", but
> avocado always try to find IP for mac (9a:7a:7f:25:5c:c3)
>
> This looks like a bug. Anyway, could you please try with the following to
> see if it can workaround the issue?
>
> 1. apply the patch below to avocado-vt.
>
> diff --git a/virttest/qemu_vm.py b/virttest/qemu_vm.py
> index 6706b097..dfd6d5bc 100644
> --- a/virttest/qemu_vm.py
> +++ b/virttest/qemu_vm.py
> @@ -3011,6 +3011,8 @@ class VM(virt_vm.BaseVM):
>  elif pa_type == "pf":
>
>  self.pci_assignable.add_device(device_type=pa_type,
> name=name)
> +self.virtnet.set_mac_address(nic["nic_name"],
> + nic_params["mac"])
>  else:
>      raise virt_vm.VMBadPATypeError(pa_type)
>  else:
>
> 2. set the `mac` param to the PF nic device with its actual value, for
> example,
>
> mac_nicpf1 = 90:e2:ba:34:bf:e6
>
> ('nicpf1' is the logic name of the PF nic in this example, please replace
> it with the one used in your case.)
>
> Best regards,
> Xu Han
>
> >
> > Could you please share your comments ?
> >
> >
> > Best Regards,
> >
> > Zhiguo Wu
>
>
>
>
> *本邮件及其附件含有龙芯中科的商业秘密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制或散发)本邮件及其附件中的信息。如果您错收本邮件,请您立即电话或邮件通知发件人并删除本邮件。
>  This
> email and its attachments contain confidential information from Loongson
> Technology , which is intended only for the person or entity whose address
> is listed above. Any use of the information contained herein in any way
> (including, but not limited to, total or partial disclosure, reproduction
> or dissemination) by persons other than the intended recipient(s) is
> prohibited. If you receive this email in error, please notify the sender by
> phone or email immediately and delete it. *


Re: [Avocado-devel] Issues: pf assignable testing

2022-08-19 Thread Xu Han
Hello Zhiguo Wu,

Firstly, thank you for your attention to the avocado project!

It seems that the PF/VF assignment functionality has not been maintained
for a few years, and hence I don't even sure about if these kinds of tests
could be run properly. But I will try to answer your questions as much as I
can.

On Mon, Aug 15, 2022 at 8:46 PM  wrote:
>
> Dear avocado development team,
>
>
> In pf assignable testing, I found some issue:
>
> 1. guest-hw.cfg:  driver not set in pf_assignable variants.

Would you please elaborate more about the issue you encountered so that it
can help me understand that? thanks!

>
> 2. Avocado always try to find IP for mac which is generated by
virtnet.generate_mac_address(), not for pf assignable device's mac. So test
failed.
>
> For example, mac of pf assignable device is "90:e2:ba:34:bf:e6", but
avocado always try to find IP for mac (9a:7a:7f:25:5c:c3)

This looks like a bug. Anyway, could you please try with the following to
see if it can workaround the issue?

1. apply the patch below to avocado-vt.

diff --git a/virttest/qemu_vm.py b/virttest/qemu_vm.py
index 6706b097..dfd6d5bc 100644
--- a/virttest/qemu_vm.py
+++ b/virttest/qemu_vm.py
@@ -3011,6 +3011,8 @@ class VM(virt_vm.BaseVM):
 elif pa_type == "pf":
 self.pci_assignable.add_device(device_type=pa_type,
name=name)
+self.virtnet.set_mac_address(nic["nic_name"],
+ nic_params["mac"])
 else:
 raise virt_vm.VMBadPATypeError(pa_type)
 else:

2. set the `mac` param to the PF nic device with its actual value, for
example,

mac_nicpf1 = 90:e2:ba:34:bf:e6

('nicpf1' is the logic name of the PF nic in this example, please replace
it with the one used in your case.)

Best regards,
Xu Han

>
> Could you please share your comments ?
>
>
> Best Regards,
>
> Zhiguo Wu
>
>
>
>
本邮件及其附件含有龙芯中科的商业秘密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制或散发)本邮件及其附件中的信息。如果您错收本邮件,请您立即电话或邮件通知发件人并删除本邮件。
> This email and its attachments contain confidential information from
Loongson Technology , which is intended only for the person or entity whose
address is listed above. Any use of the information contained herein in any
way (including, but not limited to, total or partial disclosure,
reproduction or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this email in error, please
notify the sender by phone or email immediately and delete it.


Re: [Avocado-devel] Suggestion for a new avocado-vt maintainer

2020-10-12 Thread Xu Han
+1

On Fri, Oct 9, 2020 at 2:18 PM Kyla Zhang  wrote:

> +1 Good job, Chloerh
>
> On Thu, Oct 8, 2020 at 12:28 PM Dan Zheng  wrote:
>
>> Hello maintainers,
>>
>> I am glad to recommend Chloerh (github ID) as avocado-vt maintainer.
>> I proposed to grant her as both avocado-vt and tp-libvit maintainers
>> three months ago and finally we decided to grant her as a tp-libvirt
>> maintainer first.
>> Now regarding the situation that we have more and more PRs' contributions
>> and high reviewing workload as well as her good performance/improvements,
>> I think it is time to post this proposal again instead of waiting for
>> more months. So* I am appreciated for your feedback.*
>>
>> haizhao has been tp-libvirt maintainer since July 2020.
>> During the past 3 months, she not only contributed much to tp-libvirt,
>> but also more efforts in avocado-vt.
>>
>> What she has done:
>> 1. 386 contributions were done since 2020 and 180 of them were done in
>> the past 3 months.
>> 2. 13 avocato-vt PRs were submitted, and 50+ avocado-vt PRs were reviewed
>> since 2020. 46% contributions were for code reviewing.
>> 3. She is pre-actively testing the latest avocado branch integration with
>> avocado-vt(tp-libvirt) locally.
>> 4. She is strict to code quality and actively provides better
>> implementation.
>>
>>  I have seen other improvements from her, like:
>> 1. Her wording attitude in review comments is becoming more and more nice.
>> 2. She is more able to think from the position of the whole team in some
>> discussions.
>>
>> BTW,  below is some positive feedback from feature owners within the
>> libvirt QE team.
>>
>> From: Jianan Gao 
>> Date: Tue, Sep 29, 2020 at 5:02 PM
>> +1
>> Haijiao is the teacher of my auto work, I super agree with her as a
>> maintainer, she is my idol !!!
>>
>> Jgao
>> On Tue, Sep 29, 2020 at 4:47 PM Yingshun Cui  wrote:
>>
>>> +1
>>> I totally agree with you. She always gives me a quick feedback on
>>> reviewing PRs.
>>>
>>
>>
>>> On Tue, Sep 29, 2020 at 4:33 PM Yalan Zhang  wrote:
>>>

 Hi dzheng,

 I can't agree more with the sentence below:
 She is strict to code quality and actively provides better
 implementation.
 She is more able to think from the position of the whole team in some
 discussions.

 And she is very careful to review the code and give me many
 suggestions, and she even explains it to me with google meet.
 She is very responsible with the open PR and reminds me several times.
 I agree with the recognition and promotion.

 ---
 Best Regards,
 Yalan Zhang
 IRC: yalzhang


 On Tue, Sep 29, 2020 at 4:25 PM Dan Zheng  wrote:

> Hi maintainers & feature owners,
>
> This email is to ask for your feedback for promoting haizhao(github
> ID: Chloerh) to become an avocado-vt maintainer.
> I *appreciate* your replies.
>
> ...
>

>>>
>>> --
>>
>>
>>
>> Regards,
>> Dan Zheng (dzh...@redhat.com)
>> Libvirt, Virtualization
>> Redhat Beijing  R
>>
>


Re: [Avocado-devel] Post 82.0 LTS plans

2020-09-30 Thread Xu Han
tice. In
my experience, especially for new initiatives, different abstractions could
bring different module/class/function names, and maintainers may hold
different opinions on that. So I wonder if the above things could cover it.


>
> Concurrent usage and migration plan
> ~~~
>
> It should be possible to keep using the libraries available at
> Avocado-VT's "virtest.utils_*" and Avocado's "avocado.utils"
> concurrently with the libraries migrated to the new repository.
>
> Suppose your test looks like:
>
>from avocado.utils import cpu
>from avocado.utils import lv_utils
>from avocado.utils import distro
>from virttest import utils_net
>
> Once "greenmatter 1.0" gets release, let's say with nothing but "lv" and
> "distro" libraries.  You project can add a new requirement:
>
>greenmatter==1.0
>
> And the next version of a test can look like:
>
>from avocado.utils import cpu
>from virttest import utils_net
>from greenmatter import lv
>from greenmatter import distro
>

During migration, a bad case I can see is we have to commit a change twice:
one for avocado.utils/virttest.utils_* and the other for the devel branch
of greenmatter, for example, a bug fix. But I think it could be acceptable
because we may not meet that too often.


>
> Gradually, as more modules are migrated, the requirement can eventually be:
>
>greenmatter==12.0
>

Does it mean the latest release of greenmatter should be the only supported
release? or will there be LTS releases? (to avoid facing compatibility
issues, it is better to limit the usage as well.)

--
Xu Han


> And the test can look like:
>
>from greenmatter import cpu
>from greenmatter import net
>from greenmatter import lv
>from greenmatter import distro
>
>
> That's all for now.  All feedback is appreciated.
>
> Thanks!
> --
> Cleber Rosa
> [ Sr Software Engineer - Virtualization Team - Red Hat ]
> [ Avocado Test Framework - avocado-framework.github.io ]
> [  7ABB 96EB 8B46 B94D 5E0F  E9BB 657E 8D33 A5F2 09F3  ]
>


Re: [Avocado-devel] Suggestion for a new avocado-vt maintainer

2020-09-16 Thread Xu Han
Cleber and Plamen, thank you for your approval!

Congratulations, Yongxue!

Thanks,
Xu

On Tue, Sep 15, 2020 at 8:01 PM Cleber Rosa  wrote:

>
>
> - Original Message -
> > From: "Plamen Dimitrov" 
> > To: avocado-devel@redhat.com
> > Sent: Monday, August 31, 2020 5:13:21 PM
> > Subject: Re: [Avocado-devel] Suggestion for a new avocado-vt maintainer
> >
> > Hi @luckyh,
> >
> > On 2020-08-31 15:35, Xu Han wrote:
> > > I'd like to advocate for Yongxue Hong (Github profile:
> > > https://github.com/YongxueHong) to become a avocado-vt maintainer.
> > >
> > > Yongxue started contributing to the avocado-vt and the tp-qemu projects
> > > since 2017, and he has been the tp-qemu maintainer for about 2 years.
> Over
> > > the past few years, he has submitted 31 PRs (23 got merged) to
> avocado-vt
> > > and 111 PRs (88 got merged) to tp-qemu, which helps a lot to improve
> both
> > > the framework and the testsuite, especially for qemu testing. And also
> as
> > > the reviewer/maintainer he has reviewed 150+ PRs in total.
> >
> > I think the more maintainers in VT the better and I trust your judgement
> > completely so I would say +1.
> >
>
> +1 from me too.  Xu, Do you any need any action from me, or are you able
> to add him
> as a maintainer?
>
> Thanks,
> - Cleber.
>
> > Best,
> > Plamen
> >
> >
>
>


[Avocado-devel] Suggestion for a new avocado-vt maintainer

2020-08-31 Thread Xu Han
Hello guys,

I'd like to advocate for Yongxue Hong (Github profile:
https://github.com/YongxueHong) to become a avocado-vt maintainer.

Yongxue started contributing to the avocado-vt and the tp-qemu projects
since 2017, and he has been the tp-qemu maintainer for about 2 years. Over
the past few years, he has submitted 31 PRs (23 got merged) to avocado-vt
and 111 PRs (88 got merged) to tp-qemu, which helps a lot to improve both
the framework and the testsuite, especially for qemu testing. And also as
the reviewer/maintainer he has reviewed 150+ PRs in total.

Best regards,
Xu


Re: [Avocado-devel] Pull request merges for avocado-vt

2019-01-17 Thread Xu Han
On Fri, Jan 18, 2019 at 3:03 AM Cleber Rosa  wrote:

>
>
> On 1/15/19 1:20 PM, Plamen Dimitrov wrote:
> > Hi all,
> >
> > I am new to the avocado-vt repo and it seems that merging pull requests
> > there has a different workflow than pull requests in avocado. In
> > particular, it seems that no review is required for a merge - am I
> > correct to assume this? I have 5-6 pull requests waiting and after
> > waiting for some time I just realized that GitHub is giving me green
> > light for each pull request without blocking. Shouldn't a main
> > maintainer also look at the code or is it good to go if it passes all
> > unit tests?
> >
>
> Avocado-VT workflow requires two ACKs, but you're right that the GH UI
> is not preventing merges.
>
> Xu, Lukáš (and others),
>
> Would you like to activate the merge block feature on GH?
>

That sounds good to me, and honestly it is what I planned to do, so let's
see other maintainers' willingness.

Thanks,
Xu


>
> Thanks,
> - Cleber.
>
> > Best,
> > Plamen
> >
>
> --
> Cleber Rosa
> [ Sr Software Engineer - Virtualization Team - Red Hat ]
> [ Avocado Test Framework - avocado-framework.github.io ]
> [  7ABB 96EB 8B46 B94D 5E0F  E9BB 657E 8D33 A5F2 09F3  ]
>


Re: [Avocado-devel] Suggestion for a new maintainer

2018-12-02 Thread Xu Han

Good news, congratulations!

- Xu

On 12/3/18 10:03 AM, Qianqian Zhu wrote:

Thanks Lukáš, Cleber and Xu, I have got the permission.
Thanks for your trust, I will be cautious and do my best.

Regards,
Qianqian

- Original Message -

From: "Lukáš Doktor" 
To: "Qianqian Zhu" , "Cleber Rosa" 
Cc: "avocado-devel" 
Sent: Saturday, December 1, 2018 12:07:40 AM
Subject: Re: Suggestion for a new maintainer

OK, so far got 2 acks so let's get you in. Congratulation Qianqian and use
your write-permission wisely.

Regards,
Lukáš

Dne 21. 11. 18 v 13:12 Lukáš Doktor napsal(a):

Dne 21. 11. 18 v 11:22 Qianqian Zhu napsal(a):

- Original Message -

From: "Cleber Rosa" 
To: "Lukáš Doktor" , "avocado-devel"
, "Qianqian Zhu"

Sent: Thursday, November 15, 2018 9:05:13 PM
Subject: Re: Suggestion for a new maintainer



On 11/14/18 1:38 AM, Lukáš Doktor wrote:

Hello guys,

I'd like to advocate for Qianqian Zhu https://github.com/vivianQizhu to
become a avocado-vt/tp-qemu maintainer. She is pretty active and has
been
delivering pretty complex PRs (I was very impressed by q35 PCI handling,
hotplug support tweaks or even just pure old "boring" py3 fixes) as well
as doing a lot of reviews.


Sure, +1 here.  Do you need any further action from my side?  I'm not
100% sure if the tp-qemu maintainer group management on GitHub was fixed
or not (so that maintainers can add others).

Thanks Lukáš and Cleber, would you please help add me avocado-vt
permission? I am already in tp-qemu maintainer group, but they are under
different projects.


I'm still waiting for at least 1 other ack (pinged all maintainers in
separate email already).

Regards,
Lukáš


Regards,
Qianqian


- Cleber.


Regards,
Lukáš


--
Cleber Rosa
[ Sr Software Engineer - Virtualization Team - Red Hat ]
[ Avocado Test Framework - avocado-framework.github.io ]
[  7ABB 96EB 8B46 B94D 5E0F  E9BB 657E 8D33 A5F2 09F3  ]










Re: [Avocado-devel] Using network sniffer in avocado-vt

2018-09-12 Thread Xu Han


On 9/12/18 7:58 AM, Cleber Rosa wrote:


On 9/11/18 5:43 AM, Sergey Bronnikov wrote:

Hello!

avocado-vt uses network sniffer (tshark or tcpdump) for getting
IP address of running guest OS. QEMU has an option to dump network
traffic to a file. Using this option looks simpler than using of
external sniffer . I believe there were reasons to prefer sniffer
instead of qemu dump option. Can someone tell about them?

Sergey

Sergey,

It'd be nice to try to rewrite the "sniffing" code in terms of "-object
filter-dump" (AKA "-net dump").

I see that there are some limitations in the QEMU builtin network dump,
but we can always use such an implementation when appropriate.


It's a good idea to use '-net dump' functionality for getting IP 
addresses, parsing pcap format files is always be easy than parsing 
plain text generated by those sniffer tools.


However, my concern is that this method is a little bit aggressive, I'm 
not sure if enabling this function  for a guest would affect the other 
part of the network function. And please be noted that a well 
functioning QEMU is the guarantee for us to get the correct IP 
addresses, while the QEMU is the box that we are testing.




Xu has written the tshak backend, so I bet he knows more about it.


Honestly speaking, I have no idea about why it used tcpdump not others.. 
The reason of adding the tshark(wireshark) support is, sometimes, 
tcpdump has the problem to get the right informaion (see 
https://github.com/avocado-framework/avocado-vt/pull/1463).


We can also get IP adresses by using the function provided by 
qemu-guest-agent, it can work with both dhcp and static network. But, 
for me, it is an "aggressive" way as well.



Thanks,
Xu




FIY, we're trying a different approach of getting guest information on
Avocado (not on Avocado-VT), by using the "cloudinit" feature when the
guest has support for it:

https://avocado-framework.readthedocs.io/en/64.0/api/utils/avocado.utils.html#module-avocado.utils.cloudinit

It's simplistic at the moment, but it's possible to check for the
instance id used, and get the IP address from the the "phone home" HTTP
connection.

Regards,



Re: [Avocado-devel] Windows guest OS without virtio

2018-06-05 Thread Xu Han

Hi,

On 06/05/2018 10:45 PM, Sergey Bronnikov wrote:

Hello,

I am running unattended installation of Windows guest OS with command 
'avocado run --vt-guest-os Win7.x86_64.sp1 
unattended_install.cdrom.extra_cdrom_ks.default_install.aio_threads 
--show-job-log --vt-extra-params machine=q35 cpu=host'. Windows 
installation starts successfully, but installer cannot find disk - due 
to absence of virtio driver. How to disable virtio devices and use 
SATA interface instead?


You can edit the vt configuration file '/etc/avocado/conf.d/vt.conf' and 
set the value of option 'disk_bus' to 'ahci' in case of using 'machine=q35'.


Thanks,
Xu



autotest==0.16.4
avocado-framework==60.0
avocado-framework-plugin-vt==57.4
avocado-virt==39.0

Sergey




Re: [Avocado-devel] Port python2 avocado-vt project to python3

2018-02-27 Thread Xu Han


On 02/28/2018 11:29 AM, Chunfu Wen wrote:

Hi Xu,

I noticed avocado target is 3.4 from 
https://github.com/avocado-framework/avocado/blob/master/.travis.yml.
Currently, we just keep consistent with it.


OK, I see. Then I would suggest to consider python 3.6 as well since we 
are facing it in the next release.


Thanks,
Xu



Best Regards,

Chunfu Wen

- Original Message -
From: "Xu Han" <xu...@redhat.com>
To: "Chunfu Wen" <ch...@redhat.com>, avocado-devel@redhat.com
Cc: sathn...@linux.vnet.ibm.com, bal...@linux.vnet.ibm.com, weiz...@redhat.com, "Min Zhan" 
<mz...@redhat.com>, "Guannan Sun" <g...@redhat.com>
Sent: Wednesday, February 28, 2018 11:18:13 AM
Subject: Re: Port python2 avocado-vt project to python3

Hi Chunfu,

Thanks for your initiative!

My only concern is that I'm not sure whether it means the porting would
be compatible with python 3.6,
do you have any idea about it?

Thanks,
Xu

On 02/28/2018 10:42 AM, Chunfu Wen wrote:

Dear avocado-vt maintainers,

This is announcement that libvirt QE automation team is launching one program 
to port avocado-vt project to python 3.
The reason for this is quite known that python2 will not be supported 
officially in the coming Linux release.

The general requirements for this porting is to enable avocado-vt on python 3.4 
while keeping compatible with python 2.7.
If you have any questions, please contact me.

Thank you all in advance for upcoming patch reviewing!

Best Regards,

Libvirt QE

Chunfu Wen





Re: [Avocado-devel] Port python2 avocado-vt project to python3

2018-02-27 Thread Xu Han

Hi Chunfu,

Thanks for your initiative!

My only concern is that I'm not sure whether it means the porting would 
be compatible with python 3.6,

do you have any idea about it?

Thanks,
Xu

On 02/28/2018 10:42 AM, Chunfu Wen wrote:

Dear avocado-vt maintainers,

This is announcement that libvirt QE automation team is launching one program 
to port avocado-vt project to python 3.
The reason for this is quite known that python2 will not be supported 
officially in the coming Linux release.

The general requirements for this porting is to enable avocado-vt on python 3.4 
while keeping compatible with python 2.7.
If you have any questions, please contact me.

Thank you all in advance for upcoming patch reviewing!

Best Regards,

Libvirt QE

Chunfu Wen





Re: [Avocado-devel] Promote XuHan as avocado-vt maintainer

2017-04-06 Thread Xu Han

Hi,

Thank all for your confidence in me. I'm willing to contribute to this 
project.


On 04/05/2017 10:31 PM, Lukáš Doktor wrote:

Dne 5.4.2017 v 05:30 xutian napsal(a):

Add XuHan  and my manager Michen in CC list.


On 04/05/2017 11:25 AM, xutian wrote:

Hi list,

I will leave Red Hat on May 1 to work elsewhere, and in the future I
may not have too much time to carry out the maintenance work of
avocado-vt, and I recommend my colleague Han Xu to take over me.

Thanks,

Xu





Sure, I trust your recommendation. Han, do you feel ready to become a 
maintainer? There is just one more thing to solve, becoming a 
maintainer means getting the write access to git, but you (Xu Tian) 
was also the primary contact listed in MAINTANERS file. Would you like 
to be removed or replaced with Han Xu? Feel free to send PR for that.


Anyway I see several commits by Han Xu, so I have nothing against him 
becoming a maintaner. Let's wait for majority of other maintainers so 
we can add the write access to him, then you can send a PR with 
MAINTANERS file changes (if necessary as you can still be a primary 
contact if you decide to follow the discussions).


Regards,
Lukáš



--
best regards,
xuhan