relative path support for ABI compatibility check
cover relative path support for ABI compatibility check
Add relative path support for ABI compatibility check and do some code simplification work.
Phil Yang (2):
devtools: add relative path support for ABI compatibility check
devtools: use absolute path for the build directory
devtools/test-meson-builds.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/2 devtools: add relative path support for ABI compatibility check
From: Phil Yang <[email protected]>
Because dpdk guide does not limit the relative path for ABI compatibility check, users maybe set 'DPDK_ABI_REF_DIR' as a relative path:
~/dpdk/devtools$ DPDK_ABI_REF_VERSION=v19.11 DPDK_ABI_REF_DIR=build-gcc-shared ./test-meson-builds.sh
And if the DESTDIR is not an absolute path, ninja complains:
+ install_target build-gcc-shared/v19.11/build build-gcc-shared/v19.11/build-gcc-shared
+ rm -rf build-gcc-shared/v19.11/build-gcc-shared
+ echo 'DESTDIR=build-gcc-shared/v19.11/build-gcc-shared ninja -C build-gcc-shared/v19.11/build install'
+ DESTDIR=build-gcc-shared/v19.11/build-gcc-shared
+ ninja -C build-gcc-shared/v19.11/build install
...
ValueError: dst_dir must be absolute, got build-gcc-shared/v19.11/build-gcc-shared/usr/local/share/dpdk/ examples/bbdev_app
...
Error: install directory 'build-gcc-shared/v19.11/build-gcc-shared' does not exist.
To fix this, add relative path support using 'readlink -f'.
--- devtools/test-meson-builds.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
devtools/test-meson-builds.sh +2 -1
@@ -168,7 +168,8 @@ build () # <directory> <target cc | cross file> <ABI check> [meson options] config $srcdir $builds_dir/$targetdir $cross --werror $* compile $builds_dir/$targetdir if [ -n "$DPDK_ABI_REF_VERSION" -a "$abicheck" = ABI ] ; then - abirefdir=${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION + abirefdir=$(readlink -f \ + ${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION) if [ ! -d $abirefdir/$targetdir ]; then # clone current sources if [ ! -d $abirefdir/src ]; then
Signature · 1 line
2.25.1
[dpdk-dev] 回复: [PATCH v1 1/2] devtools: add relative path support for ABI compatibility check
Hi, Bruce
Would you please help review this patch series?
Thanks.
Best Regards
Feifei
Quoted 64 lines
-----邮件原件-----
发件人: Feifei Wang <[email protected]>
发送时间: 2021年6月1日 9:57
收件人: Bruce Richardson <[email protected]>
抄送: [email protected]; nd <[email protected]>; Phil Yang <[email protected]>; Feifei Wang <[email protected]>; Juraj Linkeš <[email protected]>; Ruifeng Wang <[email protected]> 主题: [PATCH v1 1/2] devtools: add relative path support for ABI compatibility checkFrom: Phil Yang <[email protected]>
Because dpdk guide does not limit the relative path for ABI compatibility check, users maybe set '
DPDK_ABI_REF_DIR' as a relative
path:~/dpdk/devtools$ DPDK_ABI_REF_VERSION=v19.11 DPDK_ABI_REF_DIR=build-gcc-shared ./test-meson-builds.sh
And if the DESTDIR is not an absolute path, ninja complains:
+install_targetbuild-gcc-shared/v19.11/build
+ build-gcc-shared/v19.11/build-gcc-shared
+ rm -rf build-gcc-shared/v19.11/build-gcc-shared
+ echo 'DESTDIR=build-gcc-shared/v19.11/build-gcc-shared ninja -C build-gcc- shared/v19.11/build install'
+ DESTDIR=build-gcc-shared/v19.11/build-gcc-shared
+ ninja -C build-gcc-shared/v19.11/build install
...
ValueError:dst_dirmust be absolute, got build-gcc-shared/v19.11/build-gcc- shared/usr/local/share/dpdk/
examples/bbdev_app
...
Error: install directory 'build-gcc-shared/v19.11/build-gcc-shared' does not exist.To fix this, add relative path support using 'readlink -f'.
Signed-off-by Phil Yang <[email protected]>Signed-off-by Feifei Wang <[email protected]>Reviewed-by Juraj Linkeš <[email protected]>Reviewed-by Ruifeng Wang <[email protected]>--- devtools/test-meson-builds.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)devtools/test-meson-builds.sh +0
-0@@ -168,7 +168,8 @@ build () # <directory> <target cc | cross file> <ABIcheck> [meson options]
devtools/test-meson-builds.sh +0
-1config $srcdir $builds_dir/$targetdir $cross --werror $* compile $builds_dir/$targetdir if [ -n "$DPDK_ABI_REF_VERSION" -a "$abicheck" = ABI ] ; then - abirefdir=${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION
devtools/test-meson-builds.sh +2
-0+ abirefdir=$(readlink -f \ + ${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION)
devtools/test-meson-builds.sh +0
-1if [ ! -d $abirefdir/$targetdir ]; then # clone current sources if [ ! -d $abirefdir/src ]; then --2.25.1
Re: [dpdk-dev] [PATCH v1 1/2] devtools: add relative path support for ABI compatibility check
In reply to Feifei WangQuoted 36 lines · Feifei Wang
From: Phil Yang <[email protected]>
Because dpdk guide does not limit the relative path for ABI compatibility check, users maybe set '
DPDK_ABI_REF_DIR' as a relative path:~/dpdk/devtools$ DPDK_ABI_REF_VERSION=v19.11 DPDK_ABI_REF_DIR=build-gcc-shared ./test-meson-builds.sh
And if the DESTDIR is not an absolute path, ninja complains:
+install_targetbuild-gcc-shared/v19.11/build build-gcc-shared/v19.11/build-gcc-shared
+ rm -rf build-gcc-shared/v19.11/build-gcc-shared
+ echo 'DESTDIR=build-gcc-shared/v19.11/build-gcc-shared ninja -C build-gcc-shared/v19.11/build install'
+ DESTDIR=build-gcc-shared/v19.11/build-gcc-shared
+ ninja -C build-gcc-shared/v19.11/build install
...
ValueError:dst_dirmust be absolute, got build-gcc-shared/v19.11/build-gcc-shared/usr/local/share/dpdk/ examples/bbdev_app
...
Error: install directory 'build-gcc-shared/v19.11/build-gcc-shared' does not exist.To fix this, add relative path support using 'readlink -f'.
Signed-off-by Phil Yang <[email protected]>Signed-off-by Feifei Wang <[email protected]>Reviewed-by Juraj Linkeš <[email protected]>Reviewed-by Ruifeng Wang <[email protected]>--- devtools/test-meson-builds.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)devtools/test-meson-builds.sh +0
-0
devtools/test-meson-builds.sh build () # <directory> <target cc | cross file> <ABI check> [meson options] · line 175
Quoted 9 lines
devtools/test-meson-builds.sh +2
-1@@ -168,7 +168,8 @@ build () # <directory> <target cc | cross file> <ABI check> [meson options] config $srcdir $builds_dir/$targetdir $cross --werror $* compile $builds_dir/$targetdir if [ -n "$DPDK_ABI_REF_VERSION" -a "$abicheck" = ABI ] ; then - abirefdir=${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION + abirefdir=$(readlink -f \ + ${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION) if [ ! -d $abirefdir/$targetdir ]; then # clone current sources if [ ! -d $abirefdir/src ]; then
This looks a simple enough change.
PATCH 2/2 devtools: use absolute path for the build directory
In reply to Feifei WangFrom: Phil Yang <[email protected]>
To make the code easier to maintain, use the absolute path for the default build_dir to avoid repeatedly calling of readlink.
--- devtools/test-meson-builds.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
devtools/test-meson-builds.sh +7 -7
@@ -16,7 +16,7 @@ srcdir=$(dirname $(readlink -f $0))/.. MESON=${MESON:-meson} use_shared="--default-library=shared" -builds_dir=${DPDK_BUILD_TEST_DIR:-.} +builds_dir=$(readlink -f ${DPDK_BUILD_TEST_DIR:-.}) if command -v gmake >/dev/null 2>&1 ; then MAKE=gmake
@@ -193,16 +193,16 @@ build () # <directory> <target cc | cross file> <ABI check> [meson options] fi install_target $builds_dir/$targetdir \ - $(readlink -f $builds_dir/$targetdir/install) + $builds_dir/$targetdir/install echo "Checking ABI compatibility of $targetdir" >&$verbose echo $srcdir/devtools/gen-abi.sh \ - $(readlink -f $builds_dir/$targetdir/install) >&$veryverbose + $builds_dir/$targetdir/install >&$veryverbose $srcdir/devtools/gen-abi.sh \ - $(readlink -f $builds_dir/$targetdir/install) >&$veryverbose + $builds_dir/$targetdir/install >&$veryverbose echo $srcdir/devtools/check-abi.sh $abirefdir/$targetdir \ - $(readlink -f $builds_dir/$targetdir/install) >&$veryverbose + $builds_dir/$targetdir/install >&$veryverbose $srcdir/devtools/check-abi.sh $abirefdir/$targetdir \ - $(readlink -f $builds_dir/$targetdir/install) >&$verbose + $builds_dir/$targetdir/install >&$verbose fi }
@@ -275,7 +275,7 @@ done # Test installation of the x86-generic target, to be used for checking # the sample apps build using the pkg-config file for cflags and libs load_env cc -build_path=$(readlink -f $builds_dir/build-x86-generic) +build_path=$builds_dir/build-x86-generic export DESTDIR=$build_path/install install_target $build_path $DESTDIR pc_file=$(find $DESTDIR -name libdpdk.pc)
Signature · 1 line
2.25.1
[dpdk-dev] 回复: [PATCH v1 2/2] devtools: use absolute path for the build directory
Hi, Bruce
Sorry to disturb you again. Would you please help review the second patch of this series? Thanks very much.
Best Regards
Feifei
Quoted 73 lines
-----邮件原件-----
发件人: Feifei Wang <[email protected]>
发送时间: Tuesday, June 1, 2021 9:57 AM
收件人: Bruce Richardson <[email protected]>
抄送: [email protected]; nd <[email protected]>; Phil Yang <[email protected]>; Juraj Linkeš <[email protected]>; Feifei Wang <[email protected]>; Ruifeng Wang <[email protected]> 主题: [PATCH v1 2/2] devtools: use absolute path for the build directoryFrom: Phil Yang <[email protected]>
To make the code easier to maintain, use the absolute path for the default
build_dirto avoid repeatedly calling of readlink.Suggested-by Juraj Linkeš <[email protected]>Signed-off-by Phil Yang <[email protected]>Signed-off-by Feifei Wang <[email protected]>Reviewed-by Juraj Linkeš <[email protected]>Reviewed-by Ruifeng Wang <[email protected]>--- devtools/test-meson-builds.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)devtools/test-meson-builds.sh +1
-1@@ -16,7 +16,7 @@ srcdir=$(dirname $(readlink -f $0))/.. MESON=${MESON:-meson} use_shared="--default-library=shared" -builds_dir=${DPDK_BUILD_TEST_DIR:-.} +builds_dir=$(readlink -f ${DPDK_BUILD_TEST_DIR:-.}) if command -v gmake >/dev/null 2>&1 ; then MAKE=gmake@@ -193,16 +193,16 @@ build () # <directory> <target cc | cross file> <ABIcheck> [meson options]
devtools/test-meson-builds.sh +1
-2fi install_target $builds_dir/$targetdir \ - $(readlink -f $builds_dir/$targetdir/install) + $builds_dir/$targetdir/install echo "Checking ABI compatibility of $targetdir" >&$verbose echo $srcdir/devtools/gen-abi.sh \ - $(readlink -f$builds_dir/$targetdir/install) >&$veryverbose
devtools/test-meson-builds.sh +1
-1+ $builds_dir/$targetdir/install >&$veryverbose $srcdir/devtools/gen-abi.sh \ - $(readlink -f$builds_dir/$targetdir/install) >&$veryverbose
devtools/test-meson-builds.sh +1
-1+ $builds_dir/$targetdir/install >&$veryverbose echo $srcdir/devtools/check-abi.sh $abirefdir/$targetdir \ - $(readlink -f$builds_dir/$targetdir/install) >&$veryverbose
devtools/test-meson-builds.sh +1
-1+ $builds_dir/$targetdir/install >&$veryverbose $srcdir/devtools/check-abi.sh $abirefdir/$targetdir \ - $(readlink -f$builds_dir/$targetdir/install) >&$verbose
devtools/test-meson-builds.sh +1
-0+ $builds_dir/$targetdir/install >&$verbose fi }@@ -275,7 +275,7 @@ done # Test installation of the x86-generic target, to be used for checking # thesample apps build using the pkg-config file for cflags and libs
load_envcc - build_path=$(readlink -f $builds_dir/build-x86-generic) +build_path=$builds_dir/build-x86-generic
export DESTDIR=$build_path/install
install_target$build_path $DESTDIR
pc_file=$(find $DESTDIR -name libdpdk.pc)
--
2.25.1
Re: [dpdk-dev] [PATCH v1 2/2] devtools: use absolute path for the build directory
In reply to Feifei Wang01/06/2021 03:56, Feifei Wang:
Quoted 4 lines
From: Phil Yang <[email protected]>
To make the code easier to maintain, use the absolute path for the default
build_dirto avoid repeatedly calling of readlink.
[...]
devtools/test-meson-builds.sh srcdir=$(dirname $(readlink -f $0))/.. · line 19
Quoted 4 lines
devtools/test-meson-builds.sh +1
-1-builds_dir=${DPDK_BUILD_TEST_DIR:-.} +builds_dir=$(readlink -f ${DPDK_BUILD_TEST_DIR:-.})
It means that all uses of builds_dir will get the absolute path. It may have consequences on meson configuration,
and will make outputs and logs longer.
I'm not sure this change is desirable.
[dpdk-dev] 回复: [PATCH v1 2/2] devtools: use absolute path for the build directory
Hi, Thomas
Thanks for your reviewing.
I agree with your comment.
As your concern, this patch is simple but may have some negative effects. Thus I will drop it from series in the next version.
Best Regards
Feifei
Quoted 28 lines
-----邮件原件-----
发件人: Thomas Monjalon <[email protected]>
发送时间: Friday, August 6, 2021 11:43 PM
收件人: Phil Yang <[email protected]>; Feifei Wang <[email protected]>
抄送: Bruce Richardson <[email protected]>; [email protected]; nd <[email protected]>; Juraj Linkeš <[email protected]>; Ruifeng Wang <[email protected]>; [email protected]
主题: Re: [dpdk-dev] [PATCH v1 2/2] devtools: use absolute path for the build directory01/06/2021 03:56, Feifei Wang:
Quoted 4 lines
From: Phil Yang <[email protected]>
To make the code easier to maintain, use the absolute path for the default
build_dirto avoid repeatedly calling of readlink.[...]
devtools/test-meson-builds.sh srcdir=$(dirname $(readlink -f $0))/.. · line 19
Quoted 4 lines
devtools/test-meson-builds.sh +1
-1-builds_dir=${DPDK_BUILD_TEST_DIR:-.} +builds_dir=$(readlink -f ${DPDK_BUILD_TEST_DIR:-.})It means that all uses of
builds_dirwill get the absolute path. It may have consequences on meson configuration, and will make outputs and logs longer.I'm not sure this change is desirable.
v2 cover relative path support for ABI compatibility check
In reply to Feifei WangAdd relative path support for ABI compatibility check.
v2:
1. delete the code simplification patch due to negative effects (Thomas)
Phil Yang (1):
devtools: add relative path support for ABI compatibility check
devtools/test-meson-builds.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.25.1
PATCH v2 1/1 devtools: add relative path support for ABI compatibility check
From: Phil Yang <[email protected]>
Because dpdk guide does not limit the relative path for ABI compatibility check, users maybe set 'DPDK_ABI_REF_DIR' as a relative path:
~/dpdk/devtools$ DPDK_ABI_REF_VERSION=v19.11 DPDK_ABI_REF_DIR=build-gcc-shared ./test-meson-builds.sh
And if the DESTDIR is not an absolute path, ninja complains:
+ install_target build-gcc-shared/v19.11/build build-gcc-shared/v19.11/build-gcc-shared
+ rm -rf build-gcc-shared/v19.11/build-gcc-shared
+ echo 'DESTDIR=build-gcc-shared/v19.11/build-gcc-shared ninja -C build-gcc-shared/v19.11/build install'
+ DESTDIR=build-gcc-shared/v19.11/build-gcc-shared
+ ninja -C build-gcc-shared/v19.11/build install
...
ValueError: dst_dir must be absolute, got build-gcc-shared/v19.11/build-gcc-shared/usr/local/share/dpdk/ examples/bbdev_app
...
Error: install directory 'build-gcc-shared/v19.11/build-gcc-shared' does not exist.
To fix this, add relative path support using 'readlink -f'.
--- devtools/test-meson-builds.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
devtools/test-meson-builds.sh +2 -1
@@ -168,7 +168,8 @@ build () # <directory> <target cc | cross file> <ABI check> [meson options] config $srcdir $builds_dir/$targetdir $cross --werror $* compile $builds_dir/$targetdir if [ -n "$DPDK_ABI_REF_VERSION" -a "$abicheck" = ABI ] ; then - abirefdir=${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION + abirefdir=$(readlink -f \ + ${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION) if [ ! -d $abirefdir/$targetdir ]; then # clone current sources if [ ! -d $abirefdir/src ]; then
Signature · 1 line
2.25.1
[dpdk-dev] 回复: [PATCH v2 1/1] devtools: add relative path support for ABI compatibility check
Hi,
Sorry to disturb you. Have more comments for this patch or if it can be applied? Thanks very much.
Best Regards
Feifei
Quoted 65 lines
-----邮件原件-----
发件人: Feifei Wang <[email protected]>
发送时间: Wednesday, August 11, 2021 2:17 PM
收件人: Bruce Richardson <[email protected]>
抄送: [email protected]; nd <[email protected]>; Phil Yang <[email protected]>; Feifei Wang <[email protected]>; Juraj Linkeš <[email protected]>; Ruifeng Wang <[email protected]> 主题: [PATCH v2 1/1] devtools: add relative path support for ABI compatibility checkFrom: Phil Yang <[email protected]>
Because dpdk guide does not limit the relative path for ABI compatibility check, users maybe set '
DPDK_ABI_REF_DIR' as a relative
path:~/dpdk/devtools$ DPDK_ABI_REF_VERSION=v19.11 DPDK_ABI_REF_DIR=build-gcc-shared ./test-meson-builds.sh
And if the DESTDIR is not an absolute path, ninja complains:
+install_targetbuild-gcc-shared/v19.11/build
+ build-gcc-shared/v19.11/build-gcc-shared
+ rm -rf build-gcc-shared/v19.11/build-gcc-shared
+ echo 'DESTDIR=build-gcc-shared/v19.11/build-gcc-shared ninja -C build-gcc- shared/v19.11/build install'
+ DESTDIR=build-gcc-shared/v19.11/build-gcc-shared
+ ninja -C build-gcc-shared/v19.11/build install
...
ValueError:dst_dirmust be absolute, got build-gcc-shared/v19.11/build-gcc- shared/usr/local/share/dpdk/
examples/bbdev_app
...
Error: install directory 'build-gcc-shared/v19.11/build-gcc-shared' does not exist.To fix this, add relative path support using 'readlink -f'.
Signed-off-by Phil Yang <[email protected]>Signed-off-by Feifei Wang <[email protected]>Reviewed-by Juraj Linkeš <[email protected]>Reviewed-by Ruifeng Wang <[email protected]>Acked-by Bruce Richardson <[email protected]>--- devtools/test-meson-builds.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)devtools/test-meson-builds.sh +0
-0@@ -168,7 +168,8 @@ build () # <directory> <target cc | cross file> <ABIcheck> [meson options]
devtools/test-meson-builds.sh +0
-1config $srcdir $builds_dir/$targetdir $cross --werror $* compile $builds_dir/$targetdir if [ -n "$DPDK_ABI_REF_VERSION" -a "$abicheck" = ABI ] ; then - abirefdir=${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION
devtools/test-meson-builds.sh +2
-0+ abirefdir=$(readlink -f \ + ${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION)
devtools/test-meson-builds.sh +0
-1if [ ! -d $abirefdir/$targetdir ]; then # clone current sources if [ ! -d $abirefdir/src ]; then --2.25.1