Date: Sun, 25 Dec 2016 09:54:29 +0000 (UTC) From: Peter Holm <pho@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r310535 - in user/pho/stress2/testcases: thr1 thr2 Message-ID: <201612250954.uBP9sTbJ037917@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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++)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612250954.uBP9sTbJ037917>