Skip to content
Snippets Groups Projects
  1. Jan 29, 2021
  2. Jan 28, 2021
  3. Jan 27, 2021
    • Vladimir Sementsov-Ogievskiy's avatar
      iotests: rename and move 169 and 199 tests · a44be033
      Vladimir Sementsov-Ogievskiy authored
      
      Rename bitmaps migration tests and move them to tests subdirectory to
      demonstrate new human-friendly test naming.
      
      Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-Id: <20210125185056.129513-7-vsementsov@virtuozzo.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      a44be033
    • Vladimir Sementsov-Ogievskiy's avatar
      iotests: rewrite check into python · f203080b
      Vladimir Sementsov-Ogievskiy authored
      
      Just use classes introduced in previous three commits. Behavior
      difference is described in these three commits.
      
      Drop group file, as it becomes unused.
      
      Drop common.env: now check is in python, and for tests we use same
      python interpreter that runs the check itself. Use build environment
      PYTHON in check-block instead, to keep "make check" use the same
      python.
      
      Checking for virtio-blk moved to iotests.py, as it actually iotests.py
      dependency. Actually not all python iotests depend on it, so in future
      it may be refactored to checked only when really needed.
      
      Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-Id: <20210125185056.129513-6-vsementsov@virtuozzo.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      f203080b
    • Vladimir Sementsov-Ogievskiy's avatar
      iotests: add testrunner.py · d74c754c
      Vladimir Sementsov-Ogievskiy authored
      
      Add TestRunner class, which will run tests in a new python iotests
      running framework.
      
      There are some differences with current ./check behavior, most
      significant are:
      - Consider all tests self-executable, just run them, don't run python
        by hand.
      - Elapsed time is cached in json file
      - Elapsed time precision increased a bit
      - Instead of using "diff -w" which ignores all whitespace differences,
        manually strip whitespace at line end then use python difflib, which
        no longer ignores spacing mid-line
      
      Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-Id: <20210125185056.129513-5-vsementsov@virtuozzo.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      d74c754c
    • Vladimir Sementsov-Ogievskiy's avatar
      iotests: add testenv.py · 2e5a2f57
      Vladimir Sementsov-Ogievskiy authored
      
      Add TestEnv class, which will handle test environment in a new python
      iotests running framework.
      
      Don't add compat=1.1 for qcow2 IMGOPTS, as v3 is default anyway.
      
      Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-Id: <20210125185056.129513-4-vsementsov@virtuozzo.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      2e5a2f57
    • Vladimir Sementsov-Ogievskiy's avatar
      iotests: add findtests.py · b25a9488
      Vladimir Sementsov-Ogievskiy authored
      
      Add python script with new logic of searching for tests:
      
      Current ./check behavior:
       - tests are named [0-9][0-9][0-9]
       - tests must be registered in group file (even if test doesn't belong
         to any group, like 142)
      
      Behavior of findtests.py:
       - group file is dropped
       - tests are all files in tests/ subdirectory (except for .out files),
         so it's not needed more to "register the test", just create it with
         appropriate name in tests/ subdirectory. Old names like
         [0-9][0-9][0-9] (in root iotests directory) are supported too, but
         not recommended for new tests
       - groups are parsed from '# group: ' line inside test files
       - optional file group.local may be used to define some additional
         groups for downstreams
       - 'disabled' group is used to temporary disable tests. So instead of
         commenting tests in old 'group' file you now can add them to
         disabled group with help of 'group.local' file
       - selecting test ranges like 5-15 are not supported more
         (to support restarting failed ./check command from the middle of the
          process, new argument is added: --start-from)
      
      Benefits:
       - no rebase conflicts in group file on patch porting from branch to
         branch
       - no conflicts in upstream, when different series want to occupy same
         test number
       - meaningful names for test files
         For example, with digital number, when some person wants to add some
         test about block-stream, he most probably will just create a new
         test. But if there would be test-block-stream test already, he will
         at first look at it and may be just add a test-case into it.
         And anyway meaningful names are better.
      
      This commit doesn't update check behavior (which will be done in
      further commit), still, the documentation changed like new behavior is
      already here.  Let's live with this small inconsistency for the
      following few commits, until final change.
      
      Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20210125185056.129513-3-vsementsov@virtuozzo.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      b25a9488
Loading