Re: [PATCH v4 7/8] virtestmock: Print invalid file accesses into a file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 13, 2016 at 14:32:08 +0200, Michal Privoznik wrote:
> All the accesses to files outside our build or source directories
> are now identified and appended into a file for later processing.
> The location of the file that contains all the records can be
> controlled via VIR_TEST_FILE_ACCESS env variable and defaults to
> abs_builddir "/test_file_access.txt".
> 
> The script that will process the access file is to be added in
> next commit.
> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  .gitignore           |  1 +
>  HACKING              | 10 ++++++
>  docs/hacking.html.in | 13 +++++++
>  tests/Makefile.am    |  4 ++-
>  tests/testutils.c    | 30 +++++++++++++----
>  tests/testutils.h    | 10 +++---
>  tests/virtestmock.c  | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++--
>  7 files changed, 149 insertions(+), 14 deletions(-)
> 

[...]

> diff --git a/HACKING b/HACKING
> index e308568..918130e 100644
> --- a/HACKING
> +++ b/HACKING
> @@ -152,6 +152,16 @@ There is also a "./run" script at the top level, to make it easier to run
>  programs that have not yet been installed, as well as to wrap invocations of
>  various tests under gdb or Valgrind.
>  
> +When running our test suite it may happen that the test result is
> +nondeterministic because of the test suite relying on a particular file in the
> +system being accessible or having some specific value. To catch this kind of
> +errors, the test suite has a module for that prints any path touched that
> +fulfils constraints described above into a file. To enable it just set
> +"VIR_TEST_FILE_ACCESS" environment variable. Then "VIR_TEST_FILE_ACCESS"

VIR_TEST_FILE_ACCESS_OUTPUT in the second place.

> +environment variable can alter location where the file is stored.
> +
> +  VIR_TEST_FILE_ACCESS=1 VIR_TEST_FILE_ACCESS_OUTPUT="/tmp/file_access.txt" ./qemuxml2argvtest
> +
>  
>  
>  (9) The Valgrind test should produce similar output to "make check". If the output
> diff --git a/docs/hacking.html.in b/docs/hacking.html.in
> index 5cd23a2..2522a12 100644
> --- a/docs/hacking.html.in
> +++ b/docs/hacking.html.in
> @@ -189,6 +189,19 @@
>            under gdb or Valgrind.
>          </p>
>  
> +        <p>When running our test suite it may happen that the test result is
> +        nondeterministic because of the test suite relying on a particular file
> +        in the system being accessible or having some specific value. To catch
> +        this kind of errors, the test suite has a module for that prints any
> +        path touched that fulfils constraints described above
> +        into a file. To enable it just set
> +        <code>VIR_TEST_FILE_ACCESS</code> environment variable.
> +        Then <code>VIR_TEST_FILE_ACCESS</code> environment

Same here.

> +        variable can alter location where the file is stored.</p>
> +<pre>
> +  VIR_TEST_FILE_ACCESS=1 VIR_TEST_FILE_ACCESS_OUTPUT="/tmp/file_access.txt" ./qemuxml2argvtest
> +</pre>
> +
>        </li>
>        <li><p>The Valgrind test should produce similar output to
>            <code>make check</code>. If the output has traces within libvirt

ACK ^^

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]