Tests/Pcap++Test/Tests/PfRingTests.cpp
// TestPfRingDeviceMultiThread (internal test case)
TestPfRingDeviceMultiThread (internal test case)
TestPfRingDeviceMultiThread ( internal test case )
PTF_TEST_CASE(TestPfRingMultiThreadAllCores)
{
#ifdef USE_PF_RING
	int numOfCores = pcpp::getNumOfCores();
	pcpp::CoreMask coreMask = 0;
	std::ostringstream cores;
	for (int i = 0; i < numOfCores; i++)
	{
		cores << i << ",";
		coreMask |= pcpp::SystemCores::IdToSystemCore[i].Mask;
	}
	PTF_PRINT_VERBOSE("Participating cores: " << cores.str());
	TestPfRingMultiThreadCoreMask = coreMask;
	PTF_INTERNAL_RUN(TestPfRingDeviceMultiThread);
#else
	PTF_SKIP_TEST("PF_RING not configured");
#endif
}
PTF_TEST_CASE ( TestPfRingMultiThreadAllCores ) { #ifdef USE_PF_RING int numOfCores = pcpp :: getNumOfCores ( ) ; pcpp :: CoreMask coreMask = 0 ; std :: ostringstream cores ; for ( int i = 0 ; i < numOfCores ; i ++ ) { cores << i << " " ; coreMask |= pcpp :: SystemCores :: IdToSystemCore [ i ] . Mask ; } PTF_PRINT_VERBOSE ( " " << cores . str ( ) ) ; TestPfRingMultiThreadCoreMask = coreMask ; PTF_INTERNAL_RUN ( TestPfRingDeviceMultiThread ) ; #else PTF_SKIP_TEST ( " " ) ; #endif }
TestPfRingDeviceMultiThread (internal test case)
TestPfRingDeviceMultiThread ( internal test case )