Re: CppUnit and multi-threading
"Baptiste Lepilleur" <[email protected]> Thu, 17 Jul 2003 22:52:31 +0200
| Newsgroups | gmane.comp.lib.cppunit.devel |
|---|---|
| Message-ID | <010801c34ca5$5d7f1430$89e32cd5@gaia> |
This is a multi-part message in MIME format. ------=_NextPart_000_0101_01C34CB6.1B192F20 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MessageTestFactoryRegistry is not thread-safe, but you can easily wrap = it to make it so. CppUnit is thread-safe, which the exception of the TypeInfoHelper which = use a static variable (but it should be initialized at when registering = the test factory, so it is probably ok). What exactly are you trying to multithread ?=20 1) running multiple test case at the same time, using multiple test = result ? 2) a test case which multiple thread ? 3) ??? Baptiste. ----- Original Message -----=20 From: Tzanev, Stefan=20 To: [email protected]=20 Sent: Tuesday, July 15, 2003 9:31 PM Subject: [Cppunit-devel] CppUnit and multi-threading Dear Sirs, I'm using CppUnit for a first time and I have problems testing a = multithreaded system. Should I create a separate TestFixture (suite) for each thread or is = there a=20 different approach? That is, does CppUnit support multi-threading? Is it possible to use TestFactoryRegistry in a multi-threaded = environment? Thank you. Sincerely, Stefan Tzanev Software Engineer Software Applications Group Respironics, Inc. Phone: 724-387-4860 = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D = CONFIDENTIALITY NOTICE ---------------------- This message, together = with any attachments, may be legally privileged and is confidential = information intended only for the use of the individual or entity to = which it is addressed. It is exempt from disclosure under applicable law = including court orders. If you are not the intended recipient, you are = hereby notified that any use, dissemination, distribution or copy of = this message, or any attachment, is strictly prohibited. If you have = received this message in error, please notify the original sender and = delete this message, along with any attachments, from your computer. ------=_NextPart_000_0101_01C34CB6.1B192F20 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML xmlns:o =3D=20 "urn:schemas-microsoft-com:office:office"><HEAD><TITLE>Message</TITLE> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2800.1170" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3D"Courier New" size=3D2>TestFactoryRegistry is not = thread-safe, but=20 you can easily wrap it to make it so.</FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2></FONT> </DIV> <DIV><FONT face=3D"Courier New" size=3D2>CppUnit is thread-safe, which = the exception=20 of the TypeInfoHelper which use a static variable (but it should be = initialized=20 at when registering the test factory, so it is probably = ok).</FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2></FONT> </DIV> <DIV><FONT face=3D"Courier New" size=3D2>What exactly are you trying to = multithread=20 ? </FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2>1) running multiple test case = at the same=20 time, using multiple test result ?</FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2>2) a test case which multiple = thread=20 ?</FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2>3) ???</FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2></FONT> </DIV> <DIV><FONT face=3D"Courier New" size=3D2>Baptiste.</FONT></DIV> <BLOCKQUOTE=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV> <DIV=20 style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: = black"><B>From:</B>=20 <A [email protected]=20 href=3D"mailto:[email protected]">Tzanev, Stefan</A> = </DIV> <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20 title=3Dcppunit-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org=20 = href=3D"mailto:[email protected]">[email protected]= ourceforge.net</A>=20 </DIV> <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Tuesday, July 15, 2003 = 9:31=20 PM</DIV> <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> [Cppunit-devel] = CppUnit and=20 multi-threading</DIV> <DIV><BR></DIV> <DIV><FONT face=3D"Courier New" size=3D2><SPAN = class=3D571352116-15072003>Dear=20 Sirs,</SPAN></FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2><SPAN = class=3D571352116-15072003>I'm using=20 CppUnit for a first time and I have problems testing a multithreaded=20 system.</SPAN></FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2><SPAN = class=3D571352116-15072003>Should I=20 create a separate TestFixture (suite) for each thread or is there a=20 </SPAN></FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2><SPAN = class=3D571352116-15072003>different=20 approach? That is, does CppUnit support = multi-threading?</SPAN></FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2><SPAN = class=3D571352116-15072003>Is it=20 possible to use TestFactoryRegistry in a multi-threaded=20 environment?</SPAN></FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2><SPAN = class=3D571352116-15072003>Thank=20 you.</SPAN></FONT></DIV> <DIV><SPAN class=3D571352116-15072003><FONT face=3D"Courier New"=20 size=3D2>Sincerely,</FONT></SPAN></DIV> <DIV><SPAN class=3D571352116-15072003><FONT face=3D"Courier New"=20 size=3D2></FONT></SPAN> </DIV> <P class=3DMsoNormal style=3D"MARGIN: 0in 0in 0pt" align=3Dleft><B=20 style=3D"mso-bidi-font-weight: normal"><I=20 style=3D"mso-bidi-font-style: normal"><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; = mso-no-proof: yes">Stefan=20 Tzanev<o:p></o:p></SPAN></I></B></P> <P class=3DMsoNormal style=3D"MARGIN: 0in 0in 0pt" align=3Dleft><I=20 style=3D"mso-bidi-font-style: normal"><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; = mso-no-proof: yes">Software=20 Engineer<o:p></o:p></SPAN></I></P> <P class=3DMsoNormal style=3D"MARGIN: 0in 0in 0pt" align=3Dleft><I=20 style=3D"mso-bidi-font-style: normal"><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; = mso-no-proof: yes">Software=20 Applications Group<o:p></o:p></SPAN></I></P> <DIV align=3Dleft><I style=3D"mso-bidi-font-style: normal"><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; = mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; = mso-ansi-language: EN-US; mso-fareast-language: EN-US; = mso-bidi-language: AR-SA">Respironics,=20 Inc.</SPAN></I></DIV> <DIV align=3Dleft><I style=3D"mso-bidi-font-style: normal"><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; = mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; = mso-ansi-language: EN-US; mso-fareast-language: EN-US; = mso-bidi-language: AR-SA">Phone:=20 724-387-4860</SPAN></I></DIV> = <DIV> </DIV>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=20 CONFIDENTIALITY NOTICE ---------------------- This message, together = with any=20 attachments, may be legally privileged and is confidential information = intended only for the use of the individual or entity to which it is=20 addressed. It is exempt from disclosure under applicable law including = court=20 orders. If you are not the intended recipient, you are hereby notified = that=20 any use, dissemination, distribution or copy of this message, or any=20 attachment, is strictly prohibited. If you have received this message = in=20 error, please notify the original sender and delete this message, = along with=20 any attachments, from your computer. </BLOCKQUOTE></BODY></HTML> ------=_NextPart_000_0101_01C34CB6.1B192F20-- ------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0