rteval-loads/SOURCES/0026-stress-memthrash-silen...

33 lines
906 B
Diff

From c352fe6413a986d680ee838c1604185e79122bc2 Mon Sep 17 00:00:00 2001
From: Colin Ian King <colin.king@canonical.com>
Date: Thu, 21 May 2020 11:36:22 +0100
Subject: [PATCH 26/28] stress-memthrash: silently ignore ESRCH pthread_join
failures
This is not strictly an error conditions, so ignore it.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
stress-memthrash.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/stress-memthrash.c b/stress-memthrash.c
index 4de645181a75..93f359518693 100644
--- a/stress-memthrash.c
+++ b/stress-memthrash.c
@@ -543,9 +543,10 @@ reap:
for (i = 0; i < max_threads; i++) {
if (!ret[i]) {
ret[i] = pthread_join(pthreads[i], NULL);
- if (ret[i])
+ if (ret[i] && (ret[i] != ESRCH)) {
pr_fail("%s: pthread join failed, errno=%d (%s)\n",
args->name, ret[i], strerror(ret[i]));
+ }
}
}
reap_mem:
--
2.21.3