[dpdk-dev] scripts: support any legal git revisions as abi validation range

Message ID B27915DBBA3421428155699D51E4CFE2023CC9B0@IRSMSX103.ger.corp.intel.com (mailing list archive)
State Not Applicable, archived
Headers

Commit Message

John McNamara Dec. 3, 2015, 12:14 p.m. UTC
  > -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Panu Matilainen
> Sent: Wednesday, December 2, 2015 4:51 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] scripts: support any legal git revisions as
> abi validation range
> 
> In addition to git tags, support validating abi between any legal
> gitrevisions(7) syntaxes, such as "validate-abi.sh . -1 <target>"
> "validate-abi.sh master mybrach <target>" etc in addition to validating
> between tags. Makes it easier to run the validator for in-development
> work.

Hi Panu,

+1 for this.

You might also change the ABI validation section of the docs to go along
with this. Something like the patch below. If not I'll submit it
afterwards. 

Also, if someone has some bandwidth it would be good to add an option
to pass -j with an optional number to "make" in the script.

John


$ git diff
  

Comments

Thomas Monjalon Dec. 3, 2015, 1:28 p.m. UTC | #1
2015-12-03 12:14, Mcnamara, John:
> Also, if someone has some bandwidth it would be good to add an option
> to pass -j with an optional number to "make" in the script.

We can use -j without any number:
"make will not limit the number of jobs that can run simultaneously".
It is a not so bad default.
  
Panu Matilainen Dec. 3, 2015, 1:39 p.m. UTC | #2
On 12/03/2015 02:14 PM, Mcnamara, John wrote:
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Panu Matilainen
>> Sent: Wednesday, December 2, 2015 4:51 PM
>> To: dev@dpdk.org
>> Subject: [dpdk-dev] [PATCH] scripts: support any legal git revisions as
>> abi validation range
>>
>> In addition to git tags, support validating abi between any legal
>> gitrevisions(7) syntaxes, such as "validate-abi.sh . -1 <target>"
>> "validate-abi.sh master mybrach <target>" etc in addition to validating
>> between tags. Makes it easier to run the validator for in-development
>> work.
>
> Hi Panu,
>
> +1 for this.
>
> You might also change the ABI validation section of the docs to go along
> with this. Something like the patch below. If not I'll submit it
> afterwards.

Good points, including changing the usage message to REV instead of TAG. 
I'll send an improved version based on this, thanks.

>
> Also, if someone has some bandwidth it would be good to add an option
> to pass -j with an optional number to "make" in the script.

Can do, although I'm still waiting fo my previous, semi-related 
validate-abi patches from September to be applied...

	- Panu -
  
Thomas Monjalon Dec. 3, 2015, 1:41 p.m. UTC | #3
2015-12-03 15:39, Panu Matilainen:
> > Also, if someone has some bandwidth it would be good to add an option
> > to pass -j with an optional number to "make" in the script.
> 
> Can do, although I'm still waiting fo my previous, semi-related 
> validate-abi patches from September to be applied...

Oh yes, sorry. I will apply it shortly.
  
Panu Matilainen Dec. 3, 2015, 1:44 p.m. UTC | #4
On 12/03/2015 03:28 PM, Thomas Monjalon wrote:
> 2015-12-03 12:14, Mcnamara, John:
>> Also, if someone has some bandwidth it would be good to add an option
>> to pass -j with an optional number to "make" in the script.
>
> We can use -j without any number:
> "make will not limit the number of jobs that can run simultaneously".
> It is a not so bad default.
>

Hmm, my memory associates an unlimited -j to make with sudden death by 
fork-bomb. But that was a long time ago and on a different codebase (the 
kernel maybe), with DPDK on current hardware it doesn't seem that bad at 
all.

OTOH we can also simply ask the system for a reasonable value, eg
$ /usr/bin/getconf _NPROCESSORS_ONLN

	- Panu -
  
Bruce Richardson Dec. 3, 2015, 1:49 p.m. UTC | #5
> -----Original Message-----

> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Panu Matilainen

> Sent: Thursday, December 3, 2015 1:44 PM

> To: Thomas Monjalon <thomas.monjalon@6wind.com>; Mcnamara, John

> <john.mcnamara@intel.com>

> Cc: dev@dpdk.org

> Subject: Re: [dpdk-dev] [PATCH] scripts: support any legal git revisions

> as abi validation range

> 

> On 12/03/2015 03:28 PM, Thomas Monjalon wrote:

> > 2015-12-03 12:14, Mcnamara, John:

> >> Also, if someone has some bandwidth it would be good to add an option

> >> to pass -j with an optional number to "make" in the script.

> >

> > We can use -j without any number:

> > "make will not limit the number of jobs that can run simultaneously".

> > It is a not so bad default.

> >

> 

> Hmm, my memory associates an unlimited -j to make with sudden death by

> fork-bomb. But that was a long time ago and on a different codebase (the

> kernel maybe), with DPDK on current hardware it doesn't seem that bad at

> all.

> 

> OTOH we can also simply ask the system for a reasonable value, eg $

> /usr/bin/getconf _NPROCESSORS_ONLN

> 

> 	- Panu -


+1 to this.
  
John McNamara Dec. 3, 2015, 3:46 p.m. UTC | #6
> -----Original Message-----

> From: Panu Matilainen [mailto:pmatilai@redhat.com]

> Sent: Thursday, December 3, 2015 1:44 PM

> To: Thomas Monjalon; Mcnamara, John

> Cc: dev@dpdk.org

> Subject: Re: [dpdk-dev] [PATCH] scripts: support any legal git revisions

> as abi validation range

> 

> On 12/03/2015 03:28 PM, Thomas Monjalon wrote:

> > 2015-12-03 12:14, Mcnamara, John:

> >> Also, if someone has some bandwidth it would be good to add an option

> >> to pass -j with an optional number to "make" in the script.

> >

> > We can use -j without any number:

> > "make will not limit the number of jobs that can run simultaneously".

> > It is a not so bad default.

> >

> 

> Hmm, my memory associates an unlimited -j to make with sudden death by

> fork-bomb. But that was a long time ago and on a different codebase (the

> kernel maybe), with DPDK on current hardware it doesn't seem that bad at

> all.

> 

> OTOH we can also simply ask the system for a reasonable value, eg $

> /usr/bin/getconf _NPROCESSORS_ONLN


Hi,

To be clear, it would be nice to be able to pass "-j" or "-j n" like you can do to directly to 'make'. 

For a compile heavy codebase (no DPDK) "-j" can, as you say, choke your system but that would be up to the user to specify, or not. 

John.
--
  

Patch

diff --git a/doc/guides/contributing/versioning.rst b/doc/guides/contributing/versioning.rst
index 653c7d0..5ce5f9d 100644
--- a/doc/guides/contributing/versioning.rst
+++ b/doc/guides/contributing/versioning.rst
@@ -465,19 +465,23 @@  utilities which can be installed via a package manager. For example::
 
    sudo yum install abi-compliance-checker
    sudo yum install abi-dumper
+   sudo yum install greadelf
 
 The syntax of the ``validate-abi.sh`` utility is::
 
-   ./scripts/validate-abi.sh <TAG1> <TAG2> <TARGET>
+   ./scripts/validate-abi.sh <REV1> <REV2> <TARGET>
 
-Where ``TAG1`` and ``TAG2`` are valid git tags on the local repo and target is
-the usual DPDK compilation target.
+Where ``REV1`` and ``REV2`` are valid `gitrevisions(7)
+<https://www.kernel.org/pub/software/scm/git/docs/gitrevisions.html>`_ on the
+local repo and ``TARGET`` is the usual DPDK compilation target.
 
-For example to test the current committed HEAD against a previous release tag
-we could add a temporary tag and run the utility as follows::
+For example::
 
-   git tag MY_TEMP_TAG
-   ./scripts/validate-abi.sh v2.0.0 MY_TEMP_TAG x86_64-native-linuxapp-gcc
+   # Check between the previous and latest commits:
+   ./scripts/validate-abi.sh HEAD~1 HEAD x86_64-native-linuxapp-gcc
+
+   # Check between two tags:
+   ./scripts/validate-abi.sh v2.1.0 v2.2.0 x86_64-native-linuxapp-gcc
 
 After the validation script completes (it can take a while since it need to
 compile both tags) it will create compatibility reports in the