tempesta-tech / tempesta-test

Test suite for Tempesta FW
10 stars 4 forks source link

check the number of warnings in dmesg for each test #600

Open RomanBelozerov opened 3 months ago

RomanBelozerov commented 3 months ago

We have tests with a lot of warning messages from Tempesta in dmesg (t_leaks, t_stress e.t.c.). These tests do not check and not expect these messages, and also these warnings are duplicates and do not make sense. Please add check to cleanup section after each test. For example:

def setUp():
    ...
    self.addCleanup(self.check_warning_count_in_dmesg)
    ...

def check_warning_count_in_dmesg(self):
    warnings_n = len(self.oops.log_findall('Warning'))
    if self.check_warning_count_in_dmesg and warnings_n > 5:
         raise Exception("...")

Please add a variable or decorator to disable this logic. As check_warning_count_in_dmesg in this example.

krizhanovsky commented 3 months ago

Also please keep in mind that Tempesta FW itself in certain cases generates too many warnings and this should be fixed on Tempesta's side, so if you face the case of too many warnings in dmesg, then probably it could make sense to report an issue for Tempesta FW.