gecko/ipc/ipdl/test/cxx
2013-11-19 11:48:10 +09:00
..
app Bug 939044 - Remove most definitions of MODULE. r=mshal 2013-11-19 11:47:39 +09:00
genIPDLUnitTests.py Combine AsyncChannel, SyncChannel, and RPCChannel into one class (bug 901789, r=cjones,bent). 2013-09-27 18:42:08 -07:00
IPDLUnitTestProcessChild.cpp
IPDLUnitTestProcessChild.h
IPDLUnitTests.h
IPDLUnitTests.template.cpp Bug 784739 - Switch from NULL to nullptr in ipc/. r=ehsan 2013-08-23 15:51:44 -04:00
IPDLUnitTestSubprocess.cpp
IPDLUnitTestSubprocess.h
IPDLUnitTestTypes.h
IPDLUnitTestUtils.h
Makefile.in Bug 864774 part 3 - Move some more CPPSRCS to moz.build. r=mshal 2013-10-30 07:51:03 +09:00
moz.build Bug 939074 - Remove most LIBXUL_LIBRARY. rs=gps 2013-11-19 11:48:10 +09:00
PTestActorPunning.ipdl Bug 918651 - part 1 - remove unnecessary using statements from IPDL files; r=ehsan 2013-10-18 14:48:13 -04:00
PTestActorPunningPunned.ipdl
PTestActorPunningSub.ipdl
PTestBadActor.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestBadActorSub.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestBridgeMain.ipdl Bug 930350 - Fix --enable-ipdl-tests build. r=gps. DONTBUILD because NPOTB 2013-10-25 08:39:45 +09:00
PTestBridgeMainSub.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestBridgeSub.ipdl
PTestCrashCleanup.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestDataStructures.ipdl Bug 918651 - part 8 - remove redundant includes from IPDL files; r=ehsan 2013-10-18 13:34:08 -04:00
PTestDataStructuresCommon.ipdlh Bug 918651 - part 5 - qualify all IPDL using statements with required header; r=ehsan 2013-10-01 15:25:07 -04:00
PTestDataStructuresSub.ipdl
PTestDesc.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestDescSub.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestDescSubsub.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestFailedCtor.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestFailedCtorSub.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestFailedCtorSubsub.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestHandle.ipdl
PTestHangs.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestIndirectProtocolParam.ipdlh Bug 783451 - Add ipdl testcases. r=bent DONTBUILD 2013-06-13 13:53:38 +08:00
PTestIndirectProtocolParamFirst.ipdl Bug 783451 - Add ipdl testcases. r=bent DONTBUILD 2013-06-13 13:53:38 +08:00
PTestIndirectProtocolParamManage.ipdl Bug 783451 - Add ipdl testcases. r=bent DONTBUILD 2013-06-13 13:53:38 +08:00
PTestIndirectProtocolParamSecond.ipdl Bug 783451 - Add ipdl testcases. r=bent DONTBUILD 2013-06-13 13:53:38 +08:00
PTestInterruptErrorCleanup.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestInterruptRaces.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestInterruptShutdownRace.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestJSON.ipdl Bug 918651 - part 5 - qualify all IPDL using statements with required header; r=ehsan 2013-10-01 15:25:07 -04:00
PTestLatency.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestManyChildAllocs.ipdl
PTestManyChildAllocsSub.ipdl
PTestMultiMgrs.ipdl
PTestMultiMgrsBottom.ipdl
PTestMultiMgrsLeft.ipdl
PTestMultiMgrsRight.ipdl
PTestNestedLoops.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestOpens.ipdl
PTestOpensOpened.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestRaceDeferral.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestRacyInterruptReplies.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestRacyReentry.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestRacyUndefer.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestRPC.ipdl Introduce new RPC messaging semantics (bug 910493 part 1, r=cjones). 2013-10-01 09:15:03 -07:00
PTestSanity.ipdl
PTestSelfManage.ipdl
PTestSelfManageRoot.ipdl
PTestShmem.ipdl
PTestShutdown.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestShutdownSub.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestShutdownSubsub.ipdl
PTestStackHooks.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestSyncError.ipdl
PTestSyncHang.ipdl
PTestSyncWakeup.ipdl Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
PTestSysVShmem.ipdl
PTestUrgency.ipdl Introduce new RPC messaging semantics (bug 910493 part 1, r=cjones). 2013-10-01 09:15:03 -07:00
README.txt
TestActorPunning.cpp Bug 885804: IPDL unit test changes r=benjamin 2013-07-08 11:48:40 -04:00
TestActorPunning.h Bug 885804: IPDL unit test changes r=benjamin 2013-07-08 11:48:40 -04:00
TestBadActor.cpp Bug 885804: IPDL unit test changes r=benjamin 2013-07-08 11:48:40 -04:00
TestBadActor.h Bug 885804: IPDL unit test changes r=benjamin 2013-07-08 11:48:40 -04:00
TestBridgeMain.cpp Bug 771765 - Support template content process, part 9: allocating a toplevel protocol should return itself. r=dzbarsky 2013-09-26 12:19:09 +08:00
TestBridgeMain.h Bug 771765 - Support template content process, part 9: allocating a toplevel protocol should return itself. r=dzbarsky 2013-09-26 12:19:09 +08:00
TestCrashCleanup.cpp Bug 784739 - Switch from NULL to nullptr in ipc/. r=ehsan 2013-08-23 15:51:44 -04:00
TestCrashCleanup.h
TestDataStructures.cpp Bug 784739 - Switch from NULL to nullptr in ipc/. r=ehsan 2013-08-23 15:51:44 -04:00
TestDataStructures.h Bug 885804: IPDL unit test changes r=benjamin 2013-07-08 11:48:40 -04:00
TestDesc.cpp Bug 885804: IPDL unit test changes r=benjamin 2013-07-08 11:48:40 -04:00
TestDesc.h Bug 885804: IPDL unit test changes r=benjamin 2013-07-08 11:48:40 -04:00
TestFailedCtor.cpp Bug 885804: IPDL unit test changes r=benjamin 2013-07-08 11:48:40 -04:00
TestFailedCtor.h Bug 784739 - Switch from NULL to nullptr in ipc/. r=ehsan 2013-08-23 15:51:44 -04:00
TestHangs.cpp
TestHangs.h
TestInterruptErrorCleanup.cpp Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
TestInterruptErrorCleanup.h Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
TestInterruptRaces.cpp Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
TestInterruptRaces.h Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
TestInterruptShutdownRace.cpp Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
TestInterruptShutdownRace.h Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
TestJSON.cpp
TestJSON.h Bug 885804: IPDL unit test changes r=benjamin 2013-07-08 11:48:40 -04:00
TestLatency.cpp
TestLatency.h
TestManyChildAllocs.cpp Bug 885804: IPDL unit test changes r=benjamin 2013-07-08 11:48:40 -04:00
TestManyChildAllocs.h Bug 885804: IPDL unit test changes r=benjamin 2013-07-08 11:48:40 -04:00
TestMultiMgrs.cpp
TestMultiMgrs.h Bug 885804: IPDL unit test changes r=benjamin 2013-07-08 11:48:40 -04:00
TestNestedLoops.cpp
TestNestedLoops.h
TestOpens.cpp Bug 771765 - Support template content process, part 9: allocating a toplevel protocol should return itself. r=dzbarsky 2013-09-26 12:19:09 +08:00
TestOpens.h Bug 771765 - Support template content process, part 9: allocating a toplevel protocol should return itself. r=dzbarsky 2013-09-26 12:19:09 +08:00
TestRaceDeferral.cpp Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
TestRaceDeferral.h Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
TestRacyInterruptReplies.cpp Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
TestRacyInterruptReplies.h Rename IPDL's RPC to Interrupt (bug 910020, r=bent). 2013-09-30 17:27:45 -07:00
TestRacyReentry.cpp
TestRacyReentry.h
TestRacyUndefer.cpp
TestRacyUndefer.h
TestRPC.cpp Introduce new RPC messaging semantics (bug 910493 part 1, r=cjones). 2013-10-01 09:15:03 -07:00
TestRPC.h Introduce new RPC messaging semantics (bug 910493 part 1, r=cjones). 2013-10-01 09:15:03 -07:00
TestSanity.cpp
TestSanity.h
TestSelfManageRoot.cpp
TestSelfManageRoot.h Bug 885804: IPDL unit test changes r=benjamin 2013-07-08 11:48:40 -04:00
TestShmem.cpp
TestShmem.h
TestShutdown.cpp
TestShutdown.h Bug 885804: IPDL unit test changes r=benjamin 2013-07-08 11:48:40 -04:00
TestStackHooks.cpp Combine AsyncChannel, SyncChannel, and RPCChannel into one class (bug 901789, r=cjones,bent). 2013-09-27 18:42:08 -07:00
TestStackHooks.h
TestSyncError.cpp
TestSyncError.h
TestSyncHang.cpp
TestSyncHang.h
TestSyncWakeup.cpp
TestSyncWakeup.h
TestSysVShmem.cpp
TestSysVShmem.h
TestUrgency.cpp Introduce new RPC messaging semantics (bug 910493 part 1, r=cjones). 2013-10-01 09:15:03 -07:00
TestUrgency.h Don't deadlock on a child process for a CPOW (bug 905896, r=cjones). 2013-08-26 21:56:57 -07:00

To add a new IPDL C++ unit test, you need to create (at least) the
following files (for a test "TestFoo"):

  - PTestFoo.ipdl, specifying the top-level protocol used for the test

  - TestFoo.h, declaring the top-level parent/child actors used for
    the test

  - TestFoo.cpp, defining the top-level actors

  - (make sure all are in the namespace mozilla::_ipdltest)

Next

  - add PTestFoo.ipdl to ipdl.mk

  - append TestFoo to the variable IPDLTESTS in Makefile.in

You must define three methods in your |TestFooParent| class:

  - static methods |bool RunTestInProcesses()| and
    |bool RunTestInThreads()|.  These methods control whether
    to execute the test using actors in separate processes and
    threads respectively.  Generally, both should return true.

  - an instance method |void Main()|.  The test harness wil first
    initialize the processes or threads, create and open both actors,
    and then kick off the test using |Main()|.  Make sure you define
    it.

If your test passes its criteria, please call
|MOZ_IPDL_TESTPASS("msg")| and "exit gracefully".

If your tests fails, please call |MOZ_IPDL_TESTFAIL("msg")| and "exit
ungracefully", preferably by abort()ing.


If all goes well, running

  make -C $OBJDIR/ipc/ipdl/test/cxx

will update the file IPDLUnitTests.cpp (the test launcher), and your
new code will be built automatically.


You can launch your new test by invoking one of

  make -C $OBJDIR/ipc/ipdl/test/cxx check-proc     (test process-based tests)
  make -C $OBJDIR/ipc/ipdl/test/cxx check-threads  (test thread-based tests)
  make -C $OBJDIR/ipc/ipdl/test/cxx check          (tests both)

If you want to launch only your test, run

  cd $OBJDIR/dist/bin
  ./run-mozilla.sh ./ipdlunittest TestFoo          (test in two processes, if appl.)
  ./run-mozilla.sh ./ipdlunittest thread:TestFoo   (test in two threads, if appl.)


For a bare-bones example of adding a test, take a look at
PTestSanity.ipdl, TestSanity.h, TestSanity.cpp, and how "TestSanity"
is included in ipdl.mk and Makefile.in.