- 07 10月, 2019 1 次提交
-
-
由 Daniel P. Berrangé 提交于
The mktempd module in gnulib provides an equivalent to 'mktemp -d' on platforms which lack this shell command. All platforms on which libvirt runs the affected tests have 'mktemp -d' support, so the gnulib module is not required. Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 04 4月, 2019 1 次提交
-
-
由 Eric Blake 提交于
In a constrained CI environment, where it is intentional that attempts to write outside the current directory will fail, virsh-snapshot was failing: @@ -1,2 +1,3 @@ error: invalid argument: parent s3 for snapshot s2 not found error: marker +error: Failed to create '/home/travis/.cache/libvirt/virsh': Permission denied FAIL virsh-snapshot (exit status: 1) But we've already solved the problem in virsh-uriprecedence: tell virsh to use XDG locations pointing to somewhere we can write rather than its default of falling back to $HOME with the test being at risk of breaking due to the user's environment and/or unacceptably altering the user's normal cache. Hoist that solution into test-lib.sh, so that all scripts can use it as needed. While at it, fix a latent typo where XDG_RUNTIME_HOME was set to a literal relative directory name "XDG_CACHE_HOME" (the typo did not affect virsh-uriprecedence, but could matter to other clients). Fixes: 280a2b41 Fixes: 398de147Reported-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 02 5月, 2016 1 次提交
-
-
由 Martin Kletzander 提交于
The man page says: "(Re)-Connect to the hypervisor. When the shell is first started, this is automatically run with the URI parameter requested by the "-c" option on the command line." However, if you run: virsh -c 'test://default' 'connect; uri' the output will not be 'test://default'. That's because the 'connect' command does not care about any virsh-only related settings and if it is run without parameters, it connects with @uri == NULL. Not only that doesn't comply to what the man page describes, but it also doesn't make sense. It also means you aren't able to reconnect to whatever you are connected currently. So let's fix that in both virsh and virt-admin add a test case for it. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 02 2月, 2016 1 次提交
-
-
由 Eric Blake 提交于
Ever since commit ace4aecd, running 'make check' on RHEL 6 produces: ./test-lib.sh: line 21: realpath: command not found for every shell script test, because 'realpath' was not part of coreutils back then. * tests/test-lib.sh (_scriptdir): Compute with only portable shell. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 09 1月, 2016 1 次提交
-
-
由 Cole Robinson 提交于
Previously it failed like: $ ./tests/domainschematest ./tests/domainschematest: line 4: ./test-lib.sh: No such file or directory
-
- 14 10月, 2015 1 次提交
-
-
由 Wei Jiangang 提交于
It should redirect stdout to /dev/null first, then redirect stderr to whatever stdout currently points at. Signed-off-by: NWei Jiangang <weijg.fnst@cn.fujitsu.com>
-
- 13 9月, 2013 1 次提交
-
-
由 Martin Kletzander 提交于
-
- 13 8月, 2013 1 次提交
-
-
由 Eric Blake 提交于
The logic set up in previous patch for exposing VIR_TEST_EXPENSIVE to individual tests is as follows: make check VIR_TEST_EXPENSIVE=0 => getenv("VIR_TEST_EXPENSIVE") sees "0" make check VIR_TEST_EXPENSIVE=1 => getenv("VIR_TEST_EXPENSIVE") sees "1" make check => getenv("VIR_TEST_EXPENSIVE") sees either "0" or "1", based on configure options cd tests; ./FOOtest => getenv("VIR_TEST_EXPENSIVE") sees whatever is in your environment (usually NULL, but possibly garbage) Merely checking if VIR_TEST_EXPENSIVE is set in the environment does the wrong thing; likewise, it is unsafe to assume the variable will always contain a valid number. As such, it helps to have helper functions, instead of making each expensive test repeat the probe of the environment. * tests/testutils.h (virTestGetExpensive): New prototype. * tests/testutils.c (virTestGetExpensive): Implement it. * tests/test-lib.sh (very_expensive_): Rename... (test_expensive): ...and tweak to use VIR_TEST_EXPENSIVE. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 11 7月, 2011 1 次提交
-
-
由 Eric Blake 提交于
The shell version would output 40 extra spaces for a test with a multiple of 40 sub-tests, and the C version can use the same printf optimization for avoiding a loop over single space output as the shell version. * tests/testutils.c (virtTestMain): Avoid loop for alignment. * tests/test-lib.sh: Fix formatting when counter is multiple of 40.
-
- 09 7月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
The current logic tries to count from 1 to 40 and ignores paddings of 0 and 1 to 40. This doesn't work for counter + 1 mod 40 == 0 like here for counter value 159 TEST: virsh-all ........................................ 40 ........................................ 80 ........................................ 120 ....................................... 159 OK PASS: virsh-all Also seq isn't portable. Therefore, calculate the correct padding length directly and use printf to output it at once.
-
- 25 3月, 2010 1 次提交
-
-
由 Eric Blake 提交于
* configure.ac: Use "test cond1 || test cond2" instead. * m4/compiler-flags.m4 (gl_COMPILER_FLAGS): Likewise. * tests/test-lib.sh (verbose): Likewise.
-
- 24 3月, 2010 2 次提交
-
-
由 Jim Meyering 提交于
* tests/test-lib.sh: "echo -n" is not portable. Use printf instead. Remove unnecessary uses of "eval-in-subshell" (subshell is sufficient). Remove uses of tests' -a operator; it is not portable. Instead, use "test cond && test cond2". * tests/schematestutils.sh: Replace use of test's -a.
-
由 Matthias Bolte 提交于
This change only affects the output of tests that have an exact multiple of 40 test cases. For example the domainschematest currently: TEST: domainschematest ........................................ 40 ........................................ 80 ........................................ 120 ........................................ 160 ........................................ 200 OK PASS: domainschematest It outputs additional 40 spaces on the last line. The domainschematest output is fixed by the change in test-lib.sh. The change in testutils.c fixes this for tests written in C. Currently no C test has an exact multiple of 40 test cases, but I checked it and the same problem exists there. This patch stops that in both cases.
-
- 16 1月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
Only print out '.' for each test case, full test output can be re-enabled with VIR_TEST_VERBOSE=1, or VIR_TEST_DEBUG=XXXX Sample output now looks like TEST: statstest ........................................ 40 ................................... 75 OK PASS: statstest TEST: qparamtest ................................ 32 OK PASS: qparamtest TEST: ............ 12 OK
-
- 08 4月, 2008 1 次提交
-
-
由 Jim Meyering 提交于
* src/util.c (fread_file_lim): New function. (__virFileReadAll): Use fread_file_lim, rather than requiring that stat.st_size provide a usable file size. * tests/read-non-seekable: New test, for the above. * tests/Makefile.am (test_scripts): Add read-non-seekable. * tests/test-lib.sh (mkfifo_or_skip_): New helper function.
-
- 24 3月, 2008 1 次提交
-
-
由 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.
-