kerneltest/f32test/plugins/version_2/src/t_plugin_v2.cpp
changeset 36 538db54a451d
parent 0 a41df078684a
equal deleted inserted replaced
34:f497542af8e4 36:538db54a451d
   262 	if (r == KErrInUse) r = KErrNone;
   262 	if (r == KErrInUse) r = KErrNone;
   263 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   263 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   264 
   264 
   265 	r = TheFs.MountPlugin(KModifierPluginName,20);
   265 	r = TheFs.MountPlugin(KModifierPluginName,20);
   266 	if(r==KErrInUse) r = KErrNone;
   266 	if(r==KErrInUse) r = KErrNone;
   267 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.exe"));
   267 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   268 
   268 
   269 
   269 
   270 	//Use RPlugin to communicate to the plugins which drive they should be
   270 	//Use RPlugin to communicate to the plugins which drive they should be
   271 	//testing on.
   271 	//testing on.
   272 	//This is needed because sometimes a plugin may open a different file etc and will need
   272 	//This is needed because sometimes a plugin may open a different file etc and will need
   309 	
   309 	
   310 	// Test the memory cleanup for asynchronous request
   310 	// Test the memory cleanup for asynchronous request
   311 
   311 
   312 	r = rplugin.Open(TheFs,KModifierPos);
   312 	r = rplugin.Open(TheFs,KModifierPos);
   313 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   313 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   314 	TRequestStatus aStatus; 
   314 	TRequestStatus aStatus;
   315 	rplugin.DoRequest(1,aStatus,drivePckg);
   315 	rplugin.DoRequest(1,aStatus,drivePckg);
   316 	User::WaitForRequest(aStatus);
   316 	User::WaitForRequest(aStatus);
   317 	rplugin.Close();
   317 	rplugin.Close();
   318 		
   318 	
   319 	}
   319 	}
   320 //-------------------------------------------------------------------------------------------------
   320 //-------------------------------------------------------------------------------------------------
   321 //! @SYMTestCaseID				KBASE-t_plugin_v2-1336
   321 //! @SYMTestCaseID				KBASE-t_plugin_v2-1336
   322 //! @SYMTestType				CT
   322 //! @SYMTestType				CT
   323 //! @SYMTestCaseDesc			Client request to read data directly from a file
   323 //! @SYMTestCaseDesc			Client request to read data directly from a file
   347 //-------------------------------------------------------------------------------------------------
   347 //-------------------------------------------------------------------------------------------------
   348 void TestReadFileDirect()
   348 void TestReadFileDirect()
   349 	{
   349 	{
   350 
   350 
   351 	//As the plugin is installed at this point, rather than removing it
   351 	//As the plugin is installed at this point, rather than removing it
   352 	//or not mounting it until after, lets disable intercepts
   352 	//or not mounting it until after, let's disable intercepts
   353 	//and enabled them at the end of this function.
   353 	//and enable them at the end of this function.
   354 	MyRPlugin rplugin;
   354 	MyRPlugin rplugin;
   355 	TInt r = rplugin.Open(TheFs,KModifierPos);
   355 	TInt r = rplugin.Open(TheFs,KModifierPos);
   356 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   356 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   357 	TBool interceptsStatus;
   357 	TBool interceptsStatus;
   358 	TPckg<TBool> interceptsStatusDes(interceptsStatus);
   358 	TPckg<TBool> interceptsStatusDes(interceptsStatus);
   359 	test.Next(_L("RPlugin: togle itnercepts (Modifier)"));
   359 	test.Next(_L("RPlugin: toggle intercepts (Modifier)"));
   360 	r = rplugin.DoControl(KPluginToggleIntercepts,interceptsStatusDes);
   360 	r = rplugin.DoControl(KPluginToggleIntercepts,interceptsStatusDes);
   361 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   361 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   362 	test.Next(_L("Ensure that intercepts are now disabled"));
   362 	test.Next(_L("Ensure that intercepts are now disabled"));
   363 	if(!interceptsStatus) r = KErrNone;
   363 	if(!interceptsStatus) r = KErrNone;
   364 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   364 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   366 
   366 
   367 	interceptsStatus = ETrue;
   367 	interceptsStatus = ETrue;
   368 
   368 
   369 	r = rplugin.Open(TheFs,KObserverPos);
   369 	r = rplugin.Open(TheFs,KObserverPos);
   370 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   370 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   371 	test.Next(_L("RPlugin: togle itnercepts (Observer)"));
   371 	test.Next(_L("RPlugin: toggle intercepts (Observer)"));
   372 	r = rplugin.DoControl(KPluginToggleIntercepts,interceptsStatusDes);
   372 	r = rplugin.DoControl(KPluginToggleIntercepts,interceptsStatusDes);
   373 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   373 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   374 	test.Next(_L("Ensure that intercepts are now disabled"));
   374 	test.Next(_L("Ensure that intercepts are now disabled"));
   375 	if(!interceptsStatus) r = KErrNone;
   375 	if(!interceptsStatus) r = KErrNone;
   376 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   376 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   410 	//Turn intercepts back on.
   410 	//Turn intercepts back on.
   411     interceptsStatus = EFalse;
   411     interceptsStatus = EFalse;
   412 
   412 
   413 	r = rplugin.Open(TheFs,KModifierPos);
   413 	r = rplugin.Open(TheFs,KModifierPos);
   414 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   414 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   415 	test.Next(_L("RPlugin: togle itnercepts (Observer)"));
   415 	test.Next(_L("RPlugin: toggle intercepts (Observer)"));
   416 	r = rplugin.DoControl(KPluginToggleIntercepts,interceptsStatusDes);
   416 	r = rplugin.DoControl(KPluginToggleIntercepts,interceptsStatusDes);
   417 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   417 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   418 	test.Next(_L("Ensure that intercepts are now enabled"));
   418 	test.Next(_L("Ensure that intercepts are now enabled"));
   419 	if(interceptsStatus) r = KErrNone;
   419 	if(interceptsStatus) r = KErrNone;
   420 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   420 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   422 
   422 
   423 	interceptsStatus = EFalse;
   423 	interceptsStatus = EFalse;
   424 
   424 
   425 	r = rplugin.Open(TheFs,KObserverPos);
   425 	r = rplugin.Open(TheFs,KObserverPos);
   426 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   426 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   427 	test.Next(_L("RPlugin: togle itnercepts (Observer)"));
   427 	test.Next(_L("RPlugin: toggle intercepts (Observer)"));
   428 	r = rplugin.DoControl(KPluginToggleIntercepts,interceptsStatusDes);
   428 	r = rplugin.DoControl(KPluginToggleIntercepts,interceptsStatusDes);
   429 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   429 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   430 	test.Next(_L("Ensure that intercepts are now enabled"));
   430 	test.Next(_L("Ensure that intercepts are now enabled"));
   431 	if(interceptsStatus) r = KErrNone;
   431 	if(interceptsStatus) r = KErrNone;
   432 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   432 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   555 	MyRPlugin rplugin;
   555 	MyRPlugin rplugin;
   556 	TInt r = rplugin.Open(TheFs,KModifierPos);
   556 	TInt r = rplugin.Open(TheFs,KModifierPos);
   557 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   557 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   558 	TBool interceptsStatus;
   558 	TBool interceptsStatus;
   559 	TPckg<TBool> interceptsStatusDes(interceptsStatus);
   559 	TPckg<TBool> interceptsStatusDes(interceptsStatus);
   560 	test.Next(_L("RPlugin: togle itnercepts (Modifier)"));
   560 	test.Next(_L("RPlugin: toggle intercepts (Modifier)"));
   561 	r = rplugin.DoControl(KPluginToggleIntercepts,interceptsStatusDes);
   561 	r = rplugin.DoControl(KPluginToggleIntercepts,interceptsStatusDes);
   562 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   562 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   563 	test.Next(_L("Ensure that intercepts are now disabled"));
   563 	test.Next(_L("Ensure that intercepts are now disabled"));
   564 	r = interceptsStatus == EFalse;
   564 	r = interceptsStatus == EFalse;
   565 	if(r) r = KErrNone;
   565 	if(r) r = KErrNone;
   568 
   568 
   569 	interceptsStatus = ETrue;
   569 	interceptsStatus = ETrue;
   570 
   570 
   571 	r = rplugin.Open(TheFs,KObserverPos);
   571 	r = rplugin.Open(TheFs,KObserverPos);
   572 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   572 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   573 	test.Next(_L("RPlugin: togle itnercepts (Observer)"));
   573 	test.Next(_L("RPlugin: toggle intercepts (Observer)"));
   574 	r = rplugin.DoControl(KPluginToggleIntercepts,interceptsStatusDes);
   574 	r = rplugin.DoControl(KPluginToggleIntercepts,interceptsStatusDes);
   575 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   575 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   576 	test.Next(_L("Ensure that intercepts are now disabled"));
   576 	test.Next(_L("Ensure that intercepts are now disabled"));
   577 	r = interceptsStatus == EFalse;
   577 	r = interceptsStatus == EFalse;
   578 	if(r) r = KErrNone;
   578 	if(r) r = KErrNone;
   625     //Turn intercepts back on.
   625     //Turn intercepts back on.
   626     interceptsStatus = EFalse;
   626     interceptsStatus = EFalse;
   627 
   627 
   628 	r = rplugin.Open(TheFs,KModifierPos);
   628 	r = rplugin.Open(TheFs,KModifierPos);
   629 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   629 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   630 	test.Next(_L("RPlugin: togle itnercepts (Observer)"));
   630 	test.Next(_L("RPlugin: toggle intercepts (Modifier)"));
   631 	r = rplugin.DoControl(KPluginToggleIntercepts,interceptsStatusDes);
   631 	r = rplugin.DoControl(KPluginToggleIntercepts,interceptsStatusDes);
   632 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   632 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   633 	test.Next(_L("Ensure that intercepts are now enabled"));
   633 	test.Next(_L("Ensure that intercepts are now enabled"));
   634 	if(interceptsStatus) r = KErrNone;
   634 	if(interceptsStatus) r = KErrNone;
   635 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   635 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   637 
   637 
   638 	interceptsStatus = EFalse;
   638 	interceptsStatus = EFalse;
   639 
   639 
   640 	r = rplugin.Open(TheFs,KObserverPos);
   640 	r = rplugin.Open(TheFs,KObserverPos);
   641 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   641 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   642 	test.Next(_L("RPlugin: togle itnercepts (Observer)"));
   642 	test.Next(_L("RPlugin: toggle intercepts (Observer)"));
   643 	r = rplugin.DoControl(KPluginToggleIntercepts,interceptsStatusDes);
   643 	r = rplugin.DoControl(KPluginToggleIntercepts,interceptsStatusDes);
   644 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   644 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   645 	test.Next(_L("Ensure that intercepts are now enabled"));
   645 	test.Next(_L("Ensure that intercepts are now enabled"));
   646 	if(interceptsStatus) r = KErrNone;
   646 	if(interceptsStatus) r = KErrNone;
   647 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
   647 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
  1975 
  1975 
  1976 		r = file.Open(TheFs,_L("z:\\TEST\\clean.txt"),EFileRead);
  1976 		r = file.Open(TheFs,_L("z:\\TEST\\clean.txt"),EFileRead);
  1977 		//if this fails, did you forget to do a \f32test\group\wintest ?
  1977 		//if this fails, did you forget to do a \f32test\group\wintest ?
  1978 		plugin_test(test,KDriveZPos,__LINE__,(TText*)Expand("drivez_plugin.cpp"));
  1978 		plugin_test(test,KDriveZPos,__LINE__,(TText*)Expand("drivez_plugin.cpp"));
  1979 		safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp")); //if this fails, did you forget to do a \f32test\group\wintest ?
  1979 		safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp")); //if this fails, did you forget to do a \f32test\group\wintest ?
  1980 		file.Close(); 
  1980 		file.Close();
  1981 
  1981 
  1982 		r = file.Replace(TheFs,_L("c:\\drivecplugin.txt"),EFileWrite);
  1982 		r = file.Replace(TheFs,_L("c:\\drivecplugin.txt"),EFileWrite);
  1983 		plugin_test(test,KDriveCPos,__LINE__,(TText*)Expand("drivec_plugin.cpp"));
  1983 		plugin_test(test,KDriveCPos,__LINE__,(TText*)Expand("drivec_plugin.cpp"));
  1984 		safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
  1984 		safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
  1985 
  1985 
  2005 	r = TheFs.RemovePlugin(KDriveCPluginName);
  2005 	r = TheFs.RemovePlugin(KDriveCPluginName);
  2006 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
  2006 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
  2007 	}
  2007 	}
  2008 
  2008 
  2009 //-------------------------------------------------------------------------------------------------
  2009 //-------------------------------------------------------------------------------------------------
  2010 //! @SYMTestCaseID				KBASE-t_plugin_v2-1357
  2010 //! @SYMTestCaseID				KBASE-t_plugin_v2-1358
  2011 //! @SYMTestType				CT
  2011 //! @SYMTestType				CT
  2012 //! @SYMTestCaseDesc			Testing unremovable plugins
  2012 //! @SYMTestCaseDesc			Testing unremovable plugins
  2013 //! @SYMPREQ					REQ8794
  2013 //! @SYMPREQ					REQ8794
  2014 //! @SYMTestPriority			High
  2014 //! @SYMTestPriority			High
  2015 //! @SYMTestActions				LoadUnremovablePluginAndTest() mounts a unremovable plugin and attempts to
  2015 //! @SYMTestActions				LoadUnremovablePluginAndTest() mounts a unremovable plugin and attempts to
  2481 	r = TheFs.MountPlugin(KStacked3PluginName);
  2481 	r = TheFs.MountPlugin(KStacked3PluginName);
  2482 	if (r == KErrInUse) r = KErrNone;
  2482 	if (r == KErrInUse) r = KErrNone;
  2483 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
  2483 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
  2484 
  2484 
  2485 
  2485 
  2486 
       
  2487 
       
  2488 	//Setting up test data
  2486 	//Setting up test data
  2489     TBuf8<20> wbuffer;
  2487     TBuf8<20> wbuffer;
  2490 	wbuffer.FillZ(20);
  2488 	wbuffer.FillZ(20);
  2491 	wbuffer.Copy(_L8("HELLO WORLD  SYMBIAN"));
  2489 	wbuffer.Copy(_L8("HELLO WORLD  SYMBIAN"));
  2492 
  2490 
  2541 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
  2539 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
  2542 	r = TheFs.RemovePlugin(KStackedPluginName);
  2540 	r = TheFs.RemovePlugin(KStackedPluginName);
  2543 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
  2541 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
  2544 	}
  2542 	}
  2545 
  2543 
       
  2544 //-------------------------------------------------------------------------------------------------
       
  2545 //! @SYMTestCaseID				KBASE-t_plugin_v2-1359
       
  2546 //! @SYMTestType				CT
       
  2547 //! @SYMTestCaseDesc			Test calling RFsPlugin::Volume()
       
  2548 //!
       
  2549 //! @SYMDEF						DEF142711: RFsPlugin needs to expose a Volume() API
       
  2550 //! @SYMTestPriority			High
       
  2551 //! @SYMTestActions				TestVolume() sets the volume label and gets the volume
       
  2552 //!								information via the modifier plugin, which will verify
       
  2553 //!								that the volume has the correct label and then change it.
       
  2554 //!
       
  2555 //!								1.	Set volume label to "MyVolume".
       
  2556 //!								2.	Get volume information via modifier plugin.
       
  2557 //!								3.	Verify correct volume label after changes by modifier plugin.
       
  2558 //!								4.	Reset volume label.
       
  2559 //!
       
  2560 //! @SYMTestExpectedResults		1.	Volume label set without any panic.
       
  2561 //!								2.	Volume information request completes without any panic.
       
  2562 //!								3.	Correct volume label after modification.
       
  2563 //!								4.	Volume label reset without any panic.
       
  2564 //!
       
  2565 //! @SYMTestPriority			High
       
  2566 //! @SYMTestStatus				Implemented
       
  2567 //-------------------------------------------------------------------------------------------------
       
  2568 void TestVolume()
       
  2569 	{
       
  2570 	test.Next(_L("TestVolume()"));
       
  2571 	
       
  2572 	TInt theDrive;
       
  2573 	TInt r = TheFs.CharToDrive(gDriveToTest,theDrive);
       
  2574 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
       
  2575 	
       
  2576 	// Set volume label to MyVolume so we can test it in the modifier plugin
       
  2577 	_LIT(KVolumeLabel1,"1Volume");
       
  2578 	r = TheFs.SetVolumeLabel(KVolumeLabel1,theDrive);
       
  2579 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
       
  2580 	test.Printf(_L("TestVolume, RFs::SetVolumeLabel returned %d\n"), r);
       
  2581 	
       
  2582 	test.Printf(_L("TestVolume, Get volume information for drive %d via modifier plugin\n"), theDrive);
       
  2583 	TVolumeInfo volInfo;
       
  2584 	r = TheFs.Volume(volInfo,theDrive);
       
  2585 	test.Printf(_L("TestVolume, RFs::Volume returned %d\n"), r);
       
  2586 	plugin_test(test,KModifierPos,__LINE__,(TText*)Expand("modifier_plugin.cpp"));
       
  2587 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
       
  2588 	
       
  2589 	// Check volume name after modification by modifier plugin
       
  2590 	_LIT(KVolumeLabel2,"2Volume");
       
  2591 	r = volInfo.iName.Compare(KVolumeLabel2);
       
  2592 	test.Printf(_L("TestVolume, Compare volume label returned %d\n"), r);
       
  2593 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
       
  2594 	
       
  2595 	test.Printf(_L("TestVolume, Reset volume label to nothing\n"));
       
  2596 	r = TheFs.SetVolumeLabel(_L(""),theDrive);
       
  2597 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
       
  2598 	}
       
  2599 
  2546 
  2600 
  2547 GLDEF_C void CallTestsL()
  2601 GLDEF_C void CallTestsL()
  2548 	{
  2602 	{
  2549 	__UHEAP_MARK;
  2603 	__UHEAP_MARK;
  2550 	TInt theDrive;
  2604 	TInt theDrive;
  2552 	test(r == KErrNone);
  2606 	test(r == KErrNone);
  2553 
  2607 
  2554 	TVolumeInfo volInfo;
  2608 	TVolumeInfo volInfo;
  2555 	r = TheFs.Volume(volInfo, theDrive);
  2609 	r = TheFs.Volume(volInfo, theDrive);
  2556 	test (r == KErrNone);
  2610 	test (r == KErrNone);
  2557 
  2611 	
  2558 	TDriveInfo drvInfo;
  2612 	TDriveInfo drvInfo;
  2559 	r = TheFs.Drive(drvInfo,theDrive);
  2613 	r = TheFs.Drive(drvInfo,theDrive);
  2560 	test (r == KErrNone);
  2614 	test (r == KErrNone);
  2561 
  2615 
  2562 	if(drvInfo.iType == EMediaRam || drvInfo.iType == EMediaRom || drvInfo.iMediaAtt == KMediaAttWriteProtected || drvInfo.iMediaAtt == KMediaAttLocked)
  2616 	if(drvInfo.iType == EMediaRam || drvInfo.iType == EMediaRom || drvInfo.iMediaAtt == KMediaAttWriteProtected || drvInfo.iMediaAtt == KMediaAttLocked)
  2563 		{
  2617 		{
       
  2618 		test.Printf(_L("T_PLUGIN_V2 SKIPPED:\n"));
  2564 		test.Printf(_L("Local Buffers are not supported on RAM or ROM drives\n"));
  2619 		test.Printf(_L("Local Buffers are not supported on RAM or ROM drives\n"));
  2565 		if(drvInfo.iMediaAtt == KMediaAttLocked)
  2620 		if(drvInfo.iMediaAtt == KMediaAttLocked)
  2566 			{
  2621 			{
  2567 			test.Printf(_L("This media is locked. Drive %d\n"),theDrive);
  2622 			test.Printf(_L("This media is locked. Drive %d\n"),theDrive);
  2568 			}
  2623 			}
  2569 		test.Printf(_L("Skipping Test\n"));
       
  2570 		return;
  2624 		return;
  2571 		}
  2625 		}
  2572 	
  2626 	
  2573 	test.Next(_L("Loading Observer plugin"));
  2627 	test.Next(_L("Loading Observer plugin"));
  2574 	r = TheFs.AddPlugin(KObserverPluginFileName);
  2628 	r = TheFs.AddPlugin(KObserverPluginFileName);
  2722 	TInt drive = EDriveX;
  2776 	TInt drive = EDriveX;
  2723 	TBuf<25> path;
  2777 	TBuf<25> path;
  2724 	r = TheFs.Subst(path,drive);
  2778 	r = TheFs.Subst(path,drive);
  2725 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
  2779 	safe_test(r,__LINE__,(TText*)Expand("t_plugin_v2.cpp"));
  2726 
  2780 
  2727 
  2781 #ifndef __WINS__
       
  2782 	// RFs::SetVolumeLabel - Does not run on WINS
       
  2783 	TestVolume();
       
  2784 #endif
  2728 	TestReadFileDirect();
  2785 	TestReadFileDirect();
  2729 	TestReadFileViaPlugin();
  2786 	TestReadFileViaPlugin();
  2730 	TestWriteFileDirect();
  2787 	TestWriteFileDirect();
  2731 	TestWriteFileViaPlugin();
  2788 	TestWriteFileViaPlugin();
  2732 	//TestFileLock();
  2789 	//TestFileLock();