svn commit: r310535 - in user/pho/stress2/testcases: thr1 thr2
Peter Holm
pho at FreeBSD.org
Sun Dec 25 09:54:30 UTC 2016
Author: pho
Date: Sun Dec 25 09:54:28 2016
New Revision: 310535
URL: https://svnweb.freebsd.org/changeset/base/310535
Log:
Fix bug in error handling.
Sponsored by: Dell EMC Isilon
Modified:
user/pho/stress2/testcases/thr1/thr1.c
user/pho/stress2/testcases/thr2/thr2.c
Modified: user/pho/stress2/testcases/thr1/thr1.c
==============================================================================
--- user/pho/stress2/testcases/thr1/thr1.c Sun Dec 25 09:40:44 2016 (r310534)
+++ user/pho/stress2/testcases/thr1/thr1.c Sun Dec 25 09:54:28 2016 (r310535)
@@ -68,7 +68,7 @@ test(void)
for (i = 0; i < NTHREADS; i++)
if ((r = pthread_create(&threads[i], NULL, thr_routine, 0)) != 0)
- err(1, "pthread_create(): %s\n", strerror(r));
+ errc(1, r, "pthread_create()");
for (i = 0; i < NTHREADS; i++)
if ((r = pthread_join(threads[i], NULL)) != 0)
Modified: user/pho/stress2/testcases/thr2/thr2.c
==============================================================================
--- user/pho/stress2/testcases/thr2/thr2.c Sun Dec 25 09:40:44 2016 (r310534)
+++ user/pho/stress2/testcases/thr2/thr2.c Sun Dec 25 09:54:28 2016 (r310535)
@@ -77,15 +77,15 @@ test(void)
for (i = 0; i < NTHREADS; i++)
if ((r = pthread_create(&threads[i], NULL, thr1, 0)) != 0)
- err(1, "pthread_create(): %s\n", strerror(r));
+ errc(1, r, "pthread_create()");
for (i = 0; i < NTHREADS; i++)
if (pthread_join(threads[i], NULL) != 0)
- err(1, "pthread_join(%d)", i);
+ errc(1, r, "pthread_join(%d)", i);
for (i = 0; i < NTHREADS; i++)
if ((r = pthread_create(&threads[i], NULL, thr2, 0)) != 0)
- err(1, "pthread_create(): %s\n", strerror(r));
+ errc(1, r, "pthread_create()");
done = 1;
for (i = 0; i < NTHREADS; i++)
More information about the svn-src-user
mailing list