All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2 rdma-core 0/5] ABI consistency check
@ 2017-11-16 17:35 Nicolas Morey-Chaisemartin
       [not found] ` <551ccda1-bb8d-45bf-1c7c-22a82fc64efc-IBi9RG/b67k@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2017-11-16 17:35 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Add scripts to generate an ABI dump and compare against a ref.
Travis will automatically do that if a ref is present.
Ref should be added at stable-* branch creation (see doc update)


Changes since v1:
- Import tools as submodules instead of sources.
  Less clutter and no licensing issue.
- Only run gen-abi in travis-checkbuild IF the reference ABI is present (avoid useless ABI builds on the master branch)

Nicolas Morey-Chaisemartin (5):
buidlib: import abi checking tools
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

.gitmodules | 6 ++++++
Documentation/stable.md | 19 ++++++++++++++++++-
buildlib/abi-compliance-checker | 1 +
buildlib/abi-dumper | 1 +
buildlib/gen-abi | 21 +++++++++++++++++++++
buildlib/travis-build | 4 ++++
buildlib/travis-checkabi | 29 +++++++++++++++++++++++++++++
7 files changed, 80 insertions(+), 1 deletion(-)
create mode 100644 .gitmodules
create mode 160000 buildlib/abi-compliance-checker
create mode 160000 buildlib/abi-dumper
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] 6+ messages in thread

* [PATCHv2 rdma-core 1/5] buidlib: import abi checking tools
       [not found] ` <551ccda1-bb8d-45bf-1c7c-22a82fc64efc-IBi9RG/b67k@public.gmane.org>
@ 2017-11-16 17:37   ` Nicolas Morey-Chaisemartin
  2017-11-16 17:37   ` [PATCHv2 rdma-core 2/5] buildlib: add script to dump ABI Nicolas Morey-Chaisemartin
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2017-11-16 17:37 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Add submodules for abi-dumper  v1.1 and abi-compliance-checker v2.2

Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin-IBi9RG/b67k@public.gmane.org>
---
 .gitmodules                     | 6 ++++++
 buildlib/abi-compliance-checker | 1 +
 buildlib/abi-dumper             | 1 +
 3 files changed, 8 insertions(+)
 create mode 100644 .gitmodules
 create mode 160000 buildlib/abi-compliance-checker
 create mode 160000 buildlib/abi-dumper

diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 00000000..b195afc3
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,6 @@
+[submodule "buildlib/abi-dumper"]
+	path = buildlib/abi-dumper
+	url = https://github.com/lvc/abi-dumper.git
+[submodule "buildlib/abi-compliance-checker"]
+	path = buildlib/abi-compliance-checker
+	url = https://github.com/lvc/abi-compliance-checker.git
diff --git a/buildlib/abi-compliance-checker b/buildlib/abi-compliance-checker
new file mode 160000
index 00000000..e3db9ec3
--- /dev/null
+++ b/buildlib/abi-compliance-checker
@@ -0,0 +1 @@
+Subproject commit e3db9ec34127d0a4f109cc4923e191b0822a0e51
diff --git a/buildlib/abi-dumper b/buildlib/abi-dumper
new file mode 160000
index 00000000..000c4cf9
--- /dev/null
+++ b/buildlib/abi-dumper
@@ -0,0 +1 @@
+Subproject commit 000c4cf9d20f4f671c4099bcba8ebe3052fe3e1a
-- 
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] 6+ messages in thread

* [PATCHv2 rdma-core 2/5] buildlib: add script to dump ABI
       [not found] ` <551ccda1-bb8d-45bf-1c7c-22a82fc64efc-IBi9RG/b67k@public.gmane.org>
  2017-11-16 17:37   ` [PATCHv2 rdma-core 1/5] buidlib: import abi checking tools Nicolas Morey-Chaisemartin
@ 2017-11-16 17:37   ` Nicolas Morey-Chaisemartin
  2017-11-16 17:37   ` [PATCHv2 rdma-core 3/5] buildlib: add script to check ABI Nicolas Morey-Chaisemartin
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2017-11-16 17:37 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 | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100755 buildlib/gen-abi

diff --git a/buildlib/gen-abi b/buildlib/gen-abi
new file mode 100755
index 00000000..f551aa96
--- /dev/null
+++ b/buildlib/gen-abi
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+# Stop on error
+set -e
+# Echo all commands to Travis log
+set -x
+
+# Force submodule checkout of the needed tools
+git submodule update --init --force
+
+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-dumper/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] 6+ messages in thread

* [PATCHv2 rdma-core 3/5] buildlib: add script to check ABI
       [not found] ` <551ccda1-bb8d-45bf-1c7c-22a82fc64efc-IBi9RG/b67k@public.gmane.org>
  2017-11-16 17:37   ` [PATCHv2 rdma-core 1/5] buidlib: import abi checking tools Nicolas Morey-Chaisemartin
  2017-11-16 17:37   ` [PATCHv2 rdma-core 2/5] buildlib: add script to dump ABI Nicolas Morey-Chaisemartin
@ 2017-11-16 17:37   ` Nicolas Morey-Chaisemartin
  2017-11-16 17:37   ` [PATCHv2 rdma-core 4/5] buildlib: run ABI check in travis-build Nicolas Morey-Chaisemartin
  2017-11-16 17:37   ` [PATCHv2 rdma-core 5/5] Documentation: update stable doc about ABI reference generation Nicolas Morey-Chaisemartin
  4 siblings, 0 replies; 6+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2017-11-16 17:37 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 | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100755 buildlib/travis-checkabi

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

* [PATCHv2 rdma-core 4/5] buildlib: run ABI check in travis-build
       [not found] ` <551ccda1-bb8d-45bf-1c7c-22a82fc64efc-IBi9RG/b67k@public.gmane.org>
                     ` (2 preceding siblings ...)
  2017-11-16 17:37   ` [PATCHv2 rdma-core 3/5] buildlib: add script to check ABI Nicolas Morey-Chaisemartin
@ 2017-11-16 17:37   ` Nicolas Morey-Chaisemartin
  2017-11-16 17:37   ` [PATCHv2 rdma-core 5/5] Documentation: update stable doc about ABI reference generation Nicolas Morey-Chaisemartin
  4 siblings, 0 replies; 6+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2017-11-16 17:37 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] 6+ messages in thread

* [PATCHv2 rdma-core 5/5] Documentation: update stable doc about ABI reference generation
       [not found] ` <551ccda1-bb8d-45bf-1c7c-22a82fc64efc-IBi9RG/b67k@public.gmane.org>
                     ` (3 preceding siblings ...)
  2017-11-16 17:37   ` [PATCHv2 rdma-core 4/5] buildlib: run ABI check in travis-build Nicolas Morey-Chaisemartin
@ 2017-11-16 17:37   ` Nicolas Morey-Chaisemartin
  4 siblings, 0 replies; 6+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2017-11-16 17:37 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

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

diff --git a/Documentation/stable.md b/Documentation/stable.md
index d7ea9822..d3eb90f5 100644
--- a/Documentation/stable.md
+++ b/Documentation/stable.md
@@ -56,10 +56,27 @@ You must note the upstream commit ID in the changelog of your submission,
 
 Option 1 is strongly preferred, is the easiest and most common.
 Option 2 and Option 3 are more useful if the patch isn’t deemed worthy at the time it is applied to a public git tree (for instance, because it deserves more regression testing first).
-Option 3 is especially useful if the patch needs some special handling to apply to an older version.
+Option 3 is especially usefu if the patch needs some special handling to apply to an older version.
 
 Note that for Option 3, if the patch deviates from the original upstream patch (for example because it had to be backported) this must be very clearly documented and justified in the patch description.
 
 ## 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 committed 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] 6+ messages in thread

end of thread, other threads:[~2017-11-16 17:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-16 17:35 [PATCHv2 rdma-core 0/5] ABI consistency check Nicolas Morey-Chaisemartin
     [not found] ` <551ccda1-bb8d-45bf-1c7c-22a82fc64efc-IBi9RG/b67k@public.gmane.org>
2017-11-16 17:37   ` [PATCHv2 rdma-core 1/5] buidlib: import abi checking tools Nicolas Morey-Chaisemartin
2017-11-16 17:37   ` [PATCHv2 rdma-core 2/5] buildlib: add script to dump ABI Nicolas Morey-Chaisemartin
2017-11-16 17:37   ` [PATCHv2 rdma-core 3/5] buildlib: add script to check ABI Nicolas Morey-Chaisemartin
2017-11-16 17:37   ` [PATCHv2 rdma-core 4/5] buildlib: run ABI check in travis-build Nicolas Morey-Chaisemartin
2017-11-16 17:37   ` [PATCHv2 rdma-core 5/5] Documentation: update stable doc about ABI reference generation 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.