]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
Disable broken test
authorMichal 'vorner' Vaner <michal.vaner@nic.cz>
Tue, 4 Sep 2012 10:37:35 +0000 (12:37 +0200)
committerMichal 'vorner' Vaner <michal.vaner@nic.cz>
Tue, 4 Sep 2012 10:37:35 +0000 (12:37 +0200)
The test may be broken by design. In such case, it should be removed.
But it is left there for now, maybe it's just broken implementation and
someone (the reviewer?) may have an idea how to fix it.

src/lib/util/threads/tests/lock_unittest.cc

index c2755cf12724401b7f7eb34d76b26a3d754b07ef..19c1074561024a7791d3906fba1201d7ac1def7d 100644 (file)
@@ -46,13 +46,17 @@ TEST(MutexTest, lockMultiple) {
 }
 
 // Destroying a locked mutex is a bad idea as well
-TEST(MutexTest, destroyLocked) {
+//
+// FIXME: The test is disabled, since it screws something up in the VM (other
+// tests fail then with rather cryptic messages, memory dumps and stuff).
+// Any idea how to make the test work and reasonably safe?
+TEST(MutexTest, DISABLED_destroyLocked) {
     // TODO: This probably won't work for non-debug mutexes. Disable on non-debug
     // compilation.
     Mutex* mutex = new Mutex;
-    Mutex::Locker* locker = new Mutex::Locker(*mutex);
+    new Mutex::Locker(*mutex);
     EXPECT_THROW(delete mutex, isc::InvalidOperation);
-    // Note: This maybe leaks the locker. But this is a test for development aid
+    // Note: This leaks the locker. But this is a test for development aid
     // exception. The exception won't happen in normal build anyway and seeing
     // it means there's a bug. And we can't delete the locker now, since it
     // would access uninitialized memory.