diff mbox series

[ovs-dev,01/16] tests: Drop support for glibc before version 2.11.

Message ID 20201030002447.936548-1-blp@ovn.org
State Accepted
Headers show
Series [ovs-dev,01/16] tests: Drop support for glibc before version 2.11. | expand

Commit Message

Ben Pfaff Oct. 30, 2020, 12:24 a.m. UTC
The "ldd" call here didn't work if libtool was involved and would print
an error message.  We could fix that, but the check is only needed for
glibc earlier than 2.11.  glibc 2.11 was released in 2009, so it should
be safe to expect that testers are running it or a newer version.

Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 tests/atlocal.in | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

Comments

Numan Siddique Nov. 2, 2020, 7:29 a.m. UTC | #1
On Fri, Oct 30, 2020 at 5:55 AM Ben Pfaff <blp@ovn.org> wrote:
>
> The "ldd" call here didn't work if libtool was involved and would print
> an error message.  We could fix that, but the check is only needed for
> glibc earlier than 2.11.  glibc 2.11 was released in 2009, so it should
> be safe to expect that testers are running it or a newer version.
>
> Signed-off-by: Ben Pfaff <blp@ovn.org>

Hi Ben,

Thanks for this series which improves and fixes a lot of test code in OVN.

For the entire series:
Acked-by: Numan Siddique <numans@ovn.org>

Thanks
Numan

> ---
>  tests/atlocal.in | 18 +-----------------
>  1 file changed, 1 insertion(+), 17 deletions(-)
>
> diff --git a/tests/atlocal.in b/tests/atlocal.in
> index 26681f02d851..4517ebf72fab 100644
> --- a/tests/atlocal.in
> +++ b/tests/atlocal.in
> @@ -46,23 +46,7 @@ esac
>  case `uname` in
>  Linux)
>      MALLOC_PERTURB_=165; export MALLOC_PERTURB_
> -
> -    # Before glibc 2.11, the feature enabled by MALLOC_CHECK_ was not
> -    # thread-safe.  See https://bugzilla.redhat.com/show_bug.cgi?id=585674 and
> -    # in particular the patch attached there, which was applied to glibc CVS as
> -    # "Restore locking in free_check." between 1.11 and 1.11.1.
> -    binary=$abs_top_builddir/controller/ovn-controller
> -    glibc=`ldd $binary | sed -n 's/^   libc\.[^ ]* => \([^ ]*\) .*/\1/p'`
> -    glibc_version=`$glibc | sed -n '1s/.*version \([0-9]\{1,\}\.[0-9]\{1,\}\).*/\1/p'`
> -    case $glibc_version in
> -        2.[0-9] | 2.1[01]) mcheck=disabled ;;
> -        *) mcheck=enabled ;;
> -    esac
> -    if test $mcheck = enabled; then
> -        MALLOC_CHECK_=2; export MALLOC_CHECK_
> -    else
> -        echo >&2 "glibc $glibc_version detected, disabling memory checking"
> -    fi
> +    MALLOC_CHECK_=2; export MALLOC_CHECK_
>      ;;
>  FreeBSD)
>      case `uname -r` in
> --
> 2.26.2
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
Ben Pfaff Nov. 2, 2020, 10:02 p.m. UTC | #2
On Mon, Nov 02, 2020 at 12:59:18PM +0530, Numan Siddique wrote:
> On Fri, Oct 30, 2020 at 5:55 AM Ben Pfaff <blp@ovn.org> wrote:
> >
> > The "ldd" call here didn't work if libtool was involved and would print
> > an error message.  We could fix that, but the check is only needed for
> > glibc earlier than 2.11.  glibc 2.11 was released in 2009, so it should
> > be safe to expect that testers are running it or a newer version.
> >
> > Signed-off-by: Ben Pfaff <blp@ovn.org>
> 
> Hi Ben,
> 
> Thanks for this series which improves and fixes a lot of test code in OVN.
> 
> For the entire series:
> Acked-by: Numan Siddique <numans@ovn.org>

Thanks a lot!  I applied this to ovn master.
diff mbox series

Patch

diff --git a/tests/atlocal.in b/tests/atlocal.in
index 26681f02d851..4517ebf72fab 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -46,23 +46,7 @@  esac
 case `uname` in
 Linux)
     MALLOC_PERTURB_=165; export MALLOC_PERTURB_
-
-    # Before glibc 2.11, the feature enabled by MALLOC_CHECK_ was not
-    # thread-safe.  See https://bugzilla.redhat.com/show_bug.cgi?id=585674 and
-    # in particular the patch attached there, which was applied to glibc CVS as
-    # "Restore locking in free_check." between 1.11 and 1.11.1.
-    binary=$abs_top_builddir/controller/ovn-controller
-    glibc=`ldd $binary | sed -n 's/^   libc\.[^ ]* => \([^ ]*\) .*/\1/p'`
-    glibc_version=`$glibc | sed -n '1s/.*version \([0-9]\{1,\}\.[0-9]\{1,\}\).*/\1/p'`
-    case $glibc_version in
-        2.[0-9] | 2.1[01]) mcheck=disabled ;;
-        *) mcheck=enabled ;;
-    esac
-    if test $mcheck = enabled; then
-        MALLOC_CHECK_=2; export MALLOC_CHECK_
-    else
-        echo >&2 "glibc $glibc_version detected, disabling memory checking"
-    fi
+    MALLOC_CHECK_=2; export MALLOC_CHECK_
     ;;
 FreeBSD)
     case `uname -r` in