summaryrefslogtreecommitdiffstats
path: root/sal/qa/osl
diff options
context:
space:
mode:
Diffstat (limited to 'sal/qa/osl')
-rw-r--r--sal/qa/osl/pipe/makefile.mk2
-rw-r--r--sal/qa/osl/pipe/osl_Pipe.cxx87
-rw-r--r--sal/qa/osl/profile/makefile.mk1
-rw-r--r--sal/qa/osl/setthreadname/makefile.mk57
-rwxr-xr-xsal/qa/osl/setthreadname/test-setthreadname.cxx87
-rw-r--r--sal/qa/osl/setthreadname/version.map34
6 files changed, 223 insertions, 45 deletions
diff --git a/sal/qa/osl/pipe/makefile.mk b/sal/qa/osl/pipe/makefile.mk
index fc6728abfe3b..8e91738d0669 100644
--- a/sal/qa/osl/pipe/makefile.mk
+++ b/sal/qa/osl/pipe/makefile.mk
@@ -51,7 +51,7 @@ SHL1OBJS= \
$(SLO)$/osl_Pipe.obj
SHL1TARGET= osl_Pipe
-SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTLIB)
SHL1IMPLIB= i$(SHL1TARGET)
# SHL1DEF= $(MISC)$/$(SHL1TARGET).def
diff --git a/sal/qa/osl/pipe/osl_Pipe.cxx b/sal/qa/osl/pipe/osl_Pipe.cxx
index 6edf247e5061..055c1440ecee 100644
--- a/sal/qa/osl/pipe/osl_Pipe.cxx
+++ b/sal/qa/osl/pipe/osl_Pipe.cxx
@@ -37,6 +37,7 @@
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
#include "cppunit/plugin/TestPlugIn.h"
+#include "test/uniquepipename.hxx"
#include <sal/types.h>
#include <rtl/ustring.hxx>
@@ -184,8 +185,8 @@ namespace osl_Pipe
void ctors_name_option( )
{
/// create a named pipe.
- ::osl::Pipe aPipe( aTestPipeName, osl_Pipe_CREATE );
- ::osl::Pipe aAssignPipe( aTestPipeName, osl_Pipe_OPEN );
+ ::osl::Pipe aPipe( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
+ ::osl::Pipe aAssignPipe( test::uniquePipeName(aTestPipeName), osl_Pipe_OPEN );
bRes = aPipe.is( ) && aAssignPipe.is( );
@@ -197,7 +198,7 @@ namespace osl_Pipe
{
/// create a security pipe.
const ::osl::Security rSecurity;
- ::osl::Pipe aSecurityPipe( aTestPipeName, osl_Pipe_CREATE, rSecurity );
+ ::osl::Pipe aSecurityPipe( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE, rSecurity );
bRes = aSecurityPipe.is( );
@@ -208,7 +209,7 @@ namespace osl_Pipe
void ctors_copy( )
{
/// create a pipe.
- ::osl::Pipe aPipe( aTestPipeName, osl_Pipe_CREATE );
+ ::osl::Pipe aPipe( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
/// create a pipe using copy constructor.
::osl::Pipe aCopyPipe( aPipe );
@@ -231,7 +232,7 @@ namespace osl_Pipe
void ctors_no_acquire( )
{
/// create a pipe.
- ::osl::Pipe aPipe( aTestPipeName, osl_Pipe_CREATE );
+ ::osl::Pipe aPipe( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
/// constructs a pipe reference without acquiring the handle.
::osl::Pipe aNoAcquirePipe( aPipe.getHandle( ), SAL_NO_ACQUIRE );
@@ -247,7 +248,7 @@ namespace osl_Pipe
void ctors_acquire( )
{
/// create a base pipe.
- ::osl::Pipe aPipe( aTestPipeName, osl_Pipe_CREATE );
+ ::osl::Pipe aPipe( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
/// constructs two pipes without acquiring the handle on the base pipe.
::osl::Pipe aAcquirePipe( aPipe.getHandle( ) );
::osl::Pipe aAcquirePipe1( NULL );
@@ -285,14 +286,14 @@ namespace osl_Pipe
void is_002( )
{
- ::osl::Pipe aPipe( aTestPipeName, osl_Pipe_CREATE );
+ ::osl::Pipe aPipe( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
CPPUNIT_ASSERT_MESSAGE( "#test comment#: test is(), a normal pipe creation.", sal_True == aPipe.is( ) );
}
void is_003( )
{
- ::osl::Pipe aPipe( aTestPipeName, osl_Pipe_CREATE );
+ ::osl::Pipe aPipe( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
aPipe.clear( );
CPPUNIT_ASSERT_MESSAGE( "#test comment#: test is(), an invalid case.", sal_False == aPipe.is( ) );
@@ -335,8 +336,8 @@ namespace osl_Pipe
{
const Security rSec;
::osl::Pipe aPipe;
- bRes = aPipe.create( aTestPipeName, osl_Pipe_CREATE, rSec );
- bRes1 = aPipe.create( aTestPipeName, osl_Pipe_CREATE, rSec );
+ bRes = aPipe.create( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE, rSec );
+ bRes1 = aPipe.create( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE, rSec );
aPipe.clear( );
CPPUNIT_ASSERT_MESSAGE( "#test comment#: test creation.",
@@ -347,8 +348,8 @@ namespace osl_Pipe
{
const Security rSec;
::osl::Pipe aPipe, aPipe1;
- bRes = aPipe.create( aTestPipeName, osl_Pipe_CREATE, rSec );
- bRes1 = aPipe1.create( aTestPipeName, osl_Pipe_OPEN, rSec );
+ bRes = aPipe.create( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE, rSec );
+ bRes1 = aPipe1.create( test::uniquePipeName(aTestPipeName), osl_Pipe_OPEN, rSec );
aPipe.clear( );
CPPUNIT_ASSERT_MESSAGE( "#test comment#: test creation and open.",
@@ -358,8 +359,8 @@ namespace osl_Pipe
void create_named_001( )
{
::osl::Pipe aPipe;
- bRes = aPipe.create( aTestPipeName, osl_Pipe_CREATE );
- bRes1 = aPipe.create( aTestPipeName, osl_Pipe_CREATE );
+ bRes = aPipe.create( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
+ bRes1 = aPipe.create( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
aPipe.clear( );
CPPUNIT_ASSERT_MESSAGE( "#test comment#: test creation.",
@@ -369,8 +370,8 @@ namespace osl_Pipe
void create_named_002( )
{
::osl::Pipe aPipe, aPipe1;
- bRes = aPipe.create( aTestPipeName, osl_Pipe_CREATE );
- bRes1 = aPipe1.create( aTestPipeName, osl_Pipe_OPEN );
+ bRes = aPipe.create( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
+ bRes1 = aPipe1.create( test::uniquePipeName(aTestPipeName), osl_Pipe_OPEN );
aPipe.clear( );
CPPUNIT_ASSERT_MESSAGE( "#test comment#: test creation and open.",
@@ -380,7 +381,7 @@ namespace osl_Pipe
void create_named_003( )
{
::osl::Pipe aPipe;
- bRes = aPipe.create( aTestPipeName );
+ bRes = aPipe.create( test::uniquePipeName(aTestPipeName) );
aPipe.clear( );
CPPUNIT_ASSERT_MESSAGE( "#test comment#: test default option is open.",
@@ -408,7 +409,7 @@ namespace osl_Pipe
void clear_001( )
{
::osl::Pipe aPipe;
- aPipe.create( aTestPipeName, osl_Pipe_CREATE );
+ aPipe.create( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
aPipe.clear( );
bRes = aPipe.is( );
@@ -434,7 +435,7 @@ namespace osl_Pipe
void assign_ref( )
{
::osl::Pipe aPipe, aPipe1;
- aPipe.create( aTestPipeName, osl_Pipe_CREATE );
+ aPipe.create( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
aPipe1 = aPipe;
bRes = aPipe1.is( );
bRes1 = aPipe == aPipe1;
@@ -448,7 +449,7 @@ namespace osl_Pipe
void assign_handle( )
{
::osl::Pipe aPipe, aPipe1;
- aPipe.create( aTestPipeName, osl_Pipe_CREATE );
+ aPipe.create( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
aPipe1 = aPipe.getHandle( );
bRes = aPipe1.is( );
bRes1 = aPipe == aPipe1;
@@ -498,7 +499,7 @@ namespace osl_Pipe
void isEqual_001( )
{
::osl::Pipe aPipe;
- aPipe.create( aTestPipeName, osl_Pipe_CREATE );
+ aPipe.create( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
bRes = aPipe == aPipe;
aPipe.close( );
@@ -509,10 +510,10 @@ namespace osl_Pipe
void isEqual_002( )
{
::osl::Pipe aPipe, aPipe1, aPipe2;
- aPipe.create( aTestPipeName, osl_Pipe_CREATE );
+ aPipe.create( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
aPipe1 = aPipe;
- aPipe2.create( aTestPipeName, osl_Pipe_CREATE );
+ aPipe2.create( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
bRes = aPipe == aPipe1;
bRes1 = aPipe == aPipe2;
@@ -541,7 +542,7 @@ namespace osl_Pipe
void close_001( )
{
- ::osl::Pipe aPipe( aTestPipe1, osl_Pipe_CREATE );
+ ::osl::Pipe aPipe( test::uniquePipeName(aTestPipe1), osl_Pipe_CREATE );
aPipe.close( );
bRes = aPipe.is( );
@@ -554,7 +555,7 @@ namespace osl_Pipe
void close_002( )
{
- ::osl::StreamPipe aPipe( aTestPipe1, osl_Pipe_CREATE );
+ ::osl::StreamPipe aPipe( test::uniquePipeName(aTestPipe1), osl_Pipe_CREATE );
aPipe.close( );
int nRet = aPipe.send( m_pTestString1.getStr(), 3 );
@@ -622,7 +623,7 @@ namespace osl_Pipe
void getError_001( )
{
- ::osl::Pipe aPipe( aTestPipeName, osl_Pipe_OPEN );
+ ::osl::Pipe aPipe( test::uniquePipeName(aTestPipeName), osl_Pipe_OPEN );
oslPipeError nError = aPipe.getError( );
printPipeError( aPipe );
aPipe.clear( );
@@ -633,8 +634,8 @@ namespace osl_Pipe
void getError_002( )
{
- ::osl::Pipe aPipe( aTestPipeName, osl_Pipe_CREATE );
- ::osl::Pipe aPipe1( aTestPipeName, osl_Pipe_CREATE );
+ ::osl::Pipe aPipe( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
+ ::osl::Pipe aPipe1( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
oslPipeError nError = aPipe.getError( );
printPipeError( aPipe );
aPipe.clear( );
@@ -661,7 +662,7 @@ namespace osl_Pipe
void getHandle_001( )
{
- ::osl::Pipe aPipe( aTestPipeName, osl_Pipe_OPEN );
+ ::osl::Pipe aPipe( test::uniquePipeName(aTestPipeName), osl_Pipe_OPEN );
bRes = aPipe == aPipe.getHandle( );
aPipe.clear( );
@@ -671,7 +672,7 @@ namespace osl_Pipe
void getHandle_002( )
{
- ::osl::Pipe aPipe( aTestPipeName, osl_Pipe_CREATE );
+ ::osl::Pipe aPipe( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
::osl::Pipe aPipe1( aPipe.getHandle( ) );
bRes = aPipe == aPipe1;
aPipe.clear( );
@@ -724,7 +725,7 @@ namespace osl_StreamPipe
void ctors_none( )
{
// create a pipe.
- ::osl::StreamPipe aStreamPipe( aTestPipeName, osl_Pipe_CREATE );
+ ::osl::StreamPipe aStreamPipe( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
// create an unattached pipe.
::osl::StreamPipe aStreamPipe1;
bRes = aStreamPipe1.is( );
@@ -742,7 +743,7 @@ namespace osl_StreamPipe
void ctors_handle( )
{
// create a pipe.
- ::osl::StreamPipe aStreamPipe( aTestPipeName, osl_Pipe_CREATE );
+ ::osl::StreamPipe aStreamPipe( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
// create a pipe with last handle.
::osl::StreamPipe aStreamPipe1( aStreamPipe.getHandle( ) );
bRes = aStreamPipe1.is( ) && aStreamPipe == aStreamPipe1;
@@ -756,7 +757,7 @@ namespace osl_StreamPipe
void ctors_copy( )
{
// create a pipe.
- ::osl::StreamPipe aStreamPipe( aTestPipeName, osl_Pipe_CREATE );
+ ::osl::StreamPipe aStreamPipe( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
// create an unattached pipe.
::osl::StreamPipe aStreamPipe1( aStreamPipe );
bRes = aStreamPipe1.is( ) && aStreamPipe == aStreamPipe1;
@@ -770,9 +771,9 @@ namespace osl_StreamPipe
void ctors_name_option( )
{
// create a pipe.
- ::osl::StreamPipe aStreamPipe( aTestPipeName, osl_Pipe_CREATE );
+ ::osl::StreamPipe aStreamPipe( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
// create an unattached pipe.
- ::osl::StreamPipe aStreamPipe1( aTestPipeName, osl_Pipe_OPEN );
+ ::osl::StreamPipe aStreamPipe1( test::uniquePipeName(aTestPipeName), osl_Pipe_OPEN );
bRes = aStreamPipe1.is( ) && aStreamPipe.is( );
aStreamPipe.clear( );
aStreamPipe1.clear( );
@@ -785,7 +786,7 @@ namespace osl_StreamPipe
{
/// create a security pipe.
const ::osl::Security rSecurity;
- ::osl::StreamPipe aSecurityPipe( aTestPipeName, osl_Pipe_CREATE, rSecurity );
+ ::osl::StreamPipe aSecurityPipe( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE, rSecurity );
bRes = aSecurityPipe.is( );
aSecurityPipe.clear( );
@@ -807,7 +808,7 @@ namespace osl_StreamPipe
void ctors_no_acquire( )
{
// create a pipe.
- ::osl::StreamPipe aPipe( aTestPipeName, osl_Pipe_CREATE );
+ ::osl::StreamPipe aPipe( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
// constructs a pipe reference without acquiring the handle.
::osl::StreamPipe aNoAcquirePipe( aPipe.getHandle( ), SAL_NO_ACQUIRE );
@@ -844,7 +845,7 @@ namespace osl_StreamPipe
void assign_ref( )
{
::osl::StreamPipe aPipe, aPipe1;
- aPipe.create( aTestPipeName, osl_Pipe_CREATE );
+ aPipe.create( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
aPipe1 = aPipe;
bRes = aPipe1.is( );
bRes1 = aPipe == aPipe1;
@@ -857,7 +858,7 @@ namespace osl_StreamPipe
void assign_handle( )
{
- ::osl::StreamPipe * pPipe = new ::osl::StreamPipe( aTestPipeName, osl_Pipe_CREATE );
+ ::osl::StreamPipe * pPipe = new ::osl::StreamPipe( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
::osl::StreamPipe * pAssignPipe = new ::osl::StreamPipe;
*pAssignPipe = pPipe->getHandle( );
@@ -912,7 +913,7 @@ namespace osl_StreamPipe
sal_Int32 nChars = 0;
printf("open pipe\n");
- ::osl::StreamPipe aSenderPipe( aTestPipeName, osl_Pipe_OPEN ); // aTestPipeName is a string = "TestPipe"
+ ::osl::StreamPipe aSenderPipe( test::uniquePipeName(aTestPipeName), osl_Pipe_OPEN ); // test::uniquePipeName(aTestPipeName) is a string = "TestPipe"
if ( aSenderPipe.is() == sal_False )
{
printf("pipe open failed! \n");
@@ -945,13 +946,13 @@ namespace osl_StreamPipe
{
public:
sal_Char buf[256];
- //::osl::StreamPipe aListenPipe; //( aTestPipeName, osl_Pipe_CREATE );
+ //::osl::StreamPipe aListenPipe; //( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
::osl::Pipe aListenPipe;
::osl::StreamPipe aConnectionPipe;
Pipe_DataSource_Thread( )
{
printf("create pipe\n");
- aListenPipe.create( aTestPipeName, osl_Pipe_CREATE );
+ aListenPipe.create( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
}
~Pipe_DataSource_Thread( )
{
@@ -962,7 +963,7 @@ namespace osl_StreamPipe
{
//create pipe.
sal_Int32 nChars;
- //::osl::StreamPipe aListenPipe( aTestPipeName, osl_Pipe_CREATE );
+ //::osl::StreamPipe aListenPipe( test::uniquePipeName(aTestPipeName), osl_Pipe_CREATE );
printf("listen\n");
if ( aListenPipe.is() == sal_False )
{
diff --git a/sal/qa/osl/profile/makefile.mk b/sal/qa/osl/profile/makefile.mk
index 8379783e19f6..6f7d3e8d34cf 100644
--- a/sal/qa/osl/profile/makefile.mk
+++ b/sal/qa/osl/profile/makefile.mk
@@ -33,7 +33,6 @@ PRJ=..$/..$/..
PRJNAME=sal
TARGET=qa_osl_profile
-# TESTDIR=TRUE
ENABLE_EXCEPTIONS=TRUE
diff --git a/sal/qa/osl/setthreadname/makefile.mk b/sal/qa/osl/setthreadname/makefile.mk
new file mode 100644
index 000000000000..f2d9da15c468
--- /dev/null
+++ b/sal/qa/osl/setthreadname/makefile.mk
@@ -0,0 +1,57 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#***********************************************************************/
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
+PRJ = ..$/..$/..
+PRJNAME = sal
+TARGET = qa_osl_setthreadname
+
+ENABLE_EXCEPTIONS = TRUE
+
+.INCLUDE: settings.mk
+
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
+DLLPRE =
+
+SHL1IMPLIB = i$(SHL1TARGET)
+SHL1OBJS = $(SLO)/test-setthreadname.obj
+SHL1RPATH = NONE
+SHL1STDLIBS = $(CPPUNITLIB) $(SALLIB)
+SHL1TARGET = test-setthreadname
+SHL1VERSIONMAP = version.map
+DEF1NAME = $(SHL1TARGET)
+
+SLOFILES = $(SHL1OBJS)
+
+.INCLUDE: target.mk
+.INCLUDE: _cppunit.mk
+
+.END
diff --git a/sal/qa/osl/setthreadname/test-setthreadname.cxx b/sal/qa/osl/setthreadname/test-setthreadname.cxx
new file mode 100755
index 000000000000..0f0f618395a8
--- /dev/null
+++ b/sal/qa/osl/setthreadname/test-setthreadname.cxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2011 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+#include "precompiled_sal.hxx"
+#include "sal/config.h"
+
+#include <cstdlib>
+#include <iostream>
+#include <limits>
+
+#include "boost/noncopyable.hpp"
+#include "cppunit/TestAssert.h"
+#include "cppunit/TestFixture.h"
+#include "cppunit/extensions/HelperMacros.h"
+#include "cppunit/plugin/TestPlugIn.h"
+#include "osl/thread.hxx"
+
+namespace {
+
+class TestThread: public osl::Thread, private boost::noncopyable {
+private:
+ virtual void SAL_CALL run();
+};
+
+void TestThread::run() {
+#if defined WNT
+ if (std::getenv("URE_TEST_SETTHREADNAME") != 0) {
+ // On Windows, setting thread names appears to only take effect when the
+ // process is being debugged, so attach a debugger now:
+ std::cout << "set: ";
+ std::cin.ignore(std::numeric_limits< int >::max(), '\n');
+ }
+#endif
+ setName("TestThread");
+ if (std::getenv("URE_TEST_SETTHREADNAME") != 0) {
+ // On Linux, the thread name can now be observed with "ps -L"; on
+ // Windows with the Microsoft compiler, the thread name can now be
+ // observed in a debugger.
+ std::cout << "stop: ";
+ std::cin.ignore(std::numeric_limits< int >::max(), '\n');
+ }
+}
+
+class Test: public CppUnit::TestFixture {
+private:
+ CPPUNIT_TEST_SUITE(Test);
+ CPPUNIT_TEST(test);
+ CPPUNIT_TEST_SUITE_END();
+
+ void test();
+};
+
+void Test::test() {
+ TestThread t;
+ t.create();
+ t.join();
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(Test);
+
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sal/qa/osl/setthreadname/version.map b/sal/qa/osl/setthreadname/version.map
new file mode 100644
index 000000000000..ef2ab497cb5e
--- /dev/null
+++ b/sal/qa/osl/setthreadname/version.map
@@ -0,0 +1,34 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#***********************************************************************/
+
+UDK_3_0_0 {
+ global:
+ cppunitTestPlugIn;
+
+ local:
+ *;
+};