Skip to content
Snippets Groups Projects
  1. Jun 06, 2016
  2. Jun 02, 2016
  3. Jun 01, 2016
    • Fam Zheng's avatar
      docker: Add EXTRA_CONFIGURE_OPTS · 35e0f959
      Fam Zheng authored
      
      Whatever passed in this variable will be appended to all
      configure commands.
      
      Signed-off-by: default avatarFam Zheng <famz@redhat.com>
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Message-id: 1464755128-32490-15-git-send-email-famz@redhat.com
      35e0f959
    • Fam Zheng's avatar
      docker: Add travis tool · d5bd7891
      Fam Zheng authored
      
      The script is not prefixed with test- so it won't run with "make docker-test",
      because it can take too long.
      
      Run it with "make docker-travis@ubuntu".
      
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Signed-off-by: default avatarFam Zheng <famz@redhat.com>
      Message-id: 1464755128-32490-13-git-send-email-famz@redhat.com
      d5bd7891
    • Fam Zheng's avatar
      docker: Add mingw test · c4f0eed1
      Fam Zheng authored
      
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Signed-off-by: default avatarFam Zheng <famz@redhat.com>
      Message-id: 1464755128-32490-12-git-send-email-famz@redhat.com
      c4f0eed1
    • Fam Zheng's avatar
      docker: Add clang test · c8908570
      Fam Zheng authored
      
      The (currently partially commented out) configure options are suggested
      by John Snow <jsnow@redhat.com>.
      
      Signed-off-by: default avatarFam Zheng <famz@redhat.com>
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Message-id: 1464755128-32490-11-git-send-email-famz@redhat.com
      c8908570
    • Fam Zheng's avatar
      docker: Add full test · d710ac87
      Fam Zheng authored
      
      This builds all available targets.
      
      Signed-off-by: default avatarFam Zheng <famz@redhat.com>
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Message-id: 1464755128-32490-10-git-send-email-famz@redhat.com
      d710ac87
    • Fam Zheng's avatar
      docker: Add quick test · b7899d63
      Fam Zheng authored
      
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Signed-off-by: default avatarFam Zheng <famz@redhat.com>
      Message-id: 1464755128-32490-9-git-send-email-famz@redhat.com
      b7899d63
    • Fam Zheng's avatar
      docker: Add common.rc · 3568f98c
      Fam Zheng authored
      
      "requires" checks the "FEATURE" environment for specified prerequisits,
      and skip the execution of test if not found.
      
      "build_qemu" is the central routine to compile QEMU for tests to call.
      
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Signed-off-by: default avatarFam Zheng <famz@redhat.com>
      Message-id: 1464755128-32490-8-git-send-email-famz@redhat.com
      3568f98c
    • Fam Zheng's avatar
      docker: Add test runner · b344aa91
      Fam Zheng authored
      
      It's better to have a launcher for all tests, to make it easier to
      initialize and manage the environment.
      
      If "DEBUG=1"  a shell prompt will show up before the test runs.
      
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Signed-off-by: default avatarFam Zheng <famz@redhat.com>
      Message-id: 1464755128-32490-7-git-send-email-famz@redhat.com
      b344aa91
    • Fam Zheng's avatar
      docker: Add images · ca853f0c
      Fam Zheng authored
      
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Signed-off-by: default avatarFam Zheng <famz@redhat.com>
      Message-id: 1464755128-32490-6-git-send-email-famz@redhat.com
      ca853f0c
    • Fam Zheng's avatar
      Makefile: Rules for docker testing · 324027c2
      Fam Zheng authored
      
      This adds a group of make targets to run docker tests, all are available
      in source tree without running ./configure.
      
      The usage is shown with "make docker".
      
      Besides the fixed ones, dynamic targets for building each image and
      running each test in each image are generated automatically by make,
      scanning $(SRC_PATH)/tests/docker/ files with specific patterns.
      
      Alternative to manually list particular targets (docker-TEST@IMAGE)
      set, you can control which tests/images to run by filtering variables,
      TESTS= and IMAGES=, which are expressed in Makefile pattern syntax,
      "foo% %bar ...". For example:
      
          $ make docker-test IMAGES="ubuntu fedora"
      
      Unfortunately, it's impossible to propagate "-j $JOBS" into make in
      containers, however since each combination is made a first class target
      in the top Makefile, "make -j$N docker-test" still parallels the tests
      coarsely.
      
      Still, $J is made a magic variable to let all make invocations in
      containers to use -j$J.
      
      Instead of providing a live version of the source tree to the docker
      container we snapshot it with git-archive. This ensures the tree is in a
      pristine state for whatever operations the container is going to run on
      them.
      
      Uncommitted changes known to files known by the git index will be
      included in the snapshot if there are any.
      
      Signed-off-by: default avatarFam Zheng <famz@redhat.com>
      Signed-off-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Message-id: 1464755128-32490-5-git-send-email-famz@redhat.com
      324027c2
    • Fam Zheng's avatar
      tests: Add utilities for docker testing · 4485b04b
      Fam Zheng authored
      
      docker.py is added with a number of useful subcommands to manager docker
      images and instances for QEMU docker testing. Subcommands are:
      
      run: A wrapper of "docker run" (or "sudo -n docker run" if necessary),
      which takes care of killing and removing the running container at
      SIGINT.
      
      clean: Tear down all the containers including inactive ones that are
      started by docker_run.
      
      build: Compare an image from given dockerfile and rebuild it if they're
      different.
      
      Signed-off-by: default avatarFam Zheng <famz@redhat.com>
      Message-id: 1464755128-32490-2-git-send-email-famz@redhat.com
      4485b04b
  4. May 26, 2016
  5. May 25, 2016
  6. May 23, 2016
  7. May 19, 2016
  8. May 18, 2016
  9. May 12, 2016
    • Sascha Silbe's avatar
      qemu-iotests: iotests: fail hard if not run via "check" · 5a8fabf3
      Sascha Silbe authored
      
      Running an iotests-based Python test directly might appear to work,
      but may fail in subtle ways and is insecure:
      
      - It creates files with predictable file names in a world-writable
        location (/var/tmp).
      
      - Tests expect the environment to be set up by check. E.g. 041 and 055
        may take the wrong code paths if QEMU_DEFAULT_MACHINE is not
        set. This can lead to false negatives.
      
      Instead fail hard and tell the user we want to be run via "check".
      
      The actual environment expected by the tests is currently only defined
      by the implementation of "check". We use two of the environment
      variables set by "check" as indication of whether we're being run via
      "check". Anyone writing their own test runner (replacing "check") will
      need to replicate the full environment (in a broader sense, not just
      environment variables) provided by "check" anyway, including setting
      the two environment variables we check. Whereas a regular developer
      just trying to invoke the tests usually won't have both of these
      defined in their environment so we can catch their mistake and give
      out useful advice.
      
      Signed-off-by: default avatarSascha Silbe <silbe@linux.vnet.ibm.com>
      Reviewed-by: default avatarBo Tu <tubo@linux.vnet.ibm.com>
      Message-id: 1461094442-16014-1-git-send-email-silbe@linux.vnet.ibm.com
      Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
      5a8fabf3
    • Daniel P. Berrangé's avatar
      block: enable testing of LUKS driver with block I/O tests · 4e9b25fb
      Daniel P. Berrangé authored
      
      This adds support for testing the LUKS driver with the block
      I/O test framework.
      
         cd tests/qemu-io-tests
         ./check -luks
      
      A handful of test cases are modified to work with luks
      
       - 004 - whitelist luks format
       - 012 - use TEST_IMG_FILE instead of TEST_IMG for file ops
       - 048 - use TEST_IMG_FILE instead of TEST_IMG for file ops.
               don't assume extended image contents is all zeros,
               explicitly initialize with zeros
               Make file size smaller to avoid having to decrypt
               1 GB of data.
       - 052 - don't assume initial image contents is all zeros,
               explicitly initialize with zeros
       - 100 - don't assume initial image contents is all zeros,
               explicitly initialize with zeros
      
      With this patch applied, the results are as follows:
      
        Passed: 001 002 003 004 005 008 009 010 011 012 021 032 043
                047 048 049 052 087 100 134 143
        Failed: 033 120 140 145
       Skipped: 007 013 014 015 017 018 019 020 022 023 024 025 026
                027 028 029 030 031 034 035 036 037 038 039 040 041
                042 043 044 045 046 047 049 050 051 053 054 055 056
                057 058 059 060 061 062 063 064 065 066 067 068 069
                070 071 072 073 074 075 076 077 078 079 080 081 082
                083 084 085 086 087 088 089 090 091 092 093 094 095
                096 097 098 099 101 102 103 104 105 107 108 109 110
                111 112 113 114 115 116 117 118 119 121 122 123 124
                128 129 130 131 132 133 134 135 136 137 138 139 141
                142 144 146 148 150 152
      
      The reasons for the failed tests are:
      
       - 033 - needs adapting to use image opts syntax with blkdebug
               and test image in order to correctly set align property
       - 120 - needs adapting to use correct -drive syntax for luks
       - 140 - needs adapting to use correct -drive syntax for luks
       - 145 - needs adapting to use correct -drive syntax for luks
      
      The vast majority of skipped tests are exercising code that is
      qcow2 specific, though a couple could probably be usefully
      enabled for luks too.
      
      Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
      Message-id: 1462896689-18450-4-git-send-email-berrange@redhat.com
      Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
      4e9b25fb
    • Daniel P. Berrangé's avatar
      block: add support for encryption secrets in block I/O tests · b7e875b2
      Daniel P. Berrangé authored
      
      The LUKS block driver tests will require the ability to specify
      encryption secrets with block devices. This requires using the
      --object argument to qemu-img/qemu-io to create a 'secret'
      object.
      
      When the IMGKEYSECRET env variable is set, it provides the
      password to be associated with a secret called 'keysec0'
      
      The _qemu_img_wrapper function isn't modified as that needs
      to cope with differing syntax for subcommands, so can't be
      made to use the image opts syntax unconditionally.
      
      Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
      Message-id: 1462896689-18450-3-git-send-email-berrange@redhat.com
      Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
      b7e875b2
    • Daniel P. Berrangé's avatar
      block: add support for --image-opts in block I/O tests · 076003f5
      Daniel P. Berrangé authored
      
      Currently all block tests use the traditional syntax for images
      just specifying a filename. To support the LUKS driver without
      resorting to JSON, the tests need to be able to use the new
      --image-opts argument to qemu-img and qemu-io.
      
      This introduces a new env variable IMGOPTSSYNTAX. If this is
      set to 'true', then qemu-img/qemu-io should use --image-opts.
      
      Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
      Message-id: 1462896689-18450-2-git-send-email-berrange@redhat.com
      Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
      076003f5
    • Eric Blake's avatar
      qemu-io: Allow unaligned access by default · 093ea232
      Eric Blake authored
      
      There's no reason to require the user to specify a flag just so
      they can pass in unaligned numbers.  Keep 'read -p' and 'write -p'
      as no-ops so that I don't have to hunt down and update all users
      of qemu-io, but otherwise make their behavior default as 'read' and
      'write'.  Also fix 'write -z', 'readv', 'writev', 'writev',
      'aio_read', 'aio_write', and 'aio_write -z'.  For now, 'read -b',
      'write -b', and 'write -c' still require alignment (and 'multiwrite',
      but that's slated to die soon).
      
      qemu-iotest 23 is updated to match, as the only test that was
      previously explicitly expecting an error on an unaligned request.
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-id: 1462677405-4752-5-git-send-email-eblake@redhat.com
      Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
      Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
      093ea232
Loading