mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 782616 - Don't return nsresult from main() (storage/); r=mak
This commit is contained in:
parent
e78f249443
commit
1a39148dea
@ -293,13 +293,13 @@ CheckForDeadlock(const char* test, const char* const* findTokens)
|
||||
// Single-threaded sanity tests
|
||||
|
||||
// Stupidest possible deadlock.
|
||||
nsresult
|
||||
int
|
||||
Sanity_Child()
|
||||
{
|
||||
TestMutex m1("dd.sanity.m1");
|
||||
m1.Lock();
|
||||
m1.Lock();
|
||||
return NS_OK; // not reached
|
||||
return 0; // not reached
|
||||
}
|
||||
|
||||
nsresult
|
||||
@ -321,7 +321,7 @@ Sanity()
|
||||
}
|
||||
|
||||
// Slightly less stupid deadlock.
|
||||
nsresult
|
||||
int
|
||||
Sanity2_Child()
|
||||
{
|
||||
TestMutex m1("dd.sanity2.m1");
|
||||
@ -329,7 +329,7 @@ Sanity2_Child()
|
||||
m1.Lock();
|
||||
m2.Lock();
|
||||
m1.Lock();
|
||||
return NS_OK; // not reached
|
||||
return 0; // not reached
|
||||
}
|
||||
|
||||
nsresult
|
||||
@ -352,7 +352,7 @@ Sanity2()
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
int
|
||||
Sanity3_Child()
|
||||
{
|
||||
TestMutex m1("dd.sanity3.m1");
|
||||
@ -371,7 +371,7 @@ Sanity3_Child()
|
||||
|
||||
m4.Lock();
|
||||
m1.Lock();
|
||||
return NS_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
nsresult
|
||||
@ -395,7 +395,7 @@ Sanity3()
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
int
|
||||
Sanity4_Child()
|
||||
{
|
||||
mozilla::ReentrantMonitor m1("dd.sanity4.m1");
|
||||
@ -403,7 +403,7 @@ Sanity4_Child()
|
||||
m1.Enter();
|
||||
m2.Lock();
|
||||
m1.Enter();
|
||||
return NS_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
nsresult
|
||||
@ -449,7 +449,7 @@ TwoThreads_thread(void* arg)
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
int
|
||||
TwoThreads_Child()
|
||||
{
|
||||
ttM1 = new TestMutex("dd.twothreads.m1");
|
||||
@ -463,7 +463,7 @@ TwoThreads_Child()
|
||||
PRThread* t2 = spawn(TwoThreads_thread, (void*) 1);
|
||||
PR_JoinThread(t2);
|
||||
|
||||
return NS_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
nsresult
|
||||
@ -505,7 +505,7 @@ ContentionNoDeadlock_thread(void* arg)
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
int
|
||||
ContentionNoDeadlock_Child()
|
||||
{
|
||||
PRThread* threads[3];
|
||||
@ -522,7 +522,7 @@ ContentionNoDeadlock_Child()
|
||||
for (uint32_t i = 0; i < ArrayLength(cndMs); ++i)
|
||||
delete cndMs[i];
|
||||
|
||||
return NS_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
nsresult
|
||||
@ -574,7 +574,8 @@ main(int argc, char** argv)
|
||||
if (!strcmp("ContentionNoDeadlock", test))
|
||||
return ContentionNoDeadlock_Child();
|
||||
|
||||
FAIL("unknown child test");
|
||||
fail("%s | %s - unknown child test", __FILE__, __FUNCTION__);
|
||||
return 1;
|
||||
}
|
||||
|
||||
ScopedXPCOM xpcom("Storage deadlock detector correctness (" __FILE__ ")");
|
||||
|
Loading…
Reference in New Issue
Block a user