aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-01-08 08:46:29 +0300
committerShuah Khan <skhan@linuxfoundation.org>2020-01-09 16:21:23 -0700
commit192c197cbca599321de95a4cf15c2fa0681140d3 (patch)
tree8db93d8f4f6c3fa1309d1bab77c88c458430dfae /tools/testing
parentselftests: fix build behaviour on targets' failures (diff)
downloadlinux-dev-192c197cbca599321de95a4cf15c2fa0681140d3.tar.xz
linux-dev-192c197cbca599321de95a4cf15c2fa0681140d3.zip
selftests: Uninitialized variable in test_cgcore_proc_migration()
The "c_threads" variable is used in the error handling code before it has been initialized Fixes: 11318989c381 ("selftests: cgroup: Add task migration tests") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Michal Koutný <mkoutny@suse.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/cgroup/test_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/cgroup/test_core.c b/tools/testing/selftests/cgroup/test_core.c
index c5ca669feb2b..e19ce940cd6a 100644
--- a/tools/testing/selftests/cgroup/test_core.c
+++ b/tools/testing/selftests/cgroup/test_core.c
@@ -369,7 +369,7 @@ static void *dummy_thread_fn(void *arg)
static int test_cgcore_proc_migration(const char *root)
{
int ret = KSFT_FAIL;
- int t, c_threads, n_threads = 13;
+ int t, c_threads = 0, n_threads = 13;
char *src = NULL, *dst = NULL;
pthread_t threads[n_threads];