From c31939367c90c36a1c1c7381af44d901b2b3dc43 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Fri, 22 May 2020 15:48:42 -0500 Subject: [PATCH] remove obsolete test --- tests/base/mutex_01.cc | 66 -------------------------------------- tests/base/mutex_01.output | 3 -- 2 files changed, 69 deletions(-) delete mode 100644 tests/base/mutex_01.cc delete mode 100644 tests/base/mutex_01.output diff --git a/tests/base/mutex_01.cc b/tests/base/mutex_01.cc deleted file mode 100644 index 889dd8d8f8..0000000000 --- a/tests/base/mutex_01.cc +++ /dev/null @@ -1,66 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2009 - 2018 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - - -// verify that mutexes work correctly in MT context - -#include - -#include "../tests.h" - - -Threads::Mutex mutex; - - -void -test() -{ - // get the mutex, but note that it is first - // held by main() which will therefore - // usually get to write to deallog first - mutex.acquire(); - deallog << "2" << std::endl; -} - - -int -main() -{ - initlog(); - -#ifdef DEAL_II_WITH_THREADS - - mutex.acquire(); - - Threads::Thread<> t = Threads::new_thread(&test); - - std::this_thread::sleep_for(std::chrono::seconds(2)); - deallog << "1" << std::endl; - - mutex.release(); - t.join(); - - // the other thread should now have acquired the mutex, so release it - // again (destroying an acquired lock invokes undefined behavior in - // pthread_mutex_destroy) - mutex.release(); - -#else - - // make sure the test also works in non-MT mode - deallog << "1" << std::endl; - deallog << "2" << std::endl; -#endif -} diff --git a/tests/base/mutex_01.output b/tests/base/mutex_01.output deleted file mode 100644 index c400c47d62..0000000000 --- a/tests/base/mutex_01.output +++ /dev/null @@ -1,3 +0,0 @@ - -DEAL::1 -DEAL::2 -- 2.39.5