Commit Graph

7 Commits

Author SHA1 Message Date
Kotresh HR
2c2ef6d56b qa: Add test for per-module finisher thread
Fixes: https://tracker.ceph.com/issues/51177
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2023-03-29 11:34:07 +05:30
Patrick Donnelly
d8ec1bd8e6
qa: allow check_counter to look at nested keys
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2022-09-26 22:19:21 -04:00
Patrick Donnelly
8114bdd964
qa: allow specifying min for check-counter
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2022-06-11 20:17:41 -04:00
Kefu Chai
d7258ea7fd qa/tasks: use next(iter(..)) for accessing first element in a view
in python2, dict.values() and dict.keys() return lists. but in python3,
they return views, which cannot be indexed directly using an integer index.

there are three use cases when we access these views in python3:

1. get the first element
2. get all the elements and then *might* want to access them by index
3. get the first element assuming there is only a single element in
   the view
4. iterate thru the view

in the 1st case, we cannot assume the number of elements, so to be
python3 compatible, we should use `next(iter(a_dict))` instead.

in the 2nd case, in this change, the view is materialized using
`list(a_dict)`.

in the 3rd case, we can just continue using the short hand of
```py
(first_element,) = a_dict.keys()
```
to unpack the view. this works in both python2 and python3.

in the 4th case, the existing code works in both python2 and python3, as
both list and view can be iterated using `iter`, and `len` works as
well.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-07 20:33:47 +08:00
Thomas Bechtold
0127cd1e88 qa: Enable flake8 tox and fix failures
There were a couple of problems found by flake8 in the qa/
directory (most of them fixed now). Enabling flake8 during the usual
check runs hopefully avoids adding new issues in the future.

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2019-12-12 10:21:01 +01:00
Yan, Zheng
d46dbbebac qa/cephfs: add tests for multimds snapshot
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2018-02-09 18:42:29 +08:00
John Spray
e90e37690a qa/tasks: add check_counter.py
We need this for CephFS, to verify that workloads
we expect to do a particular thing (like directory fragmentation
or metadata exports) are really doing it.

This is for giving us confidence in our coverage of these
features rather than testing them per se.

Fixes: http://tracker.ceph.com/issues/16523
Signed-off-by: John Spray <john.spray@redhat.com>
2017-03-28 23:26:34 +01:00