/usr/share/gtk-doc/html/libblockdev/ch03.html is in libblockdev-dev 2.16-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Testing libblockdev: libblockdev Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="libblockdev Reference Manual">
<link rel="up" href="index.html" title="libblockdev Reference Manual">
<link rel="prev" href="ch02.html" title="GI Overrides">
<link rel="next" href="api-index-full.html" title="API Index">
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
<td><a accesskey="p" href="ch02.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="api-index-full.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="chapter">
<div class="titlepage"><div><div><h1 class="title">
<a name="id-1.4"></a>Testing libblockdev</h1></div></div></div>
<p>
libblockdev's test suite is written using the standard unittest.TestCase framework
in Python. Tests are separated in modules, usually one per libblockdev plugin - e.g.
BTRFS, LVM, Crypto. There are one or more base classes in each module used to
setup the environment and perform some testing. More specific test scenarios
inherit from these base classes.
</p>
<p>
Before running the tests you have to prepare your system so that libblockdev
can be built from source.
</p>
<p>
Install all build requirements. On Fedora this can be done with
</p>
<pre class="screen"><strong class="userinput"><code>
cat dist/libblockdev.spec.in | grep BuildRequires: | cut -f2 -d: | cut -f2 -d' ' | xargs dnf -y install
</code></strong></pre>
<p>
Configure the build scripts
</p>
<pre class="screen"><strong class="userinput"><code>./autogen.sh
./configure</code></strong></pre>
<p>
</p>
<p>
To execute the Pylint code analysis tool run:
</p>
<pre class="screen"><strong class="userinput"><code>make check</code></strong></pre>
<p>
The check target is a dependency of all test targets and you don't have to
execute it explicitly when testing.
</p>
<p>
To execute the test suite from inside the source directory run one of these
commands:
</p>
<pre class="screen"><strong class="userinput"><code>make test</code></strong></pre>
<p>
executes all safe tests or
</p>
<pre class="screen"><strong class="userinput"><code>make fast-test</code></strong></pre>
<p>
executes all fast tests or
</p>
<pre class="screen"><strong class="userinput"><code>make test-all</code></strong></pre>
<p>
executes all tests, including ones which may result in kernel panic or
take more time to complete or
</p>
<pre class="screen"><strong class="userinput"><code>make test-plugin-NAME</code></strong></pre>
<p>
executes only tests for given plugin and similarly
</p>
<pre class="screen"><strong class="userinput"><code>make fast-test-plugin-NAME</code></strong></pre>
<p>
executes only fast tests for given plugin.
</p>
<p>
It is also possible to run only subset of available tests or only one test
using the `run_tests.py` script:
</p>
<pre class="screen"><strong class="userinput"><code># python3 tests/run_tests.py fs_test.GenericResize</code></strong></pre>
<p>
executes all tests from the <span class="emphasis"><em>GenericResize</em></span> test class
from filesystem plugin test cases and
</p>
<pre class="screen"><strong class="userinput"><code># python3 tests/run_tests.py fs_test.GenericResize.test_ext2_generic_resize</code></strong></pre>
<p>
executes only <span class="emphasis"><em>test_ext2_generic_resize</em></span> from this class.
This script also allows skipping slow tests or running potentially dangerous
tests. Use:
</p>
<pre class="screen"><strong class="userinput"><code>$ python3 tests/run_tests.py --help</code></strong></pre>
<p>
to see all available options.
</p>
<p>
It is also possible to generate test coverage reports using the Python coverage
tool:
</p>
<pre class="screen"><strong class="userinput"><code>make coverage</code></strong></pre>
<p>
is equivalent to `make test'.
</p>
<pre class="screen"><strong class="userinput"><code>make coverage-all</code></strong></pre>
<p>
is equivalent to `make test-all'.
</p>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.27</div>
</body>
</html>
|