bt2: add missing parameter to _UserComponentType._query
While running the Python test suite, I saw this unexpected stack trace:
test_query_not_implemented (test_component_class.UserComponentClassTestCase) ...
06-21 11:22:56.091 24065 24065 E BT2-PY bt_py3_component_class_query@native_bt_wrap.c:4442 Failed to call Python class's _query_from_native() method: py-cls-addr=0x6190001ce898
06-21 11:22:56.092 24065 24065 E BT2-PY bt2_py_loge_exception@native_bt_wrap.c:3838 Traceback (most recent call last):
File "/home/smarchi/build/babeltrace/src/bindings/python/bt2/build/build_lib/bt2/component.py", line 539, in _query_from_native
results = cls._query(query_exec, obj, params, log_level)
TypeError: _query() takes 4 positional arguments but 5 were given
This is because method _UserComponentType._query is missing the
log_level argument that was added in a recent commit. The reason the
test still passes is that it expects bt2.Error to be raised (coming from
the raise NotImplementedError). The failure to call _query also ends up
raising a bt2.Error. So it succeeds to fail, but it doesn't fail the
right way, and the test fails to properly catch that failure.
Change-Id: If13bfdecc2876610fe8568a12043be60762d1596
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1530
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
This page took 0.024669 seconds and 4 git commands to generate.