[edk2-devel] [RestJsonStructureDxe PATCH 0/2] EFI REST JSON Structure Protocol

Abner Chang posted 2 patches 1 week ago
Failed in applying to current master (apply log)
MdePkg/Include/Protocol/RestJsonStructure.h   | 160 +++++
MdePkg/MdePkg.dec                             |   6 +
RedfishPkg/RedfishPkg.dsc                     |   3 +
.../RestJsonStructureDxe.c                    | 583 ++++++++++++++++++
.../RestJsonStructureDxe.inf                  |  40 ++
.../RestJsonStructureInternal.h               |  35 ++
6 files changed, 827 insertions(+)
create mode 100644 MdePkg/Include/Protocol/RestJsonStructure.h
create mode 100644 RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.c
create mode 100644 RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.inf
create mode 100644 RedfishPkg/RestJsonStructureDxe/RestJsonStructureInternal.h

[edk2-devel] [RestJsonStructureDxe PATCH 0/2] EFI REST JSON Structure Protocol

Posted by Abner Chang 1 week ago
This is the implementation of EFI_REST_JSON_STRUCTURE_PROTOCOL,
refer to UEFI spec 2.8 Section 29.7.3 EFI REST JSON Resource to C Structure
Converter.

Signed-off-by: Abner Chang <abner.chang@hpe.com>

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Fan Wang <fan.wang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Nickle Wang <nickle.wang@hpe.com>

Abner Chang (2):
  MdePkg/Include: Definitions of EFI REST JSON Structure Protocol
  RedfishPkg/RestJsonStructureDxe: EFI REST JSON Structure Protocol

 MdePkg/Include/Protocol/RestJsonStructure.h   | 160 +++++
 MdePkg/MdePkg.dec                             |   6 +
 RedfishPkg/RedfishPkg.dsc                     |   3 +
 .../RestJsonStructureDxe.c                    | 583 ++++++++++++++++++
 .../RestJsonStructureDxe.inf                  |  40 ++
 .../RestJsonStructureInternal.h               |  35 ++
 6 files changed, 827 insertions(+)
 create mode 100644 MdePkg/Include/Protocol/RestJsonStructure.h
 create mode 100644 RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.c
 create mode 100644 RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.inf
 create mode 100644 RedfishPkg/RestJsonStructureDxe/RestJsonStructureInternal.h

-- 
2.17.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#66031): https://edk2.groups.io/g/devel/message/66031
Mute This Topic: https://groups.io/mt/77386310/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [RestJsonStructureDxe PATCH 0/2] EFI REST JSON Structure Protocol

Posted by Sean 1 week ago
Abner,

As you add this RedfishPkg and significant new code to edk2 have you 
thought about authoring unit tests.  One of the goals of the unit test 
work that was enabled nearly 1 year ago was to make it easy for 
developers to write unit tests and to continually run them during PR and 
CI runs in the hope that as a community we might start authoring unit 
tests with new code.

Personally i would like to see a process that new modules can not be 
added without unit tests and relatively high code coverage.

Was there any thought to that?  Has there been discussion i may have 
missed?

Thanks
Sean



On 10/8/2020 8:10 AM, Abner Chang wrote:
> This is the implementation of EFI_REST_JSON_STRUCTURE_PROTOCOL,
> refer to UEFI spec 2.8 Section 29.7.3 EFI REST JSON Resource to C Structure
> Converter.
> 
> Signed-off-by: Abner Chang <abner.chang@hpe.com>
> 
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Jiaxin Wu <jiaxin.wu@intel.com>
> Cc: Siyuan Fu <siyuan.fu@intel.com>
> Cc: Fan Wang <fan.wang@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Nickle Wang <nickle.wang@hpe.com>
> 
> Abner Chang (2):
>    MdePkg/Include: Definitions of EFI REST JSON Structure Protocol
>    RedfishPkg/RestJsonStructureDxe: EFI REST JSON Structure Protocol
> 
>   MdePkg/Include/Protocol/RestJsonStructure.h   | 160 +++++
>   MdePkg/MdePkg.dec                             |   6 +
>   RedfishPkg/RedfishPkg.dsc                     |   3 +
>   .../RestJsonStructureDxe.c                    | 583 ++++++++++++++++++
>   .../RestJsonStructureDxe.inf                  |  40 ++
>   .../RestJsonStructureInternal.h               |  35 ++
>   6 files changed, 827 insertions(+)
>   create mode 100644 MdePkg/Include/Protocol/RestJsonStructure.h
>   create mode 100644 RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.c
>   create mode 100644 RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.inf
>   create mode 100644 RedfishPkg/RestJsonStructureDxe/RestJsonStructureInternal.h
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#66047): https://edk2.groups.io/g/devel/message/66047
Mute This Topic: https://groups.io/mt/77386310/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [RestJsonStructureDxe PATCH 0/2] EFI REST JSON Structure Protocol

Posted by Abner Chang 1 week ago
No you didn’t miss have discussions. However, you can help me to understand Unit test framework. 

There are some levels of the unit test, I don’t know how much we can do in the current CI/UnitTestFramework and how much effort would be left to the new (also the existing) package developers.

1. The code coverage test,  can this launched by CI? This one should be relatively simple if it can run automatically (like to launch Coverity) and gives report to developers.
2. Code path test, developers have to write the unit test drivers/apps under UnitTest? Developers decide how to run the function validations on input/output parameter and/or some other basic API functionality test?
3. The feature test for the hardware independent functionalities or some features which have the corresponding simulator like network stacks. But I think this is more like the platform-level test, right? Maybe this is not in UnittestFramework scope?

I take a look into UnitTestFramework and only see a simple sample unit test driver, is this the only implementation?  Any edk2 packages or drivers has its own unit test yet?
Do you have some links to the edk2 Unit Test Writer guide?

Thanks
Abner

> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Sean
> Sent: Friday, October 9, 2020 11:03 AM
> To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist)
> <abner.chang@hpe.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>; Jiaxin
> Wu <jiaxin.wu@intel.com>; Siyuan Fu <siyuan.fu@intel.com>; Fan Wang
> <fan.wang@intel.com>; Jiewen Yao <jiewen.yao@intel.com>; Wang, Nickle
> (HPS SW) <nickle.wang@hpe.com>
> Subject: Re: [edk2-devel] [RestJsonStructureDxe PATCH 0/2] EFI REST JSON
> Structure Protocol
> 
> Abner,
> 
> As you add this RedfishPkg and significant new code to edk2 have you
> thought about authoring unit tests.  One of the goals of the unit test work
> that was enabled nearly 1 year ago was to make it easy for developers to
> write unit tests and to continually run them during PR and CI runs in the hope
> that as a community we might start authoring unit tests with new code.
> 
> Personally i would like to see a process that new modules can not be added
> without unit tests and relatively high code coverage.
> 
> Was there any thought to that?  Has there been discussion i may have missed?
> 
> Thanks
> Sean
> 
> 
> 
> On 10/8/2020 8:10 AM, Abner Chang wrote:
> > This is the implementation of EFI_REST_JSON_STRUCTURE_PROTOCOL,
> refer
> > to UEFI spec 2.8 Section 29.7.3 EFI REST JSON Resource to C Structure
> > Converter.
> >
> > Signed-off-by: Abner Chang <abner.chang@hpe.com>
> >
> > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> > Cc: Jiaxin Wu <jiaxin.wu@intel.com>
> > Cc: Siyuan Fu <siyuan.fu@intel.com>
> > Cc: Fan Wang <fan.wang@intel.com>
> > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > Cc: Nickle Wang <nickle.wang@hpe.com>
> >
> > Abner Chang (2):
> >    MdePkg/Include: Definitions of EFI REST JSON Structure Protocol
> >    RedfishPkg/RestJsonStructureDxe: EFI REST JSON Structure Protocol
> >
> >   MdePkg/Include/Protocol/RestJsonStructure.h   | 160 +++++
> >   MdePkg/MdePkg.dec                             |   6 +
> >   RedfishPkg/RedfishPkg.dsc                     |   3 +
> >   .../RestJsonStructureDxe.c                    | 583 ++++++++++++++++++
> >   .../RestJsonStructureDxe.inf                  |  40 ++
> >   .../RestJsonStructureInternal.h               |  35 ++
> >   6 files changed, 827 insertions(+)
> >   create mode 100644 MdePkg/Include/Protocol/RestJsonStructure.h
> >   create mode 100644
> RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.c
> >   create mode 100644
> RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.inf
> >   create mode 100644
> > RedfishPkg/RestJsonStructureDxe/RestJsonStructureInternal.h
> >
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#66115): https://edk2.groups.io/g/devel/message/66115
Mute This Topic: https://groups.io/mt/77386310/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [RestJsonStructureDxe PATCH 0/2] EFI REST JSON Structure Protocol

Posted by Abner Chang 2 days ago
Hi Sean,
Any feedbacks on my reply?

Thanks
Abner

> -----Original Message-----
> From: Chang, Abner (HPS SW/FW Technologist)
> Sent: Monday, October 12, 2020 9:51 AM
> To: devel@edk2.groups.io; spbrogan@outlook.com
> Cc: Michael D Kinney <michael.d.kinney@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>; Jiaxin
> Wu <jiaxin.wu@intel.com>; Siyuan Fu <siyuan.fu@intel.com>; Fan Wang
> <fan.wang@intel.com>; Jiewen Yao <jiewen.yao@intel.com>; Wang, Nickle
> (HPS SW) <nickle.wang@hpe.com>
> Subject: RE: [edk2-devel] [RestJsonStructureDxe PATCH 0/2] EFI REST JSON
> Structure Protocol
> 
> No you didn’t miss have discussions. However, you can help me to
> understand Unit test framework.
> 
> There are some levels of the unit test, I don’t know how much we can do in
> the current CI/UnitTestFramework and how much effort would be left to the
> new (also the existing) package developers.
> 
> 1. The code coverage test,  can this launched by CI? This one should be
> relatively simple if it can run automatically (like to launch Coverity) and gives
> report to developers.
> 2. Code path test, developers have to write the unit test drivers/apps under
> UnitTest? Developers decide how to run the function validations on
> input/output parameter and/or some other basic API functionality test?
> 3. The feature test for the hardware independent functionalities or some
> features which have the corresponding simulator like network stacks. But I
> think this is more like the platform-level test, right? Maybe this is not in
> UnittestFramework scope?
> 
> I take a look into UnitTestFramework and only see a simple sample unit test
> driver, is this the only implementation?  Any edk2 packages or drivers has its
> own unit test yet?
> Do you have some links to the edk2 Unit Test Writer guide?
> 
> Thanks
> Abner
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> > Sean
> > Sent: Friday, October 9, 2020 11:03 AM
> > To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist)
> > <abner.chang@hpe.com>
> > Cc: Michael D Kinney <michael.d.kinney@intel.com>; Liming Gao
> > <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>;
> > Jiaxin Wu <jiaxin.wu@intel.com>; Siyuan Fu <siyuan.fu@intel.com>; Fan
> > Wang <fan.wang@intel.com>; Jiewen Yao <jiewen.yao@intel.com>; Wang,
> > Nickle (HPS SW) <nickle.wang@hpe.com>
> > Subject: Re: [edk2-devel] [RestJsonStructureDxe PATCH 0/2] EFI REST
> > JSON Structure Protocol
> >
> > Abner,
> >
> > As you add this RedfishPkg and significant new code to edk2 have you
> > thought about authoring unit tests.  One of the goals of the unit test
> > work that was enabled nearly 1 year ago was to make it easy for
> > developers to write unit tests and to continually run them during PR
> > and CI runs in the hope that as a community we might start authoring unit
> tests with new code.
> >
> > Personally i would like to see a process that new modules can not be
> > added without unit tests and relatively high code coverage.
> >
> > Was there any thought to that?  Has there been discussion i may have
> missed?
> >
> > Thanks
> > Sean
> >
> >
> >
> > On 10/8/2020 8:10 AM, Abner Chang wrote:
> > > This is the implementation of EFI_REST_JSON_STRUCTURE_PROTOCOL,
> > refer
> > > to UEFI spec 2.8 Section 29.7.3 EFI REST JSON Resource to C
> > > Structure Converter.
> > >
> > > Signed-off-by: Abner Chang <abner.chang@hpe.com>
> > >
> > > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > > Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> > > Cc: Jiaxin Wu <jiaxin.wu@intel.com>
> > > Cc: Siyuan Fu <siyuan.fu@intel.com>
> > > Cc: Fan Wang <fan.wang@intel.com>
> > > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > > Cc: Nickle Wang <nickle.wang@hpe.com>
> > >
> > > Abner Chang (2):
> > >    MdePkg/Include: Definitions of EFI REST JSON Structure Protocol
> > >    RedfishPkg/RestJsonStructureDxe: EFI REST JSON Structure Protocol
> > >
> > >   MdePkg/Include/Protocol/RestJsonStructure.h   | 160 +++++
> > >   MdePkg/MdePkg.dec                             |   6 +
> > >   RedfishPkg/RedfishPkg.dsc                     |   3 +
> > >   .../RestJsonStructureDxe.c                    | 583 ++++++++++++++++++
> > >   .../RestJsonStructureDxe.inf                  |  40 ++
> > >   .../RestJsonStructureInternal.h               |  35 ++
> > >   6 files changed, 827 insertions(+)
> > >   create mode 100644 MdePkg/Include/Protocol/RestJsonStructure.h
> > >   create mode 100644
> > RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.c
> > >   create mode 100644
> > RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.inf
> > >   create mode 100644
> > > RedfishPkg/RestJsonStructureDxe/RestJsonStructureInternal.h
> > >
> >
> >
> > 
> >



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#66427): https://edk2.groups.io/g/devel/message/66427
Mute This Topic: https://groups.io/mt/77386310/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-