diff options
Diffstat (limited to 'meta/recipes-kernel/lttng/lttng-tools/0002-Fix-test-skip-test_getcpu_override-on-single-thread-.patch')
-rw-r--r-- | meta/recipes-kernel/lttng/lttng-tools/0002-Fix-test-skip-test_getcpu_override-on-single-thread-.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0002-Fix-test-skip-test_getcpu_override-on-single-thread-.patch b/meta/recipes-kernel/lttng/lttng-tools/0002-Fix-test-skip-test_getcpu_override-on-single-thread-.patch new file mode 100644 index 0000000000..5bb88d21e5 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-tools/0002-Fix-test-skip-test_getcpu_override-on-single-thread-.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From e7db27668a9d7fd279d45bc43f3a2d5847374e7b Mon Sep 17 00:00:00 2001 | ||
2 | From: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> | ||
3 | Date: Tue, 12 Mar 2019 12:04:58 -0400 | ||
4 | Subject: [PATCH lttng-tools 1/2] Fix: test: skip test_getcpu_override on | ||
5 | single thread system | ||
6 | |||
7 | There is no value in performing this test on single thread system | ||
8 | since the only valid value for the cpu field is 0. | ||
9 | |||
10 | This test currently fails on single thread system (i.e yocto runquemu) | ||
11 | on the test_getcpu_override_fail test case. | ||
12 | |||
13 | Upstream-Status: Accepted [f87d0ca370c17b597762f5ee218f0e821ed2452d] | ||
14 | Backported to 2.11 and 2.10 | ||
15 | |||
16 | Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> | ||
17 | --- | ||
18 | .../ust/getcpu-override/test_getcpu_override | 16 +++++++++++----- | ||
19 | 1 file changed, 11 insertions(+), 5 deletions(-) | ||
20 | |||
21 | diff --git a/tests/regression/ust/getcpu-override/test_getcpu_override b/tests/regression/ust/getcpu-override/test_getcpu_override | ||
22 | index 4ca385aeb..ee3e31953 100755 | ||
23 | --- a/tests/regression/ust/getcpu-override/test_getcpu_override | ||
24 | +++ b/tests/regression/ust/getcpu-override/test_getcpu_override | ||
25 | @@ -157,13 +157,19 @@ plan_tests $NUM_TESTS | ||
26 | |||
27 | print_test_banner "$TEST_DESC" | ||
28 | |||
29 | -if [ -x "$CURDIR/.libs/lttng-ust-getcpu-override-test.so" ]; then | ||
30 | - foundobj=1 | ||
31 | -else | ||
32 | - foundobj=0 | ||
33 | +if [ ! -x "$CURDIR/.libs/lttng-ust-getcpu-override-test.so" ]; then | ||
34 | + skip 0 "No shared object generated. Skipping all tests." $NUM_TESTS && exit 0 | ||
35 | +fi | ||
36 | + | ||
37 | +if [ "$num_cpus" -eq "1" ]; then | ||
38 | + # Skip the test since we cannot perform it as designed since N mod 1 | ||
39 | + # is always equals to zero. There is no point testing this on a system | ||
40 | + # with a single thread. LTTng-UST limits the get_cpu function to return | ||
41 | + # value inside the [0, NUM_CPU - 1] range for a valid event (present in | ||
42 | + # trace). | ||
43 | + skip 0 "Test system only have a single thread. Skipping all tests." $NUM_TESTS && exit 0 | ||
44 | fi | ||
45 | |||
46 | -skip $foundobj "No shared object generated. Skipping all tests." $NUM_TESTS && exit 0 | ||
47 | |||
48 | TESTS=( | ||
49 | test_getcpu_override_fail | ||
50 | -- | ||
51 | 2.17.1 | ||
52 | |||