1. 22 9月, 2011 1 次提交
    • E
      virsh: fix regression in argv parsing · 466f9024
      Eric Blake 提交于
      Prior to commit 85d28108, we had an issue where:
      
      snapshot-create-as dom name --diskspec spec --diskspec spec
      
      failed to parse the second spec, because the first spec had marked
      that option as no longer requiring an argument.
      
      In commit 85d28108, I fixed it by making argv options no longer mark
      the option as seen.  But this in turn breaks mandatory argv options,
      which now complain that the argv option is missing.
      
      This patch reverts that part of 85d28108, and instead replaces it with
      fixes to no longer clear opts_need_arg of an argv argument.
      
      * tools/virsh.c (vshCmddefGetOption, vshCmddefGetData)
      (vshCommandParse): Fix option parsing for required argv option.
      (vshCmddefOptParse): Check that argv option is last.
      * tests/virsh-optparse: Enhance test.
      466f9024
  2. 16 9月, 2011 1 次提交
    • E
      snapshot: tweak snapshot-create-as diskspec docs · 85d28108
      Eric Blake 提交于
      With this patch, it is hopefully a bit more obvious that for
      snapshot-create-as, a literal '--diskspec' is mandatory if name
      or description was omitted, but optional if all earlier options
      were provided.
      
      These all denote two diskspecs and a description:
      virsh snapshot-create-as dom name desc vda vdb
      virsh snapshot-create-as dom name desc --diskspec vda --diskspec vdb
      virsh snapshot-create-as dom name desc --diskspec vda vdb
      virsh snapshot-create-as dom name desc vda --diskspec vdb
      virsh snapshot-create-as dom --diskspec vda --diskspec vdb name desc
      
      This gives two diskspecs but no description:
      virsh snapshot-create-as dom name --diskspec vda --diskspec vdb
      
      And this treats 'vda' as the description, with only one diskspec:
      virsh snapshot-create-as dom name vda vdb
      
      The help output now shows:
          snapshot-create-as <domain> [<name>] [<description>] [--print-xml] [--no-metadata] [--halt] [--disk-only] [[--diskspec] <string>]...
      
      I also checked the help output for echo and send-key, which are two
      other variants of argv commands.
      
      * tools/virsh.pod (snapshot-create-as): Document when a literal
      --diskspec must preceed a diskspec argument.
      * tools/virsh.c (vshCmddefHelp): Update help output for argv when
      naming the option is useful.
      (vshCmddefGetData): Fix logic on when argv was seen.
      * tests/virsh-optparse: Add tests to avoid regressions.
      85d28108
  3. 05 9月, 2011 1 次提交
    • E
      snapshot: wire up disk-only flag to snapshot-create · 35d52b56
      Eric Blake 提交于
      Expose the disk-only flag through virsh.  Additionally, make
      virsh snapshot-create-as take an arbitrary number of diskspecs,
      which can be used to build up the xml for <domainsnapshot>.
      
      * tools/virsh.c (cmdSnapshotCreate): Add --disk-only.
      (cmdSnapshotCreateAs): Likewise, and add argv diskspec.
      (vshParseSnapshotDiskspec): New helper function.
      (vshCmddefGetOption): Allow naming of argv field.
      * tools/virsh.pod (snapshot-create, snapshot-create-as): Document
      them.
      * tests/virsh-optparse: Test snapshot-create-as parsing.
      35d52b56
  4. 14 7月, 2011 1 次提交
    • J
      virsh: fix previous patch · f580a33f
      Jiri Denemark 提交于
      The last patch breaks make check for two reasons. First, it reverses the
      condition but leaves default level unchanged, so instead of not printing
      anything but errors before the patch it now prints all debug messages by
      default. Second, you forgot to change -d5 option passed to virsh in
      tests/virsh-optparse to -d0; the script wants to see all debug messages.
      f580a33f
  5. 16 4月, 2011 1 次提交
  6. 12 5月, 2010 2 次提交
    • J
      tests: use GPLv2+, not GPLv3 · c2c4abb4
      Jim Meyering 提交于
      * tests/cpuset: Change from GPLv3 to GPLv2+
      * tests/read-bufsiz: Likewise.
      * tests/read-non-seekable: Likewise.
      * tests/start: Likewise.
      * tests/undefine: Likewise.
      * tests/vcpupin: Likewise.
      * tests/virsh-all: Likewise.
      * tests/virsh-schedinfo: Likewise.
      * tests/virsh-synopsis: Likewise.
      c2c4abb4
    • J
      tests: correct PATH in new test, for when running manually · e915962a
      Jim Meyering 提交于
      * tests/virsh-schedinfo: This test sets PATH internally, just in
      case you're running it manually.  Normally, the PATH setting from
      tests/Makefile.am's TESTS_ENVIRONMENT is sufficient.  Prepend the
      correct directory, and take advantage of the PATH setting in one
      more case.
      e915962a
  7. 11 5月, 2010 1 次提交
  8. 07 10月, 2009 1 次提交
    • C
      Fix up "make check" · db68d6b1
      Chris Lalancette 提交于
      While running make check, I noticed that it was actually using
      the virsh binary from my system, in /usr/bin/virsh, and not the
      one that was just compiled.  This is actually caused by a bug
      in Makefile.am, where we didn't update the PATH to include tools.
      
      While here, I also updated all of the scripts to properly define
      the srcdir, abs_top_srcdir, and abs_top_builddir environment
      variables.  This is required if you want to be able to run the
      tests standalone (i.e. ./test instead of from make check).  I've
      tested this on both RHEL-5 and Fedora-10 machines, and make check
      works on both, as does running the individual tests by hand.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      db68d6b1
  9. 20 1月, 2009 1 次提交
  10. 10 12月, 2008 1 次提交
    • J
      fix just-broken "virsh start" and "virsh pool-start" commands · 3693a02f
      Jim Meyering 提交于
      * src/virsh.c (cmdPoolStart, cmdStart): Change hard-coded
      vshCommandOptDomainBy string argument to match just-changed
      option name.  Cole Robinson reported that "virsh start" was
      broken and provided that part of the fix.
      Bug introduced by yesterday's "virsh.c: tweak options to produce
      more accurate help".
      * tests/start: New file.  Test for the above fix.
      * tests/Makefile.am (test_scripts): Add start.
      3693a02f
  11. 05 12月, 2008 1 次提交
  12. 24 11月, 2008 1 次提交
  13. 07 4月, 2008 1 次提交
  14. 24 3月, 2008 1 次提交
    • J
      Add new testing framework and the first test to use it. · f15efcdf
      Jim Meyering 提交于
      * tests/Makefile.am (test_scripts): Add vcpupin.
      (EXTRA_DIST): Add test-lib.sh.
      * tests/test-lib.sh: Testing framework, from coreutils.
      * tests/vcpupin: New file.
      * build-aux/mktempd: New file, from gnulib.
      * bootstrap: Add posix-shell and mktempd to the list of imported modules.
      * gnulib/m4/posix-shell.m4: New file, from gnulib.
      f15efcdf