diff mbox series

[ovs-dev] tests: Strip "lt-" prefix when checking daemon process names.

Message ID 20181216162725.2722-1-blp@ovn.org
State Accepted
Headers show
Series [ovs-dev] tests: Strip "lt-" prefix when checking daemon process names. | expand

Commit Message

Ben Pfaff Dec. 16, 2018, 4:27 p.m. UTC
When libtool is in the picture to deal with shared libraries, processes
end up with an "lt-" prefix in their process names.  This caused the
process name check in daemon.at to fail.  This commit fixes the problem by
stripping off that prefix.

Fixes: d8c6955a03ea ("tests: Simplify and improve the daemon tests.")
Reported-by: Timothy Redaelli <tredaelli@redhat.com>
Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2018-December/354574.html
Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 tests/daemon.at | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Timothy Redaelli Dec. 16, 2018, 4:42 p.m. UTC | #1
On Sun, 16 Dec 2018 08:27:25 -0800
Ben Pfaff <blp@ovn.org> wrote:

> When libtool is in the picture to deal with shared libraries, processes
> end up with an "lt-" prefix in their process names.  This caused the
> process name check in daemon.at to fail.  This commit fixes the problem by
> stripping off that prefix.
> 
> Fixes: d8c6955a03ea ("tests: Simplify and improve the daemon tests.")
> Reported-by: Timothy Redaelli <tredaelli@redhat.com>
> Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2018-December/354574.html
> Signed-off-by: Ben Pfaff <blp@ovn.org>
> ---
>  tests/daemon.at | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

1 test was successful.

Acked-By: Timothy Redaelli <tredaelli@redhat.com>
Tested-By: Timothy Redaelli <tredaelli@redhat.com>
Ben Pfaff Dec. 16, 2018, 4:59 p.m. UTC | #2
On Sun, Dec 16, 2018 at 05:42:58PM +0100, Timothy Redaelli wrote:
> On Sun, 16 Dec 2018 08:27:25 -0800
> Ben Pfaff <blp@ovn.org> wrote:
> 
> > When libtool is in the picture to deal with shared libraries, processes
> > end up with an "lt-" prefix in their process names.  This caused the
> > process name check in daemon.at to fail.  This commit fixes the problem by
> > stripping off that prefix.
> > 
> > Fixes: d8c6955a03ea ("tests: Simplify and improve the daemon tests.")
> > Reported-by: Timothy Redaelli <tredaelli@redhat.com>
> > Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2018-December/354574.html
> > Signed-off-by: Ben Pfaff <blp@ovn.org>
> > ---
> >  tests/daemon.at | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> 1 test was successful.
> 
> Acked-By: Timothy Redaelli <tredaelli@redhat.com>
> Tested-By: Timothy Redaelli <tredaelli@redhat.com>

Thanks, applied to master.
diff mbox series

Patch

diff --git a/tests/daemon.at b/tests/daemon.at
index 6382d856bd95..bdc8910f90da 100644
--- a/tests/daemon.at
+++ b/tests/daemon.at
@@ -7,7 +7,9 @@  OVS_START_SHELL_HELPERS
 # (On other systems, don't bother.)
 if test -e /proc/$$/comm; then
     check_process_name() {
-        AT_CHECK_UNQUOTED([cat /proc/$1/comm], [0], [$2
+        # In case we're building with shared libraries enabled, strip
+        # off libtool's lt- prefix.
+        AT_CHECK_UNQUOTED([sed 's/lt-//' /proc/$1/comm], [0], [$2
 ])
     }
 else