On 6/11/23 16:13, Виктор Андреевич Тураев wrote:
> I solved the problems with the tests and tried to write my own test, I wrote 
> two, but the second one doesn't work for some reason and I don't understand 
> why, can you please tell me what I'm doing wrong?

The test log tells you why.  You're trying to start a new instance of
a database server while there is already one running.

> And also can I ask you where you can find information on how you can write 
> tests for open vswitch?

I don't think there is a guide.  You just need a basic understanding
of what generic aototest macros are doing.  You can look for GNU
Autotest documentation.  Here, for example:
  
https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/Writing-Testsuites.html

And you need to have some basic knowledge of shell scripting and
look what OVS-defined macros are doing.  In the end, autotest scripts
are translated into a pure shell.  If you don't understand something
in how they work after reading the documentation, you may always try
reading the generated ./tests/*testsuite shell script, though it's not
intended for humans to read, so a bit hard to follow.

> Also sometimes test slow_action on geneve6 tunnel fails without any reason 
> and then if checked again runs ok, and im not sure why.

Again, it does print out the reason.  It looks like ovs-pcap script
encounters unexpected closure of the stdout.  I'm guessing, it's
because the grep exits early when it finds a first match.  I've
never seen this particular issue before, but a simple fix might be
to store the output of the ovs-pcap in a file and then grep the file
instead.

Best regards, Ilya Maximets.

>  
> 24.05.2023, 23:08, "Ilya Maximets" <i.maxim...@ovn.org>:
> 
>     On 5/18/23 11:51, Виктор Андреевич Тураев via discuss wrote:
> 
>          Thanks a lot for your help! I took the ubuntu config and rebuilt the 
> kernel with it, check-kernel didn't give any errors but some tests were 
> skipped, is that normal? According to the unit tests that I ran with the 
> recheck=yes flag, two fell with an error, maybe I still missed some modules 
> when building the kernel? I also attached a .config file just in case.
> 
> 
>     You're missing some userspace tools like tftp.
>     Not sure why unit tests are failing though.
> 
>     Best regards, Ilya Maximets.
>      
> 
>           
>          09.05.2023, 21:15, "Ilya Maximets" <i.maxim...@ovn.org 
> <mailto:i.maxim...@ovn.org>>:
>          
>              On 5/9/23 14:34, Виктор Андреевич Тураев via discuss wrote:
>          
>                   Hello, I am writing a thesis on ovs , but I had problems, 
> after I completed all the steps necessary to install ovs in unit tests errors 
> got out, some I could fix myself, some not, I have ubuntu 22.04.2 latest 
> which I deployed in virtualbox, while I rebuilt the kernel with version 6.2.8 
> from kernel.org, maybe I forgot to include something in the config when 
> building?
>          
>          
>              Yes. You're missing at least a few NF_CONNTRACK config options:
>               
>          
>                   
> 2023-05-09T12:09:43.851Z|00023|ofproto_dpif|INFO|system@ovs-system 
> <mailto:system@ovs-system> <mailto:system@ovs-system 
> <mailto:system@ovs-system>>: Datapath does not support ct_zone
>                   
> 2023-05-09T12:09:43.851Z|00024|ofproto_dpif|INFO|system@ovs-system 
> <mailto:system@ovs-system> <mailto:system@ovs-system 
> <mailto:system@ovs-system>>: Datapath does not support ct_mark
>                   
> 2023-05-09T12:09:43.851Z|00025|ofproto_dpif|INFO|system@ovs-system 
> <mailto:system@ovs-system> <mailto:system@ovs-system 
> <mailto:system@ovs-system>>: Datapath does not support ct_label
>          
>          
>              So, CONFIG_NF_CONNTRACK_ZONES, CONFIG_NF_CONNTRACK_MARK, etc.
>          
>              This is causing failures of most of the CT tests. You also don't
>              have NAT for FTP and TFTP built. That might cause problems for
>              some of the tests as well, but most of these may be skipped if 
> you
>              don't have userspace ftp programs installed.
>          
>              And if you'll build things as modules, instead of being builtin, 
> it
>              will be easier to make changes and test them. Also, some tests 
> might
>              not be happy if you can't reload the openvswitch module between 
> them.
>              It should not be a problem in theory, but it's hard to tell for 
> sure.
>          
>              In general, if you copy the default config from your Ubuntu 
> system
>              and use defaults for any new options, you shouldn't miss any 
> important
>              config options. The build might take longer, but you may save on
>              kernel re-builds by using modules.
>               
>          
>                   I'm sending the logs of the kernel tests, as they are the 
> ones I need to fix for work, but I also attach the logs of the unit tests. 
> Please, tell me what I could do wrong, or what could be wrong?
>          
>          
>              The unit test failures are strange. Try running with RECHECK=yes.
>          
>              Best regards, Ilya Maximets.
>          
>          
>          _______________________________________________
>          discuss mailing list
>          disc...@openvswitch.org <mailto:disc...@openvswitch.org>
>          https://mail.openvswitch.org/mailman/listinfo/ovs-discuss 
> <https://mail.openvswitch.org/mailman/listinfo/ovs-discuss>
> 
>      
> 

_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to