diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-01-01 17:22:09 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-01-01 17:22:09 -0800 |
| commit | 6bcc32035a4605ee747e7834822d049cc0ac4aaf (patch) | |
| tree | 6a23ce017ea0d9ed3faf255095692ea6b45b6ef8 | |
| parent | 3fd43c488b47874db22a87a1d87eed94bbd85725 (diff) | |
| download | nng-6bcc32035a4605ee747e7834822d049cc0ac4aaf.tar.gz nng-6bcc32035a4605ee747e7834822d049cc0ac4aaf.tar.bz2 nng-6bcc32035a4605ee747e7834822d049cc0ac4aaf.zip | |
Fix possible race in platform test.
| -rw-r--r-- | tests/platform.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/platform.c b/tests/platform.c index eed5adab..e252fa05 100644 --- a/tests/platform.c +++ b/tests/platform.c @@ -156,7 +156,6 @@ TestMain("Platform Operations", { So(nni_thr_init(&thr, notifyafter, &arg) == 0); Reset({ - nni_thr_fini(&thr); nni_cv_fini(&arg.cv); nni_mtx_fini(&arg.mx); }); @@ -171,6 +170,7 @@ TestMain("Platform Operations", { nni_cv_wait(&arg.cv); } nni_mtx_unlock(&arg.mx); + nni_thr_fini(&thr); So(arg.did == 1); }) @@ -184,6 +184,7 @@ TestMain("Platform Operations", { } So(arg.did == 0); nni_mtx_unlock(&arg.mx); + nni_thr_fini(&thr); }) Convey("Not running works", { @@ -195,6 +196,7 @@ TestMain("Platform Operations", { } So(arg.did == 0); nni_mtx_unlock(&arg.mx); + nni_thr_fini(&thr); }) }) })
\ No newline at end of file |
