tests: cleanup: Explain the purpose of some tests
authorErica Bugden <ebugden@efficios.com>
Fri, 5 May 2023 17:37:00 +0000 (13:37 -0400)
committerErica Bugden <ebugden@efficios.com>
Wed, 31 May 2023 15:19:34 +0000 (11:19 -0400)
Tests explained:
    * test_everything() (see note below)
    * `include` test cases

Identifying the intended purpose of the `include` test cases is a
partial prerequisite for the future work of checking that each
configuration test expecting a failure fails for the intended reason. At
the momment, we only check that configuration fails regardless of the
reason.

Note: test_everything() is a single stand alone test case that dates
back to from barectf 2 before the `tracing` tests existed. This is why
it checks more than just configuration generation. It is possibly
redundant with the more extensive tracing tests.

Change-Id: I59fe258b4f1eb7ef5c83f717f12973d38269adb4
Signed-off-by: Erica Bugden <ebugden@efficios.com>
tests/config/yaml/2/configs/fail/include/cycle.yaml
tests/config/yaml/2/configs/fail/include/file-not-found-abs.yaml
tests/config/yaml/2/configs/fail/include/file-not-found-in-array.yaml
tests/config/yaml/2/configs/fail/include/file-not-found-recursive.yaml
tests/config/yaml/2/test_pass_everything.py

index 78e54675ed5d4ed7d612b2ce6d204da94addf74d..751349dd2fa511cafb07dd14e93f5418f114a029 100644 (file)
@@ -21,6 +21,8 @@
 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
+# Tests that configuration parsing will fail when there is an inclusion
+# loop (recursion) in the included files.
 version: '2.1'
 metadata:
   $include: recursive1.inc.yaml
index 0965276599567e5f7116b221fc1aa5a8c1e01d19..2f325e15a6e179062fd3fb513c991d6952f22b31 100644 (file)
@@ -21,6 +21,8 @@
 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
+# Tests that configuration parsing will fail when a file with an invalid
+# absolute path is included.
 version: '2.1'
 metadata:
   $include: /path/to/not/found
index 34714b663cd59ed2871275a044929bb59ff8711b..dcc3c5fa45b291812a6c248dc41cb648738c03c9 100644 (file)
@@ -21,6 +21,8 @@
 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
+# Tests that configuration parsing will fail when a file that is not
+# found is included.
 version: '2.1'
 metadata:
   $include:
index 8bc46ee3bb00c9643a67654e90f5c1182df2e064..203f71f6ae7444eaa792a06a8dedbe6abbe308de 100644 (file)
@@ -21,6 +21,8 @@
 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
+# Tests that configuration parsing will fail when a file that includes a
+# file that cannot be found is included.
 version: '2.1'
 metadata:
   $include: include-not-found.inc.yaml
index 2ea9abffa13820f8adf73a455334fa140c271650..415c9b27af78afabe0a06fa367b61af0541b5212 100644 (file)
@@ -27,6 +27,8 @@ import barectf
 import subprocess
 
 
+# Tests that a barectf 2 configuration using many features will
+# generate tracer C code that appears valid and functional.
 def test_everything(request, tmpdir):
     yaml_path = os.path.join(os.path.dirname(request.fspath), 'configs',
                              'pass', 'everything', 'config.yaml')
This page took 0.025192 seconds and 4 git commands to generate.