Skip to content

Commit

Permalink
test: ensure that the pre-release banner does not interfere with testing
Browse files Browse the repository at this point in the history
The pre-release version of DTrace v2 outputs a banner message to inform
the user of the pre-release status of this tool.  Tests that verify
output were reporting failure because of the unexpected extra string
in the output.

This commit filters out the pre-release banner before any output
processing takes place.

Orabug: 30619056
Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
  • Loading branch information
kvanhees committed Jun 23, 2021
1 parent 7170888 commit 34589d0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions runtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# and generated intermediate representation.
#
# Oracle Linux DTrace.
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.

Expand Down Expand Up @@ -465,7 +465,8 @@ postprocess()
local final=$3
local retval=0

cp -f $output $tmpdir/pp.out
grep -v "^DTrace [^\[]* \[Pre-Release with limited functionality\]$" $output > $tmpdir/pp.out
cp -f $tmpdir/pp.out $output

# Postprocess the output, if need be.
if [[ -x $postprocessor ]]; then
Expand Down Expand Up @@ -583,7 +584,9 @@ for dt in $dtrace; do
fi

# Write out a list of loaded providers.
DTRACE_DEBUG= $dt -l | tail -n +2 | awk '{print $2;}' | sort -u > $tmpdir/providers
DTRACE_DEBUG= $dt -l | \
grep -v "^DTrace [^\[]* \[Pre-Release with limited functionality\]$" | \
tail -n +2 | awk '{print $2;}' | sort -u > $tmpdir/providers

unset LD_LIBRARY_PATH
break
Expand Down

0 comments on commit 34589d0

Please sign in to comment.