All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH rdma-core 0/5] ABI consistency check
@ 2017-11-14 18:55 Nicolas Morey-Chaisemartin
       [not found] ` <8306e0d4-3f4f-1d06-74e1-c971fc63f7b8-l3A5Bk7waGM@public.gmane.org>
  0 siblings, 1 reply; 20+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2017-11-14 18:55 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Add scripts to generate an ABI dump and compare against a ref.
Both tools (abi-dumper and abi-consistency-check) were imported as the
system version do not work on Travis.
Travis will automatically do that if a ref is present.
Ref should be added at stable-* branch creation (see doc update)

Nicolas Morey-Chaisemartin (5):
  buildlib: import abi checking tool
  buildlib: add script to dump ABI
  buildlib: add script to check ABI
  buildlib: run ABI check in travis-build
  Documentation: update stable doc about ABI reference generation

 Documentation/stable.md                            |    17 +
 buildlib/abi-checker/abi-compliance-checker.pl     | 10665 +++++++++++++++++++
 buildlib/abi-checker/abi-dumper.pl                 |  6793 ++++++++++++
 buildlib/abi-checker/modules/Internals/ABIDump.pm  |  1425 +++
 buildlib/abi-checker/modules/Internals/Basic.pm    |   744 ++
 buildlib/abi-checker/modules/Internals/CallConv.pm |  1352 +++
 .../abi-checker/modules/Internals/Descriptor.pm    |   289 +
 buildlib/abi-checker/modules/Internals/ElfTools.pm |   283 +
 buildlib/abi-checker/modules/Internals/Filter.pm   |   842 ++
 buildlib/abi-checker/modules/Internals/GccAst.pm   |  3907 +++++++
 buildlib/abi-checker/modules/Internals/Input.pm    |    32 +
 buildlib/abi-checker/modules/Internals/Logging.pm  |   172 +
 buildlib/abi-checker/modules/Internals/Mangling.pm |  1050 ++
 buildlib/abi-checker/modules/Internals/Path.pm     |    89 +
 buildlib/abi-checker/modules/Internals/RegTests.pm |  5199 +++++++++
 .../modules/Internals/Scripts/Sections.js          |    16 +
 .../abi-checker/modules/Internals/Scripts/Tabs.js  |    61 +
 .../modules/Internals/Styles/CmpSystems.css        |    84 +
 .../modules/Internals/Styles/HeadersDiff.css       |    49 +
 .../modules/Internals/Styles/Report.css            |   254 +
 .../modules/Internals/Styles/SymbolsList.css       |    79 +
 .../abi-checker/modules/Internals/Styles/Tabs.css  |    34 +
 buildlib/abi-checker/modules/Internals/SysCheck.pm |  2485 +++++
 buildlib/abi-checker/modules/Internals/SysFiles.pm |  2545 +++++
 buildlib/abi-checker/modules/Internals/TUDump.pm   |   969 ++
 buildlib/abi-checker/modules/Internals/TypeAttr.pm |   266 +
 buildlib/abi-checker/modules/Internals/Utils.pm    |   491 +
 buildlib/abi-checker/modules/Internals/XmlDump.pm  |   861 ++
 buildlib/abi-checker/modules/RulesBin.xml          |  3563 +++++++
 buildlib/abi-checker/modules/RulesSrc.xml          |  1792 ++++
 buildlib/gen-abi                                   |    18 +
 buildlib/travis-build                              |     4 +
 buildlib/travis-checkabi                           |    28 +
 33 files changed, 46458 insertions(+)
 create mode 100755 buildlib/abi-checker/abi-compliance-checker.pl
 create mode 100755 buildlib/abi-checker/abi-dumper.pl
 create mode 100644 buildlib/abi-checker/modules/Internals/ABIDump.pm
 create mode 100644 buildlib/abi-checker/modules/Internals/Basic.pm
 create mode 100644 buildlib/abi-checker/modules/Internals/CallConv.pm
 create mode 100644 buildlib/abi-checker/modules/Internals/Descriptor.pm
 create mode 100644 buildlib/abi-checker/modules/Internals/ElfTools.pm
 create mode 100644 buildlib/abi-checker/modules/Internals/Filter.pm
 create mode 100644 buildlib/abi-checker/modules/Internals/GccAst.pm
 create mode 100644 buildlib/abi-checker/modules/Internals/Input.pm
 create mode 100644 buildlib/abi-checker/modules/Internals/Logging.pm
 create mode 100644 buildlib/abi-checker/modules/Internals/Mangling.pm
 create mode 100644 buildlib/abi-checker/modules/Internals/Path.pm
 create mode 100644 buildlib/abi-checker/modules/Internals/RegTests.pm
 create mode 100644 buildlib/abi-checker/modules/Internals/Scripts/Sections.js
 create mode 100644 buildlib/abi-checker/modules/Internals/Scripts/Tabs.js
 create mode 100644 buildlib/abi-checker/modules/Internals/Styles/CmpSystems.css
 create mode 100644 buildlib/abi-checker/modules/Internals/Styles/HeadersDiff.css
 create mode 100644 buildlib/abi-checker/modules/Internals/Styles/Report.css
 create mode 100644 buildlib/abi-checker/modules/Internals/Styles/SymbolsList.css
 create mode 100644 buildlib/abi-checker/modules/Internals/Styles/Tabs.css
 create mode 100644 buildlib/abi-checker/modules/Internals/SysCheck.pm
 create mode 100644 buildlib/abi-checker/modules/Internals/SysFiles.pm
 create mode 100644 buildlib/abi-checker/modules/Internals/TUDump.pm
 create mode 100644 buildlib/abi-checker/modules/Internals/TypeAttr.pm
 create mode 100644 buildlib/abi-checker/modules/Internals/Utils.pm
 create mode 100644 buildlib/abi-checker/modules/Internals/XmlDump.pm
 create mode 100644 buildlib/abi-checker/modules/RulesBin.xml
 create mode 100644 buildlib/abi-checker/modules/RulesSrc.xml
 create mode 100755 buildlib/gen-abi
 create mode 100755 buildlib/travis-checkabi

-- 
2.15.0.168.g9a51f1b30.dirty

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 2/5] buildlib: add script to dump ABI
       [not found] ` <8306e0d4-3f4f-1d06-74e1-c971fc63f7b8-l3A5Bk7waGM@public.gmane.org>
@ 2017-11-14 18:57   ` Nicolas Morey-Chaisemartin
       [not found]     ` <8bcdf747-5613-8990-5742-8a9b6e552ac9-PVCUbA2IIkVH1sytvemUSjhD77mM7E+b@public.gmane.org>
  2017-11-14 18:58   ` [PATCH rdma-core 3/5] buildlib: add script to check ABI Nicolas Morey-Chaisemartin
                     ` (5 subsequent siblings)
  6 siblings, 1 reply; 20+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2017-11-14 18:57 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Builds rdma-core in -Og/Debug mode and use abi-dumper to generate 1 xml
 per .so.*.* file.
Do not use .so file directly. Providers have no symbol exported
 and cause abi-dumer to exit with an error.

Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin-IBi9RG/b67k@public.gmane.org>
Cc: stable-Xl5UnYtxxKxKUA01WzcqbQ@public.gmane.org # v15
---
 buildlib/gen-abi | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100755 buildlib/gen-abi

diff --git a/buildlib/gen-abi b/buildlib/gen-abi
new file mode 100755
index 00000000..6dff8ddb
--- /dev/null
+++ b/buildlib/gen-abi
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# Stop on error
+set -e
+# Echo all commands to Travis log
+set -x
+
+mkdir build-abi
+cd build-abi
+CFLAGS="-g -Og" cmake -GNinja -DCMAKE_BUILD_TYPE=Debug ..
+ninja
+
+mkdir ABI
+for FILE in $(find lib -name "*.so.*.*"); do 
+	LIB=$(basename $FILE)
+	MODULE_VER=$(echo $LIB | sed -e 's/.*.so\.\(.*\)/\1/')
+	../buildlib/abi-checker/abi-dumper.pl  -lver $MODULE_VER $FILE -o ABI/$LIB.dump
+done
-- 
2.15.0.168.g9a51f1b30.dirty


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 3/5] buildlib: add script to check ABI
       [not found] ` <8306e0d4-3f4f-1d06-74e1-c971fc63f7b8-l3A5Bk7waGM@public.gmane.org>
  2017-11-14 18:57   ` [PATCH rdma-core 2/5] buildlib: add script to dump ABI Nicolas Morey-Chaisemartin
@ 2017-11-14 18:58   ` Nicolas Morey-Chaisemartin
  2017-11-14 18:58   ` [PATCH rdma-core 4/5] buildlib: run ABI check in travis-build Nicolas Morey-Chaisemartin
                     ` (4 subsequent siblings)
  6 siblings, 0 replies; 20+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2017-11-14 18:58 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Add travis-checkabi which generates a dump of all rdma-core libraries
ABI and checks them against a ref if they exists.

Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin-IBi9RG/b67k@public.gmane.org>
Cc: stable-Xl5UnYtxxKxKUA01WzcqbQ@public.gmane.org # v15
---
 buildlib/travis-checkabi | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100755 buildlib/travis-checkabi

diff --git a/buildlib/travis-checkabi b/buildlib/travis-checkabi
new file mode 100755
index 00000000..7afa3b59
--- /dev/null
+++ b/buildlib/travis-checkabi
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+# Stop on error
+set -e
+# Echo all commands to Travis log
+set -x
+
+REF_DIR=buildlib/ABI
+NEW_DIR=build-abi/ABI
+
+./buildlib/gen-abi
+
+# Current ABI not available !
+if [ ! -d $NEW_DIR ]; then
+	echo "ERROR: Missing ABI description files" >&2
+	exit 1
+fi
+# No reference ABI to match against.
+if [ ! -d $REF_DIR ]; then
+	echo "INFO: Skipping ABI check. No reference available"
+	exit 0
+fi
+
+for FILE in $(find $NEW_DIR -name "*.dump"); do 
+	DUMP=$(basename $FILE)
+	LIBNAME=$(echo $DUMP | sed -e 's/\(.*\).so.*/\1/')
+	./buildlib/abi-checker/abi-compliance-checker.pl -l $LIBNAME -old $REF_DIR/$DUMP -new $NEW_DIR/$DUMP
+done
-- 
2.15.0.168.g9a51f1b30.dirty


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 4/5] buildlib: run ABI check in travis-build
       [not found] ` <8306e0d4-3f4f-1d06-74e1-c971fc63f7b8-l3A5Bk7waGM@public.gmane.org>
  2017-11-14 18:57   ` [PATCH rdma-core 2/5] buildlib: add script to dump ABI Nicolas Morey-Chaisemartin
  2017-11-14 18:58   ` [PATCH rdma-core 3/5] buildlib: add script to check ABI Nicolas Morey-Chaisemartin
@ 2017-11-14 18:58   ` Nicolas Morey-Chaisemartin
       [not found]     ` <866df5d4-2a54-2014-a180-1fd0dc43d0fa-l3A5Bk7waGM@public.gmane.org>
  2017-11-14 18:58   ` [PATCH rdma-core 5/5] Documentation: update stable doc about ABI reference generation Nicolas Morey-Chaisemartin
                     ` (3 subsequent siblings)
  6 siblings, 1 reply; 20+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2017-11-14 18:58 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Run travis-checkabi during travis build

Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin-IBi9RG/b67k@public.gmane.org>
Cc: stable-Xl5UnYtxxKxKUA01WzcqbQ@public.gmane.org # v15
---
 buildlib/travis-build | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/buildlib/travis-build b/buildlib/travis-build
index bf86baa7..f8e5ee05 100755
--- a/buildlib/travis-build
+++ b/buildlib/travis-build
@@ -5,6 +5,10 @@ set -e
 # Echo all commands to Travis log
 set -x
 
+
+# Build in debug mode and check the ABI against the ref
+./buildlib/travis-checkabi
+
 mkdir build-clang build32 build-sparse build-aarch64
 
 # Build with latest clang first
-- 
2.15.0.168.g9a51f1b30.dirty


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 5/5] Documentation: update stable doc about ABI reference generation
       [not found] ` <8306e0d4-3f4f-1d06-74e1-c971fc63f7b8-l3A5Bk7waGM@public.gmane.org>
                     ` (2 preceding siblings ...)
  2017-11-14 18:58   ` [PATCH rdma-core 4/5] buildlib: run ABI check in travis-build Nicolas Morey-Chaisemartin
@ 2017-11-14 18:58   ` Nicolas Morey-Chaisemartin
       [not found]     ` <4bbfedda-eab7-0320-2a37-e3ecbf1093dc-l3A5Bk7waGM@public.gmane.org>
  2017-11-14 18:59   ` [PATCH rdma-core 2/5] buildlib: add script to dump ABI Nicolas Morey-Chaisemartin
                     ` (2 subsequent siblings)
  6 siblings, 1 reply; 20+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2017-11-14 18:58 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin-IBi9RG/b67k@public.gmane.org>
---
 Documentation/stable.md | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/Documentation/stable.md b/Documentation/stable.md
index d7ea9822..b7d26c98 100644
--- a/Documentation/stable.md
+++ b/Documentation/stable.md
@@ -63,3 +63,20 @@ Note that for Option 3, if the patch deviates from the original upstream patch (
 ## Versioning
 
 See versioning.md for setting package version on a stable branch.
+
+
+## Creating a stable branch
+
+Stable branch should be created from a release tag of the master branch.
+The first thing to do on a master branch is to commit the mainstream release ABI infos
+so that latters patches/fixes can be checked against this reference.
+
+To do that, the creator of the branch should run
+```
+./buildlib/gen-abi
+mv build-abi/ABI buildlib/ABI
+git add buildlib/ABI
+git commit
+```
+
+Note that the ABI must NOT be commited at any point in the master branch.
-- 
2.15.0.168.g9a51f1b30.dirty

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 2/5] buildlib: add script to dump ABI
       [not found] ` <8306e0d4-3f4f-1d06-74e1-c971fc63f7b8-l3A5Bk7waGM@public.gmane.org>
                     ` (3 preceding siblings ...)
  2017-11-14 18:58   ` [PATCH rdma-core 5/5] Documentation: update stable doc about ABI reference generation Nicolas Morey-Chaisemartin
@ 2017-11-14 18:59   ` Nicolas Morey-Chaisemartin
  2017-11-14 18:59   ` [PATCH rdma-core 3/5] buildlib: add script to check ABI Nicolas Morey-Chaisemartin
  2017-11-14 19:40   ` [PATCH rdma-core 0/5] ABI consistency check Nicolas Morey-Chaisemartin
  6 siblings, 0 replies; 20+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2017-11-14 18:59 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Builds rdma-core in -Og/Debug mode and use abi-dumper to generate 1 xml
 per .so.*.* file.
Do not use .so file directly. Providers have no symbol exported
 and cause abi-dumer to exit with an error.

Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin-IBi9RG/b67k@public.gmane.org>
Cc: stable-Xl5UnYtxxKxKUA01WzcqbQ@public.gmane.org # v15
---
 buildlib/gen-abi | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100755 buildlib/gen-abi

diff --git a/buildlib/gen-abi b/buildlib/gen-abi
new file mode 100755
index 00000000..6dff8ddb
--- /dev/null
+++ b/buildlib/gen-abi
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# Stop on error
+set -e
+# Echo all commands to Travis log
+set -x
+
+mkdir build-abi
+cd build-abi
+CFLAGS="-g -Og" cmake -GNinja -DCMAKE_BUILD_TYPE=Debug ..
+ninja
+
+mkdir ABI
+for FILE in $(find lib -name "*.so.*.*"); do 
+	LIB=$(basename $FILE)
+	MODULE_VER=$(echo $LIB | sed -e 's/.*.so\.\(.*\)/\1/')
+	../buildlib/abi-checker/abi-dumper.pl  -lver $MODULE_VER $FILE -o ABI/$LIB.dump
+done
-- 
2.15.0.168.g9a51f1b30.dirty


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 3/5] buildlib: add script to check ABI
       [not found] ` <8306e0d4-3f4f-1d06-74e1-c971fc63f7b8-l3A5Bk7waGM@public.gmane.org>
                     ` (4 preceding siblings ...)
  2017-11-14 18:59   ` [PATCH rdma-core 2/5] buildlib: add script to dump ABI Nicolas Morey-Chaisemartin
@ 2017-11-14 18:59   ` Nicolas Morey-Chaisemartin
  2017-11-14 19:40   ` [PATCH rdma-core 0/5] ABI consistency check Nicolas Morey-Chaisemartin
  6 siblings, 0 replies; 20+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2017-11-14 18:59 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Add travis-checkabi which generates a dump of all rdma-core libraries
ABI and checks them against a ref if they exists.

Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin-IBi9RG/b67k@public.gmane.org>
Cc: stable-Xl5UnYtxxKxKUA01WzcqbQ@public.gmane.org # v15
---
 buildlib/travis-checkabi | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100755 buildlib/travis-checkabi

diff --git a/buildlib/travis-checkabi b/buildlib/travis-checkabi
new file mode 100755
index 00000000..7afa3b59
--- /dev/null
+++ b/buildlib/travis-checkabi
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+# Stop on error
+set -e
+# Echo all commands to Travis log
+set -x
+
+REF_DIR=buildlib/ABI
+NEW_DIR=build-abi/ABI
+
+./buildlib/gen-abi
+
+# Current ABI not available !
+if [ ! -d $NEW_DIR ]; then
+	echo "ERROR: Missing ABI description files" >&2
+	exit 1
+fi
+# No reference ABI to match against.
+if [ ! -d $REF_DIR ]; then
+	echo "INFO: Skipping ABI check. No reference available"
+	exit 0
+fi
+
+for FILE in $(find $NEW_DIR -name "*.dump"); do 
+	DUMP=$(basename $FILE)
+	LIBNAME=$(echo $DUMP | sed -e 's/\(.*\).so.*/\1/')
+	./buildlib/abi-checker/abi-compliance-checker.pl -l $LIBNAME -old $REF_DIR/$DUMP -new $NEW_DIR/$DUMP
+done
-- 
2.15.0.168.g9a51f1b30.dirty


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH rdma-core 0/5] ABI consistency check
       [not found] ` <8306e0d4-3f4f-1d06-74e1-c971fc63f7b8-l3A5Bk7waGM@public.gmane.org>
                     ` (5 preceding siblings ...)
  2017-11-14 18:59   ` [PATCH rdma-core 3/5] buildlib: add script to check ABI Nicolas Morey-Chaisemartin
@ 2017-11-14 19:40   ` Nicolas Morey-Chaisemartin
  6 siblings, 0 replies; 20+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2017-11-14 19:40 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Between my screwed up Thunderbird that sent the patch from the wrong mail/server and patch #1 which is too big for the ML it seems, I did a PR on github.
https://github.com/linux-rdma/rdma-core/pull/251

Le 14/11/2017 à 19:55, Nicolas Morey-Chaisemartin a écrit :
> Add scripts to generate an ABI dump and compare against a ref.
> Both tools (abi-dumper and abi-consistency-check) were imported as the
> system version do not work on Travis.
> Travis will automatically do that if a ref is present.
> Ref should be added at stable-* branch creation (see doc update)

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH rdma-core 5/5] Documentation: update stable doc about ABI reference generation
       [not found]     ` <4bbfedda-eab7-0320-2a37-e3ecbf1093dc-l3A5Bk7waGM@public.gmane.org>
@ 2017-11-15  5:53       ` Leon Romanovsky
       [not found]         ` <20171115055354.GQ18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  0 siblings, 1 reply; 20+ messages in thread
From: Leon Romanovsky @ 2017-11-15  5:53 UTC (permalink / raw)
  To: Nicolas Morey-Chaisemartin; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1501 bytes --]

On Tue, Nov 14, 2017 at 07:58:12PM +0100, Nicolas Morey-Chaisemartin wrote:
> Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin-IBi9RG/b67k@public.gmane.org>
> ---
>  Documentation/stable.md | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/Documentation/stable.md b/Documentation/stable.md
> index d7ea9822..b7d26c98 100644
> --- a/Documentation/stable.md
> +++ b/Documentation/stable.md
> @@ -63,3 +63,20 @@ Note that for Option 3, if the patch deviates from the original upstream patch (
>  ## Versioning
>
>  See versioning.md for setting package version on a stable branch.
> +
> +
> +## Creating a stable branch
> +
> +Stable branch should be created from a release tag of the master branch.
> +The first thing to do on a master branch is to commit the mainstream release ABI infos
> +so that latters patches/fixes can be checked against this reference.

Does it mean that you should rebase your stable-v15 branch?
It doesn't contain ABI infos yet.

> +
> +To do that, the creator of the branch should run
> +```
> +./buildlib/gen-abi
> +mv build-abi/ABI buildlib/ABI
> +git add buildlib/ABI
> +git commit
> +```
> +
> +Note that the ABI must NOT be commited at any point in the master branch.
> --
> 2.15.0.168.g9a51f1b30.dirty
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH rdma-core 2/5] buildlib: add script to dump ABI
       [not found]     ` <8bcdf747-5613-8990-5742-8a9b6e552ac9-PVCUbA2IIkVH1sytvemUSjhD77mM7E+b@public.gmane.org>
@ 2017-11-15  5:56       ` Leon Romanovsky
       [not found]         ` <20171115055632.GR18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  0 siblings, 1 reply; 20+ messages in thread
From: Leon Romanovsky @ 2017-11-15  5:56 UTC (permalink / raw)
  To: Nicolas Morey-Chaisemartin; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1468 bytes --]

On Tue, Nov 14, 2017 at 07:57:55PM +0100, Nicolas Morey-Chaisemartin wrote:
> Builds rdma-core in -Og/Debug mode and use abi-dumper to generate 1 xml
>  per .so.*.* file.
> Do not use .so file directly. Providers have no symbol exported
>  and cause abi-dumer to exit with an error.

mlx4/mlx5 do export.

Thanks

>
> Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin-IBi9RG/b67k@public.gmane.org>
> Cc: stable-Xl5UnYtxxKxKUA01WzcqbQ@public.gmane.org # v15
> ---
>  buildlib/gen-abi | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>  create mode 100755 buildlib/gen-abi
>
> diff --git a/buildlib/gen-abi b/buildlib/gen-abi
> new file mode 100755
> index 00000000..6dff8ddb
> --- /dev/null
> +++ b/buildlib/gen-abi
> @@ -0,0 +1,18 @@
> +#!/bin/bash
> +
> +# Stop on error
> +set -e
> +# Echo all commands to Travis log
> +set -x
> +
> +mkdir build-abi
> +cd build-abi
> +CFLAGS="-g -Og" cmake -GNinja -DCMAKE_BUILD_TYPE=Debug ..
> +ninja
> +
> +mkdir ABI
> +for FILE in $(find lib -name "*.so.*.*"); do
> +	LIB=$(basename $FILE)
> +	MODULE_VER=$(echo $LIB | sed -e 's/.*.so\.\(.*\)/\1/')
> +	../buildlib/abi-checker/abi-dumper.pl  -lver $MODULE_VER $FILE -o ABI/$LIB.dump
> +done
> --
> 2.15.0.168.g9a51f1b30.dirty
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH rdma-core 4/5] buildlib: run ABI check in travis-build
       [not found]     ` <866df5d4-2a54-2014-a180-1fd0dc43d0fa-l3A5Bk7waGM@public.gmane.org>
@ 2017-11-15  5:58       ` Leon Romanovsky
       [not found]         ` <20171115055825.GS18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  0 siblings, 1 reply; 20+ messages in thread
From: Leon Romanovsky @ 2017-11-15  5:58 UTC (permalink / raw)
  To: Nicolas Morey-Chaisemartin; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

On Tue, Nov 14, 2017 at 07:58:06PM +0100, Nicolas Morey-Chaisemartin wrote:
> Run travis-checkabi during travis build
>
> Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin-IBi9RG/b67k@public.gmane.org>
> Cc: stable-Xl5UnYtxxKxKUA01WzcqbQ@public.gmane.org # v15
> ---
>  buildlib/travis-build | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/buildlib/travis-build b/buildlib/travis-build
> index bf86baa7..f8e5ee05 100755
> --- a/buildlib/travis-build
> +++ b/buildlib/travis-build
> @@ -5,6 +5,10 @@ set -e
>  # Echo all commands to Travis log
>  set -x
>
> +
> +# Build in debug mode and check the ABI against the ref
> +./buildlib/travis-checkabi

Will it run for all commits, including master?


> +
>  mkdir build-clang build32 build-sparse build-aarch64
>
>  # Build with latest clang first
> --
> 2.15.0.168.g9a51f1b30.dirty
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH rdma-core 2/5] buildlib: add script to dump ABI
       [not found]         ` <20171115055632.GR18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2017-11-15 17:22           ` Nicolas Morey-Chaisemartin
       [not found]             ` <b36cd702-5d8e-c116-3306-39e1a1b8aaf5-l3A5Bk7waGM@public.gmane.org>
  0 siblings, 1 reply; 20+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2017-11-15 17:22 UTC (permalink / raw)
  To: Leon Romanovsky; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA



Le 15/11/2017 à 06:56, Leon Romanovsky a écrit :
> On Tue, Nov 14, 2017 at 07:57:55PM +0100, Nicolas Morey-Chaisemartin wrote:
>> Builds rdma-core in -Og/Debug mode and use abi-dumper to generate 1 xml
>>  per .so.*.* file.
>> Do not use .so file directly. Providers have no symbol exported
>>  and cause abi-dumer to exit with an error.
> mlx4/mlx5 do export.
>
> Thanks


Yes but they also export versiones .so files
$ ll build-abi/lib/libmlx*
lrwxrwxrwx 1 nmorey users     17 Nov 14 19:51 build-abi/lib/libmlx4-rdmav16.so -> libmlx4.so.1.0.16
lrwxrwxrwx 1 nmorey users     12 Nov 14 19:51 build-abi/lib/libmlx4.so -> libmlx4.so.1
lrwxrwxrwx 1 nmorey users     17 Nov 14 19:51 build-abi/lib/libmlx4.so.1 -> libmlx4.so.1.0.16
-rwxr-xr-x 1 nmorey users 276600 Nov 14 19:51 build-abi/lib/libmlx4.so.1.0.16
lrwxrwxrwx 1 nmorey users     17 Nov 14 19:51 build-abi/lib/libmlx5-rdmav16.so -> libmlx5.so.1.2.16
lrwxrwxrwx 1 nmorey users     12 Nov 14 19:51 build-abi/lib/libmlx5.so -> libmlx5.so.1
lrwxrwxrwx 1 nmorey users     17 Nov 14 19:51 build-abi/lib/libmlx5.so.1 -> libmlx5.so.1.2.16
-rwxr-xr-x 1 nmorey users 690712 Nov 14 19:51 build-abi/lib/libmlx5.so.1.2.16

So the .so are ignored (specially the -rdmav16) but the standalone ones aren't

Nicolas
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH rdma-core 4/5] buildlib: run ABI check in travis-build
       [not found]         ` <20171115055825.GS18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2017-11-15 17:24           ` Nicolas Morey-Chaisemartin
       [not found]             ` <a6eadf81-1557-bf9c-c163-61461bc5c271-l3A5Bk7waGM@public.gmane.org>
  0 siblings, 1 reply; 20+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2017-11-15 17:24 UTC (permalink / raw)
  To: Leon Romanovsky; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA



Le 15/11/2017 à 06:58, Leon Romanovsky a écrit :
> On Tue, Nov 14, 2017 at 07:58:06PM +0100, Nicolas Morey-Chaisemartin wrote:
>> Run travis-checkabi during travis build
>>
>> Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin-IBi9RG/b67k@public.gmane.org>
>> Cc: stable-Xl5UnYtxxKxKUA01WzcqbQ@public.gmane.org # v15
>> ---
>>  buildlib/travis-build | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/buildlib/travis-build b/buildlib/travis-build
>> index bf86baa7..f8e5ee05 100755
>> --- a/buildlib/travis-build
>> +++ b/buildlib/travis-build
>> @@ -5,6 +5,10 @@ set -e
>>  # Echo all commands to Travis log
>>  set -x
>>
>> +
>> +# Build in debug mode and check the ABI against the ref
>> +./buildlib/travis-checkabi
> Will it run for all commits, including master?

Yes and no.
The script is called for all commits. But one of the first thing it does is checking that reference file exists and ignore if they don't (see Patch 3):

+# No reference ABI to match against.
+if [ ! -d $REF_DIR ]; then
+	echo "INFO: Skipping ABI check. No reference available"
+	exit 0
+fi
+

It might be worth doing this test first in the script to avoid the debug build / abi-dumper calls.


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH rdma-core 5/5] Documentation: update stable doc about ABI reference generation
       [not found]         ` <20171115055354.GQ18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2017-11-15 17:26           ` Nicolas Morey-Chaisemartin
  0 siblings, 0 replies; 20+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2017-11-15 17:26 UTC (permalink / raw)
  To: Leon Romanovsky; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA



Le 15/11/2017 à 06:53, Leon Romanovsky a écrit :
> On Tue, Nov 14, 2017 at 07:58:12PM +0100, Nicolas Morey-Chaisemartin wrote:
>> Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin-IBi9RG/b67k@public.gmane.org>
>> ---
>>  Documentation/stable.md | 17 +++++++++++++++++
>>  1 file changed, 17 insertions(+)
>>
>> diff --git a/Documentation/stable.md b/Documentation/stable.md
>> index d7ea9822..b7d26c98 100644
>> --- a/Documentation/stable.md
>> +++ b/Documentation/stable.md
>> @@ -63,3 +63,20 @@ Note that for Option 3, if the patch deviates from the original upstream patch (
>>  ## Versioning
>>
>>  See versioning.md for setting package version on a stable branch.
>> +
>> +
>> +## Creating a stable branch
>> +
>> +Stable branch should be created from a release tag of the master branch.
>> +The first thing to do on a master branch is to commit the mainstream release ABI infos
>> +so that latters patches/fixes can be checked against this reference.
> Does it mean that you should rebase your stable-v15 branch?
> It doesn't contain ABI infos yet.

I checked that the current stable-v15 passes the travis-checkabi manually (by generating the ABI from the v15 tag).
So no need there.
Once this series is accepted, I'll backport it to stable-v15 and generate a clean ABI ref from the v15 tag (and commit it)

Nicolas
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH rdma-core 4/5] buildlib: run ABI check in travis-build
       [not found]             ` <a6eadf81-1557-bf9c-c163-61461bc5c271-l3A5Bk7waGM@public.gmane.org>
@ 2017-11-15 17:34               ` Leon Romanovsky
       [not found]                 ` <20171115173453.GB18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  0 siblings, 1 reply; 20+ messages in thread
From: Leon Romanovsky @ 2017-11-15 17:34 UTC (permalink / raw)
  To: Nicolas Morey-Chaisemartin; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1413 bytes --]

On Wed, Nov 15, 2017 at 06:24:32PM +0100, Nicolas Morey-Chaisemartin wrote:
>
>
> Le 15/11/2017 à 06:58, Leon Romanovsky a écrit :
> > On Tue, Nov 14, 2017 at 07:58:06PM +0100, Nicolas Morey-Chaisemartin wrote:
> >> Run travis-checkabi during travis build
> >>
> >> Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin-IBi9RG/b67k@public.gmane.org>
> >> Cc: stable-Xl5UnYtxxKxKUA01WzcqbQ@public.gmane.org # v15
> >> ---
> >>  buildlib/travis-build | 4 ++++
> >>  1 file changed, 4 insertions(+)
> >>
> >> diff --git a/buildlib/travis-build b/buildlib/travis-build
> >> index bf86baa7..f8e5ee05 100755
> >> --- a/buildlib/travis-build
> >> +++ b/buildlib/travis-build
> >> @@ -5,6 +5,10 @@ set -e
> >>  # Echo all commands to Travis log
> >>  set -x
> >>
> >> +
> >> +# Build in debug mode and check the ABI against the ref
> >> +./buildlib/travis-checkabi
> > Will it run for all commits, including master?
>
> Yes and no.
> The script is called for all commits. But one of the first thing it does is checking that reference file exists and ignore if they don't (see Patch 3):
>
> +# No reference ABI to match against.
> +if [ ! -d $REF_DIR ]; then
> +	echo "INFO: Skipping ABI check. No reference available"
> +	exit 0
> +fi
> +
>
> It might be worth doing this test first in the script to avoid the debug build / abi-dumper calls.

Yes, please.

Thanks

>
>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH rdma-core 2/5] buildlib: add script to dump ABI
       [not found]             ` <b36cd702-5d8e-c116-3306-39e1a1b8aaf5-l3A5Bk7waGM@public.gmane.org>
@ 2017-11-15 17:37               ` Leon Romanovsky
       [not found]                 ` <20171115173719.GC18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  0 siblings, 1 reply; 20+ messages in thread
From: Leon Romanovsky @ 2017-11-15 17:37 UTC (permalink / raw)
  To: Nicolas Morey-Chaisemartin; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1525 bytes --]

On Wed, Nov 15, 2017 at 06:22:33PM +0100, Nicolas Morey-Chaisemartin wrote:
>
>
> Le 15/11/2017 à 06:56, Leon Romanovsky a écrit :
> > On Tue, Nov 14, 2017 at 07:57:55PM +0100, Nicolas Morey-Chaisemartin wrote:
> >> Builds rdma-core in -Og/Debug mode and use abi-dumper to generate 1 xml
> >>  per .so.*.* file.
> >> Do not use .so file directly. Providers have no symbol exported
> >>  and cause abi-dumer to exit with an error.
> > mlx4/mlx5 do export.
> >
> > Thanks
>
>
> Yes but they also export versiones .so files
> $ ll build-abi/lib/libmlx*
> lrwxrwxrwx 1 nmorey users     17 Nov 14 19:51 build-abi/lib/libmlx4-rdmav16.so -> libmlx4.so.1.0.16
> lrwxrwxrwx 1 nmorey users     12 Nov 14 19:51 build-abi/lib/libmlx4.so -> libmlx4.so.1
> lrwxrwxrwx 1 nmorey users     17 Nov 14 19:51 build-abi/lib/libmlx4.so.1 -> libmlx4.so.1.0.16
> -rwxr-xr-x 1 nmorey users 276600 Nov 14 19:51 build-abi/lib/libmlx4.so.1.0.16
> lrwxrwxrwx 1 nmorey users     17 Nov 14 19:51 build-abi/lib/libmlx5-rdmav16.so -> libmlx5.so.1.2.16
> lrwxrwxrwx 1 nmorey users     12 Nov 14 19:51 build-abi/lib/libmlx5.so -> libmlx5.so.1
> lrwxrwxrwx 1 nmorey users     17 Nov 14 19:51 build-abi/lib/libmlx5.so.1 -> libmlx5.so.1.2.16
> -rwxr-xr-x 1 nmorey users 690712 Nov 14 19:51 build-abi/lib/libmlx5.so.1.2.16
>
> So the .so are ignored (specially the -rdmav16) but the standalone ones aren't

We are supporting static builds too (*.a and not *.so), can the script
be extended to check them too?

Thanks

>
> Nicolas

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH rdma-core 2/5] buildlib: add script to dump ABI
       [not found]                 ` <20171115173719.GC18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2017-11-15 17:52                   ` Nicolas Morey-Chaisemartin
       [not found]                     ` <9f40619b-bd97-ad6f-494b-c493dd3c3c21-l3A5Bk7waGM@public.gmane.org>
  0 siblings, 1 reply; 20+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2017-11-15 17:52 UTC (permalink / raw)
  To: Leon Romanovsky; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA



Le 15/11/2017 à 18:37, Leon Romanovsky a écrit :
> On Wed, Nov 15, 2017 at 06:22:33PM +0100, Nicolas Morey-Chaisemartin wrote:
>>
>> Le 15/11/2017 à 06:56, Leon Romanovsky a écrit :
>>> On Tue, Nov 14, 2017 at 07:57:55PM +0100, Nicolas Morey-Chaisemartin wrote:
>>>> Builds rdma-core in -Og/Debug mode and use abi-dumper to generate 1 xml
>>>>  per .so.*.* file.
>>>> Do not use .so file directly. Providers have no symbol exported
>>>>  and cause abi-dumer to exit with an error.
>>> mlx4/mlx5 do export.
>>>
>>> Thanks
>>
>> Yes but they also export versiones .so files
>> $ ll build-abi/lib/libmlx*
>> lrwxrwxrwx 1 nmorey users     17 Nov 14 19:51 build-abi/lib/libmlx4-rdmav16.so -> libmlx4.so.1.0.16
>> lrwxrwxrwx 1 nmorey users     12 Nov 14 19:51 build-abi/lib/libmlx4.so -> libmlx4.so.1
>> lrwxrwxrwx 1 nmorey users     17 Nov 14 19:51 build-abi/lib/libmlx4.so.1 -> libmlx4.so.1.0.16
>> -rwxr-xr-x 1 nmorey users 276600 Nov 14 19:51 build-abi/lib/libmlx4.so.1.0.16
>> lrwxrwxrwx 1 nmorey users     17 Nov 14 19:51 build-abi/lib/libmlx5-rdmav16.so -> libmlx5.so.1.2.16
>> lrwxrwxrwx 1 nmorey users     12 Nov 14 19:51 build-abi/lib/libmlx5.so -> libmlx5.so.1
>> lrwxrwxrwx 1 nmorey users     17 Nov 14 19:51 build-abi/lib/libmlx5.so.1 -> libmlx5.so.1.2.16
>> -rwxr-xr-x 1 nmorey users 690712 Nov 14 19:51 build-abi/lib/libmlx5.so.1.2.16
>>
>> So the .so are ignored (specially the -rdmav16) but the standalone ones aren't
> We are supporting static builds too (*.a and not *.so), can the script
> be extended to check them too?
>
> Thanks

Does that changes something ? As long as the specific build-abi build generates the .so, it should be sufficient to check the ABI.
Wether someone build with static options or not.
Unless there are other static libs I'm missing.

Nicolas
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH rdma-core 4/5] buildlib: run ABI check in travis-build
       [not found]                 ` <20171115173453.GB18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2017-11-15 17:57                   ` Nicolas Morey-Chaisemartin
  0 siblings, 0 replies; 20+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2017-11-15 17:57 UTC (permalink / raw)
  To: Leon Romanovsky; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA



Le 15/11/2017 à 18:34, Leon Romanovsky a écrit :
> On Wed, Nov 15, 2017 at 06:24:32PM +0100, Nicolas Morey-Chaisemartin wrote:
>>
>> Le 15/11/2017 à 06:58, Leon Romanovsky a écrit :
>>> On Tue, Nov 14, 2017 at 07:58:06PM +0100, Nicolas Morey-Chaisemartin wrote:
>>>> Run travis-checkabi during travis build
>>>>
>>>> Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin-IBi9RG/b67k@public.gmane.org>
>>>> Cc: stable-Xl5UnYtxxKxKUA01WzcqbQ@public.gmane.org # v15
>>>> ---
>>>>  buildlib/travis-build | 4 ++++
>>>>  1 file changed, 4 insertions(+)
>>>>
>>>> diff --git a/buildlib/travis-build b/buildlib/travis-build
>>>> index bf86baa7..f8e5ee05 100755
>>>> --- a/buildlib/travis-build
>>>> +++ b/buildlib/travis-build
>>>> @@ -5,6 +5,10 @@ set -e
>>>>  # Echo all commands to Travis log
>>>>  set -x
>>>>
>>>> +
>>>> +# Build in debug mode and check the ABI against the ref
>>>> +./buildlib/travis-checkabi
>>> Will it run for all commits, including master?
>> Yes and no.
>> The script is called for all commits. But one of the first thing it does is checking that reference file exists and ignore if they don't (see Patch 3):
>>
>> +# No reference ABI to match against.
>> +if [ ! -d $REF_DIR ]; then
>> +	echo "INFO: Skipping ABI check. No reference available"
>> +	exit 0
>> +fi
>> +
>>
>> It might be worth doing this test first in the script to avoid the debug build / abi-dumper calls.
> Yes, please.
>
> Thanks
>
>

Fixed in the github PR.

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH rdma-core 2/5] buildlib: add script to dump ABI
       [not found]                     ` <9f40619b-bd97-ad6f-494b-c493dd3c3c21-l3A5Bk7waGM@public.gmane.org>
@ 2017-11-15 19:36                       ` Jason Gunthorpe
  2017-11-15 19:38                       ` Leon Romanovsky
  1 sibling, 0 replies; 20+ messages in thread
From: Jason Gunthorpe @ 2017-11-15 19:36 UTC (permalink / raw)
  To: Nicolas Morey-Chaisemartin
  Cc: Leon Romanovsky, linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Wed, Nov 15, 2017 at 06:52:49PM +0100, Nicolas Morey-Chaisemartin wrote:

> Does that changes something ? As long as the specific build-abi build generates the .so, it should be sufficient to check the ABI.
> Wether someone build with static options or not.
> Unless there are other static libs I'm missing.

Correct, there is no need to check the static library - and it will be
much harder to extract the public ABI from the private internal ABI
when working with a static library.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH rdma-core 2/5] buildlib: add script to dump ABI
       [not found]                     ` <9f40619b-bd97-ad6f-494b-c493dd3c3c21-l3A5Bk7waGM@public.gmane.org>
  2017-11-15 19:36                       ` Jason Gunthorpe
@ 2017-11-15 19:38                       ` Leon Romanovsky
  1 sibling, 0 replies; 20+ messages in thread
From: Leon Romanovsky @ 2017-11-15 19:38 UTC (permalink / raw)
  To: Nicolas Morey-Chaisemartin; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 2053 bytes --]

On Wed, Nov 15, 2017 at 06:52:49PM +0100, Nicolas Morey-Chaisemartin wrote:
>
>
> Le 15/11/2017 à 18:37, Leon Romanovsky a écrit :
> > On Wed, Nov 15, 2017 at 06:22:33PM +0100, Nicolas Morey-Chaisemartin wrote:
> >>
> >> Le 15/11/2017 à 06:56, Leon Romanovsky a écrit :
> >>> On Tue, Nov 14, 2017 at 07:57:55PM +0100, Nicolas Morey-Chaisemartin wrote:
> >>>> Builds rdma-core in -Og/Debug mode and use abi-dumper to generate 1 xml
> >>>>  per .so.*.* file.
> >>>> Do not use .so file directly. Providers have no symbol exported
> >>>>  and cause abi-dumer to exit with an error.
> >>> mlx4/mlx5 do export.
> >>>
> >>> Thanks
> >>
> >> Yes but they also export versiones .so files
> >> $ ll build-abi/lib/libmlx*
> >> lrwxrwxrwx 1 nmorey users     17 Nov 14 19:51 build-abi/lib/libmlx4-rdmav16.so -> libmlx4.so.1.0.16
> >> lrwxrwxrwx 1 nmorey users     12 Nov 14 19:51 build-abi/lib/libmlx4.so -> libmlx4.so.1
> >> lrwxrwxrwx 1 nmorey users     17 Nov 14 19:51 build-abi/lib/libmlx4.so.1 -> libmlx4.so.1.0.16
> >> -rwxr-xr-x 1 nmorey users 276600 Nov 14 19:51 build-abi/lib/libmlx4.so.1.0.16
> >> lrwxrwxrwx 1 nmorey users     17 Nov 14 19:51 build-abi/lib/libmlx5-rdmav16.so -> libmlx5.so.1.2.16
> >> lrwxrwxrwx 1 nmorey users     12 Nov 14 19:51 build-abi/lib/libmlx5.so -> libmlx5.so.1
> >> lrwxrwxrwx 1 nmorey users     17 Nov 14 19:51 build-abi/lib/libmlx5.so.1 -> libmlx5.so.1.2.16
> >> -rwxr-xr-x 1 nmorey users 690712 Nov 14 19:51 build-abi/lib/libmlx5.so.1.2.16
> >>
> >> So the .so are ignored (specially the -rdmav16) but the standalone ones aren't
> > We are supporting static builds too (*.a and not *.so), can the script
> > be extended to check them too?
> >
> > Thanks
>
> Does that changes something ? As long as the specific build-abi build generates the .so, it should be sufficient to check the ABI.
> Wether someone build with static options or not.
> Unless there are other static libs I'm missing.

In static libraries, the functions have different signatures without stanzas.

>
> Nicolas

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2017-11-15 19:38 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-14 18:55 [PATCH rdma-core 0/5] ABI consistency check Nicolas Morey-Chaisemartin
     [not found] ` <8306e0d4-3f4f-1d06-74e1-c971fc63f7b8-l3A5Bk7waGM@public.gmane.org>
2017-11-14 18:57   ` [PATCH rdma-core 2/5] buildlib: add script to dump ABI Nicolas Morey-Chaisemartin
     [not found]     ` <8bcdf747-5613-8990-5742-8a9b6e552ac9-PVCUbA2IIkVH1sytvemUSjhD77mM7E+b@public.gmane.org>
2017-11-15  5:56       ` Leon Romanovsky
     [not found]         ` <20171115055632.GR18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-11-15 17:22           ` Nicolas Morey-Chaisemartin
     [not found]             ` <b36cd702-5d8e-c116-3306-39e1a1b8aaf5-l3A5Bk7waGM@public.gmane.org>
2017-11-15 17:37               ` Leon Romanovsky
     [not found]                 ` <20171115173719.GC18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-11-15 17:52                   ` Nicolas Morey-Chaisemartin
     [not found]                     ` <9f40619b-bd97-ad6f-494b-c493dd3c3c21-l3A5Bk7waGM@public.gmane.org>
2017-11-15 19:36                       ` Jason Gunthorpe
2017-11-15 19:38                       ` Leon Romanovsky
2017-11-14 18:58   ` [PATCH rdma-core 3/5] buildlib: add script to check ABI Nicolas Morey-Chaisemartin
2017-11-14 18:58   ` [PATCH rdma-core 4/5] buildlib: run ABI check in travis-build Nicolas Morey-Chaisemartin
     [not found]     ` <866df5d4-2a54-2014-a180-1fd0dc43d0fa-l3A5Bk7waGM@public.gmane.org>
2017-11-15  5:58       ` Leon Romanovsky
     [not found]         ` <20171115055825.GS18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-11-15 17:24           ` Nicolas Morey-Chaisemartin
     [not found]             ` <a6eadf81-1557-bf9c-c163-61461bc5c271-l3A5Bk7waGM@public.gmane.org>
2017-11-15 17:34               ` Leon Romanovsky
     [not found]                 ` <20171115173453.GB18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-11-15 17:57                   ` Nicolas Morey-Chaisemartin
2017-11-14 18:58   ` [PATCH rdma-core 5/5] Documentation: update stable doc about ABI reference generation Nicolas Morey-Chaisemartin
     [not found]     ` <4bbfedda-eab7-0320-2a37-e3ecbf1093dc-l3A5Bk7waGM@public.gmane.org>
2017-11-15  5:53       ` Leon Romanovsky
     [not found]         ` <20171115055354.GQ18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-11-15 17:26           ` Nicolas Morey-Chaisemartin
2017-11-14 18:59   ` [PATCH rdma-core 2/5] buildlib: add script to dump ABI Nicolas Morey-Chaisemartin
2017-11-14 18:59   ` [PATCH rdma-core 3/5] buildlib: add script to check ABI Nicolas Morey-Chaisemartin
2017-11-14 19:40   ` [PATCH rdma-core 0/5] ABI consistency check Nicolas Morey-Chaisemartin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.