kerneltest/f32test/bench/t_notify_perf_impl.cpp
changeset 45 329ab0095843
parent 43 96e5fb8b040d
equal deleted inserted replaced
44:36bfc973b146 45:329ab0095843
  1329 
  1329 
  1330 
  1330 
  1331 TBool CNotifyWatcher::CompareEntry(const TEntry& aEntry1, const TEntry& aEntry2)
  1331 TBool CNotifyWatcher::CompareEntry(const TEntry& aEntry1, const TEntry& aEntry2)
  1332 	{
  1332 	{
  1333 	// we don't compare name, because names are compared by CompareEntryName() already
  1333 	// we don't compare name, because names are compared by CompareEntryName() already
  1334 	if ((aEntry1.iAtt == aEntry2.iAtt) && (aEntry1.iModified == aEntry2.iModified) 
  1334 	// we don't check attributes when creating files, because dir scan sometimes returns file
  1335 			&& (aEntry1.iSize == aEntry2.iSize) && (aEntry1.iType == aEntry2.iType))
  1335 	// entries before attributes being flushed, and we don't care about it in this test case.
  1336 		return ETrue;
  1336 	// we also don't check the modified time for all the test cases expect replacing test, 
       
  1337 	// because dir scan sometimes returns file entries before time being flushed, 
       
  1338 	// and we don't care about it as well.
       
  1339 	// For replacing test, we check modification time, because it's the way we distinguish the old and new files.
       
  1340 	if (iCurrentOp == EOpCreate)
       
  1341 	    {
       
  1342 	    if ((aEntry1.iSize == aEntry2.iSize) && (aEntry1.iType == aEntry2.iType))
       
  1343             return ETrue;
       
  1344 	    }
       
  1345 	else if (iCurrentOp == EOpReplace || iCurrentOp == EOpManyFiles || iCurrentOp == EOpManyChanges || iCurrentOp == EOpMixed)
       
  1346 	    {
       
  1347         if ((aEntry1.iAtt == aEntry2.iAtt) && (aEntry1.iModified == aEntry2.iModified) 
       
  1348                 && (aEntry1.iSize == aEntry2.iSize) && (aEntry1.iType == aEntry2.iType))
       
  1349             return ETrue;
       
  1350 	    }
       
  1351 	else
       
  1352 	    {
       
  1353         if ((aEntry1.iAtt == aEntry2.iAtt) && (aEntry1.iSize == aEntry2.iSize) 
       
  1354                 && (aEntry1.iType == aEntry2.iType))
       
  1355             return ETrue;
       
  1356 	    }
  1337 	
  1357 	
  1338 	return EFalse;
  1358 	return EFalse;
  1339 	}
  1359 	}
  1340 
  1360 
  1341 // add 100 filters for enhanced notification test case
  1361 // add 100 filters for enhanced notification test case