From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [edk2-devel] [PATCH v1 1/1] MiscBootServices: Stall_Func: Reduces the stall interval for Stall_Func To: G Edhaya Chandran ,devel@edk2.groups.io From: "G Edhaya Chandran" X-Originating-Location: Bengaluru, Karnataka, IN (217.140.105.55) X-Originating-Platform: Windows Chrome 107 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Wed, 09 Nov 2022 00:06:43 -0800 References: <10218.1667399328719844739@groups.io> In-Reply-To: <10218.1667399328719844739@groups.io> Message-ID: <3661.1667981203422847739@groups.io> Content-Type: multipart/alternative; boundary="PXxMI5xtg97zbHhPLekK" --PXxMI5xtg97zbHhPLekK Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Robert, In the present patch the verification of elapsed time is failing. The patch will need additional changes as below (bolded): diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/MiscBootService= s/BlackBoxTest/MiscBootServicesBBTestFunction.c b/uefi-sct/SctPkg/TestCase/= UEFI/EFI/BootServices/MiscBootServices/BlackBoxTest/MiscBootServicesBBTestF= unction.c index ad72646b..f3d189bd 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/MiscBootServices/Black= BoxTest/MiscBootServicesBBTestFunction.c +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/MiscBootServices/Black= BoxTest/MiscBootServicesBBTestFunction.c @@ -827,7 +827,7 @@ BBTestStallInterfaceTest ( StartTime =3D Epoch; OldTpl =3D gtBS->RaiseTPL (TplArray[Index]); Status =3D gtBS->Stall ( -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A010000000 +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A04000000^M ); gtBS->RestoreTPL (OldTpl); if (gtRT->GetTime (&EndTime, NULL) !=3D EFI_SUCCESS) @@ -845,7 +845,7 @@ BBTestStallInterfaceTest ( (Index =3D=3D 1? \ gMiscBootServicesBBTestFunctionAssertionGuid021: \ gMiscBootServicesBBTestFunctionAssertionGuid022), -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0L"BS.= Stall - 10 seconds", *+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0L"BS= .Stall - 4 seconds",^M* L"%a:%d:Status - %r, TPL - %d", __FILE__, (UINTN)__LINE__, @@ -853,8 +853,8 @@ BBTestStallInterfaceTest ( TplArray[Index] ); SecondsElapsed =3D GetSecondsElapsed (&StartTime, &EndTime); -=C2=A0 =C2=A0 if ((SecondsElapsed <=3D 10 + MAX_SECOND_MARGIN) && -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(SecondsElapsed >=3D 10 - MAX_SECOND_MAR= GIN)) { *+=C2=A0 =C2=A0 if ((SecondsElapsed <=3D 4 + MAX_SECOND_MARGIN) &&^M* *+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(SecondsElapsed >=3D 4 - MAX_SECOND_MAR= GIN)) {^M* AssertionType =3D EFI_TEST_ASSERTION_PASSED; } else { AssertionType =3D EFI_TEST_ASSERTION_FAILED; diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/MiscBootService= s/BlackBoxTest/MiscBootServicesBBTestMain.h b/uefi-sct/SctPkg/TestCase/UEFI= /EFI/BootServices/MiscBootServices/BlackBoxTest/MiscBootServicesBBTestMain.= h index 9e98ec01..4f8eaa4c 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/MiscBootServices/Black= BoxTest/MiscBootServicesBBTestMain.h +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/MiscBootServices/Black= BoxTest/MiscBootServicesBBTestMain.h @@ -46,7 +46,7 @@ typedef struct _RESET_DATA { { 0xA6033499, 0xE4AF, 0x44f5, {0x9D, 0x16, 0x30, 0x78, 0xD8, 0x61, 0x32, 0x= 28 }} #define TPL_ARRAY_SIZE 3 -#define MAX_SECOND_MARGIN 2 +#define MAX_SECOND_MARGIN 1^M // // Change size from TPL_ARRAY_SIZE to TPL_ARRAY_SIZE + 1 I have verified the new changes and it executes fine. Also uploaded the changes to bugzilla 4105 =E2=80=93 SctPkg: Stall_Func tes= t can cause disk timeouts and testing failure (tianocore.org) ( https://bug= zilla.tianocore.org/show_bug.cgi?id=3D4105 ) You could please also check and reply. With Warm Regards, Edhay --PXxMI5xtg97zbHhPLekK Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

Hi Robert,  

     In the present pat= ch the verification of elapsed time is failing.
     Th= e patch will need additional changes as below (bolded):

diff --git a/uefi-sct/SctPkg/TestCase/UEFI= /EFI/BootServices/MiscBootServices/BlackBoxTest/MiscBootServicesBBTestFunct= ion.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/MiscBootServices/Bla= ckBoxTest/MiscBootServicesBBTestFunction.c
index ad72646b..f3d189bd 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/MiscBoo= tServices/BlackBoxTest/MiscBootServicesBBTestFunction.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServi= ces/MiscBootServices/BlackBoxTest/MiscBootServicesBBTestFunction.c@@ -827,7 +827,7 @@ BBTestStallInterfa= ceTest (
      =  StartTime =3D Epoch;
&nb= sp;    OldTpl =3D gtBS->RaiseTPL (TplArray[Index]);
     Status =3D gtBS->= Stall (
-      =                10000000
+           = ;          4000000^M
                &nb= sp;     );
  &n= bsp;  gtBS->RestoreTPL (OldTpl);
     if (gtRT->GetTime (&EndTime, NULL) != =3D EFI_SUCCESS)
@@ -845,7 +84= 5,7 @@ BBTestStallInterfaceTest (
                    (= Index =3D=3D 1? \
   = ;                  gMiscBootSe= rvicesBBTestFunctionAssertionGuid021: \
                  &n= bsp;  gMiscBootServicesBBTestFunctionAssertionGuid022),
-            &= nbsp;      L"BS.Stall - 10 seconds",
+            &n= bsp;      L"BS.Stall - 4 seconds",^M
            &n= bsp;       L"%a:%d:Status - %r, TPL - %d",
             = ;       __FILE__,
                    (U= INTN)__LINE__,
@@ -853,8 +853,= 8 @@ BBTestStallInterfaceTest (
    &nb= sp;               );
     SecondsElapsed =3D GetSeconds= Elapsed (&StartTime, &EndTime);
-    if ((SecondsElapsed <=3D 10 + MAX_SECOND_MARGIN= ) &&
-    &n= bsp;    (SecondsElapsed >=3D 10 - MAX_SECOND_MARGIN)) {=
+    if ((SecondsE= lapsed <=3D 4 + MAX_SECOND_MARGIN) &&^M
+         (S= econdsElapsed >=3D 4 - MAX_SECOND_MARGIN)) {^M
       AssertionType =3D E= FI_TEST_ASSERTION_PASSED;
&nbs= p;    } else {
 = ;      AssertionType =3D EFI_TEST_ASSERTION_FAILED;diff --git a/uefi-sct/SctPkg/TestCase/= UEFI/EFI/BootServices/MiscBootServices/BlackBoxTest/MiscBootServicesBBTestM= ain.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/MiscBootServices/Bla= ckBoxTest/MiscBootServicesBBTestMain.h
index 9e98ec01..4f8eaa4c 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/MiscBootSer= vices/BlackBoxTest/MiscBootServicesBBTestMain.h
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/Misc= BootServices/BlackBoxTest/MiscBootServicesBBTestMain.h
@@ -46,7 +46,7 @@ typedef struct _RESET_DATA {
  { 0xA6033499, 0xE4AF, 0x44= f5, {0x9D, 0x16, 0x30, 0x78, 0xD8, 0x61, 0x32, 0x28 }}
 
-#define MAX_SECOND_MARGIN 2
 
 //
 // Change size from TPL_ARRAY_SIZE = to TPL_ARRAY_SIZE + 1



I have verified the new changes and it executes fine.
Also up= loaded the changes to bugzilla 4105 – SctPkg: Stall_Func test can cause d= isk timeouts and testing failure (tianocore.org)
You could please = also check and reply.

With Warm Regards,

Edhay



--PXxMI5xtg97zbHhPLekK--