diff -r a179b74831c9 -r c1f20ce4abcf kerneltest/e32test/mmu/t_shbuf.cpp --- a/kerneltest/e32test/mmu/t_shbuf.cpp Thu Aug 19 11:14:22 2010 +0300 +++ b/kerneltest/e32test/mmu/t_shbuf.cpp Tue Aug 31 16:34:26 2010 +0300 @@ -39,6 +39,8 @@ const TInt* PtrBufSize; +static TInt ThreadCounter = 0; + RShBufTestChannel Ldd; _LIT(KTestSlave, "SLAVE"); @@ -622,12 +624,14 @@ { RShBuf buf; r = buf.Alloc(aPool); + RDebug::Printf("alloc buf %d returned %d", bufarray.Count(), r); if (r==KErrNoMemory && KTestPoolSizeInBufs>bufarray.Count()) { // try again after a delay, to allow for background resource allocation User::After(1000000); r = buf.Alloc(aPool); + RDebug::Printf("re-alloc buf %d returned %d", bufarray.Count(), r); } if (!r) { @@ -645,6 +649,7 @@ { bufarray[--n].Close(); } + RDebug::Printf("closed bufs"); User::After(500000); @@ -653,11 +658,13 @@ while (n threadname; + threadname.Format(_L("ThreadLowSpacePanic%d"), ++ThreadCounter); + test.Printf(_L("RequestLowSpacePanic@%d(%S)\n"), aLine, &threadname); TBool jit = User::JustInTime(); User::SetJustInTime(EFalse); TInt expectedpaniccode = KErrNone; // Initialised to silence compiler warnings @@ -1897,8 +1906,6 @@ RThread threadpanic; TRequestStatus threadpanicrs; TInt r; - TBuf<30> threadname; - threadname.Format(_L("ThreadLowSpacePanic%d"), count); r = threadpanic.Create(threadname, ThreadLowSpacePanic, KDefaultStackSize, KMinHeapSize, 1 << 20, (TAny*) &targs); test_KErrNone(r); threadpanic.Logon(threadpanicrs); @@ -1925,7 +1932,10 @@ test_KErrNone(r); RThread thread; TRequestStatus threadrs; - r = thread.Create(_L("ThreadNotifications"), ThreadNotifications, KDefaultStackSize, KMinHeapSize, 1 << 20, (TAny*) &aPool); + TBuf<40> threadname; + threadname.Format(_L("ThreadNotifications%d"), ++ThreadCounter); + test.Printf(_L("Create %S\n"), &threadname); + r = thread.Create(threadname, ThreadNotifications, KDefaultStackSize, KMinHeapSize, 1 << 20, (TAny*) &aPool); test_KErrNone(r); thread.SetPriority(EPriorityMore); thread.Logon(threadrs); @@ -2077,9 +2087,13 @@ RSemaphore sem; r = sem.CreateGlobal(KTestLowSpaceSemaphore, 0); test_KErrNone(r); + + TBuf<40> threadname; + threadname.Format(_L("ThreadCancelNotifications%d"), ++ThreadCounter); + test.Printf(_L("Create %S\n"), &threadname); RThread thread; TRequestStatus threadrs; - r = thread.Create(_L("ThreadCancelNotifications"), ThreadNotifications, KDefaultStackSize, KMinHeapSize, 1 << 20, (TAny*) &aPool); + r = thread.Create(threadname, ThreadNotifications, KDefaultStackSize, KMinHeapSize, 1 << 20, (TAny*) &aPool); test_KErrNone(r); thread.SetPriority(EPriorityLess); thread.Logon(threadrs);