gecko-dev/ipc/ipdl/test/cxx
Ricky Stewart 3749c34fb4 Bug 1632916 - Run JS/web-platform/ipdl build machinery in Python 3 r=jgraham,nika,glandium
Differential Revision: https://phabricator.services.mozilla.com/D72478
2020-05-05 20:32:12 +00:00
..
app Bug 1512504 - Remove support for MSVC. r=froydnj 2019-02-14 21:45:27 +00:00
IPDLUnitTestProcessChild.cpp Bug 1557739 - Be more consistent with IPC Transport APIs, r=jld 2020-02-06 22:41:56 +00:00
IPDLUnitTestProcessChild.h Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan 2018-12-14 18:10:35 +00:00
IPDLUnitTestSubprocess.cpp Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan 2018-12-14 18:10:35 +00:00
IPDLUnitTestSubprocess.h Bug 1487287 - Synchronize GeckoChildProcessHost destruction with launching. r=mccr8 2019-02-05 00:15:20 +00:00
IPDLUnitTestTypes.h Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan 2018-12-14 18:10:35 +00:00
IPDLUnitTestUtils.h Bug 1513911 - Part 2 - fixed a missing include; r=mccr8 2019-02-27 20:00:58 +00:00
IPDLUnitTests.h Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan 2019-12-06 09:16:44 +00:00
IPDLUnitTests.template.cpp Bug 1487287 - Synchronize GeckoChildProcessHost destruction with launching. r=mccr8 2019-02-05 00:15:20 +00:00
Makefile.in Bug 1632916 - Run JS/web-platform/ipdl build machinery in Python 3 r=jgraham,nika,glandium 2020-05-05 20:32:12 +00:00
PTestActorPunning.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestActorPunningPunned.ipdl
PTestActorPunningSub.ipdl
PTestAsyncReturns.ipdl
PTestBadActor.ipdl
PTestBadActorSub.ipdl
PTestCancel.ipdl
PTestCrashCleanup.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestDataStructures.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestDataStructuresCommon.ipdlh
PTestDataStructuresSub.ipdl
PTestDemon.ipdl
PTestDesc.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestDescSub.ipdl
PTestDescSubsub.ipdl
PTestEndpointBridgeMain.ipdl
PTestEndpointBridgeMainSub.ipdl
PTestEndpointBridgeSub.ipdl
PTestEndpointOpens.ipdl
PTestEndpointOpensOpened.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestFailedCtor.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestFailedCtorSub.ipdl
PTestFailedCtorSubsub.ipdl
PTestHandle.ipdl
PTestHangs.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestHighestPrio.ipdl
PTestIndirectProtocolParam.ipdlh
PTestIndirectProtocolParamFirst.ipdl
PTestIndirectProtocolParamManage.ipdl
PTestIndirectProtocolParamSecond.ipdl
PTestInterruptErrorCleanup.ipdl
PTestInterruptRaces.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestInterruptShutdownRace.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestJSON.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestLatency.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestLayoutThread.ipdl
PTestManyChildAllocs.ipdl
PTestManyChildAllocsSub.ipdl
PTestMultiMgrs.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestMultiMgrsBottom.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestMultiMgrsLeft.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestMultiMgrsRight.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestNestedLoops.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestPaintThread.ipdl
PTestPriority.ipdl Bug 1600605, add support for mediumhigh priority ipdl messages, r=jld 2019-12-13 22:38:15 +00:00
PTestRPC.ipdl
PTestRaceDeadlock.ipdl
PTestRaceDeferral.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestRacyInterruptReplies.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestRacyReentry.ipdl
PTestRacyUndefer.ipdl
PTestSanity.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestSelfManage.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestSelfManageRoot.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestShmem.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestShutdown.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestShutdownSub.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestShutdownSubsub.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestStackHooks.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestSyncError.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestSyncHang.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestSyncWakeup.ipdl Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
PTestUniquePtrIPC.ipdl Bug 1500219: Part 2 - Test UniquePtr integration with IPDL (r=jld) 2018-10-24 21:04:44 +00:00
PTestUrgency.ipdl
PTestUrgentHangs.ipdl
README.txt
TestActorPunning.cpp Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan 2018-12-14 18:10:35 +00:00
TestActorPunning.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestAsyncReturns.cpp Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan 2018-12-14 18:10:35 +00:00
TestAsyncReturns.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestBadActor.cpp Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan 2018-12-14 18:10:35 +00:00
TestBadActor.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestCancel.cpp Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
TestCancel.h Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
TestCrashCleanup.cpp Bug 1487287 - Synchronize GeckoChildProcessHost destruction with launching. r=mccr8 2019-02-05 00:15:20 +00:00
TestCrashCleanup.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestDataStructures.cpp Bug 1289211 - Rename InfallibleTArray to nsTArray in ipc/ r=nika 2019-07-10 03:31:24 +00:00
TestDataStructures.h Bug 1289211 - Rename InfallibleTArray to nsTArray in ipc/ r=nika 2019-07-10 03:31:24 +00:00
TestDemon.cpp Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
TestDemon.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestDesc.cpp Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan 2018-12-14 18:10:35 +00:00
TestDesc.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestEndpointBridgeMain.cpp Bug 1487287 - Synchronize GeckoChildProcessHost destruction with launching. r=mccr8 2019-02-05 00:15:20 +00:00
TestEndpointBridgeMain.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestEndpointOpens.cpp Bug 1441651 - Part 2 - pass Shmem and ByteBuf by rvalref to Send* IPC methods; r=nika,jrmuizel 2019-03-04 16:35:30 +00:00
TestEndpointOpens.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestFailedCtor.cpp Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan 2018-12-14 18:10:35 +00:00
TestFailedCtor.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestHangs.cpp Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
TestHangs.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestHighestPrio.cpp Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
TestHighestPrio.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestInterruptErrorCleanup.cpp Bug 1487287 - Synchronize GeckoChildProcessHost destruction with launching. r=mccr8 2019-02-05 00:15:20 +00:00
TestInterruptErrorCleanup.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestInterruptRaces.cpp Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan 2018-12-14 18:10:35 +00:00
TestInterruptRaces.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestInterruptShutdownRace.cpp Bug 1487287 - Synchronize GeckoChildProcessHost destruction with launching. r=mccr8 2019-02-05 00:15:20 +00:00
TestInterruptShutdownRace.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestJSON.cpp Bug 1289211 - Rename InfallibleTArray to nsTArray in ipc/ r=nika 2019-07-10 03:31:24 +00:00
TestJSON.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestLatency.cpp Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
TestLatency.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestManyChildAllocs.cpp Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan 2018-12-14 18:10:35 +00:00
TestManyChildAllocs.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestMultiMgrs.cpp Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan 2018-12-14 18:10:35 +00:00
TestMultiMgrs.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestNestedLoops.cpp Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan 2018-12-14 18:10:35 +00:00
TestNestedLoops.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestOffMainThreadPainting.cpp Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan 2018-12-14 18:10:35 +00:00
TestOffMainThreadPainting.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestRPC.cpp Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
TestRPC.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestRaceDeadlock.cpp Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan 2018-12-14 18:10:35 +00:00
TestRaceDeadlock.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestRaceDeferral.cpp Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan 2018-12-14 18:10:35 +00:00
TestRaceDeferral.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestRacyInterruptReplies.cpp Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan 2018-12-14 18:10:35 +00:00
TestRacyInterruptReplies.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestRacyReentry.cpp Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan 2018-12-14 18:10:35 +00:00
TestRacyReentry.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestRacyUndefer.cpp Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan 2018-12-14 18:10:35 +00:00
TestRacyUndefer.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestSanity.cpp Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan 2018-12-14 18:10:35 +00:00
TestSanity.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestSelfManageRoot.cpp Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan 2018-12-14 18:10:35 +00:00
TestSelfManageRoot.h Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj 2020-02-20 11:40:14 +00:00
TestShmem.cpp Bug 1441651 - Part 2 - pass Shmem and ByteBuf by rvalref to Send* IPC methods; r=nika,jrmuizel 2019-03-04 16:35:30 +00:00
TestShmem.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestShutdown.cpp Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan 2018-12-14 18:10:35 +00:00
TestShutdown.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestStackHooks.cpp Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj 2019-05-21 17:04:27 +00:00
TestStackHooks.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestSyncError.cpp Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan 2018-12-14 18:10:35 +00:00
TestSyncError.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestSyncHang.cpp Bug 1487287 - Synchronize GeckoChildProcessHost destruction with launching. r=mccr8 2019-02-05 00:15:20 +00:00
TestSyncHang.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestSyncWakeup.cpp Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
TestSyncWakeup.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
TestUniquePtrIPC.cpp Bug 1441651 - Part 2 - pass Shmem and ByteBuf by rvalref to Send* IPC methods; r=nika,jrmuizel 2019-03-04 16:35:30 +00:00
TestUniquePtrIPC.h Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj 2020-02-20 11:40:14 +00:00
TestUrgency.cpp Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
TestUrgency.h Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
TestUrgentHangs.cpp Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
TestUrgentHangs.h Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00
genIPDLUnitTests.py Bug 1632916 - Run JS/web-platform/ipdl build machinery in Python 3 r=jgraham,nika,glandium 2020-05-05 20:32:12 +00:00
moz.build Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 2019-02-26 15:37:22 +00:00

README.txt

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.