* [PATCH 0/4] Further test cleanups
@ 2025-01-24 2:49 Sam James
2025-01-24 2:49 ` [PATCH 1/4] test: fix 'harness' typo Sam James
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: Sam James @ 2025-01-24 2:49 UTC (permalink / raw)
To: dtrace; +Cc: Sam James
These are the followup test fixes I promised before for https://github.com/oracle/dtrace-utils/issues/75.
The catch is I haven't had a chance to do a full test-run (have done most
though) with them again yet, but I figure I'd better send rather than
keep people waiting.
Sam James (4):
test: fix 'harness' typo
test: fix bashism in tst.bitfield-offset.x
test: finalize porting small awk stragglers to gawk
test: allow overriding CC, OBJCOPY, OBJDUMP, NM, ...
.../locking/tst.DestructionDoubleUnlock.sh | 2 +-
test/internals/headers/tst.header-endianness.sh | 2 +-
test/unittest/aggs/tst.aggmod_full2.sh | 2 +-
test/unittest/arrays/tst.uregsarray-check.sh | 2 +-
test/unittest/bitfields/tst.bitfield-offset.x | 10 +++++-----
test/unittest/builtinvar/tst.errno3.sh | 2 +-
test/unittest/builtinvar/tst.id_ERROR.sh | 2 +-
.../unittest/dtrace-util/tst.ListProbesFuncUSDT.sh | 2 +-
.../dtrace-util/tst.ListProbesModuleUSDT.sh | 2 +-
.../unittest/dtrace-util/tst.ListProbesNameUSDT.sh | 2 +-
.../dtrace-util/tst.ListProbesProviderUSDT.sh | 2 +-
test/unittest/error/tst.clause_scope-regular.r.p | 2 +-
test/unittest/io/check_io_probe_args.sh | 2 +-
test/unittest/io/dump_io_probe_args.d | 2 +-
test/unittest/misc/tst.include.sh | 2 +-
test/unittest/options/tst.ctypes.sh | 6 +++---
test/unittest/options/tst.dtypes.sh | 6 +++---
test/unittest/options/tst.linktype.sh | 4 ++--
test/unittest/options/tst.strip.sh | 4 ++--
test/unittest/pid/tst.offsets.sh | 2 +-
test/unittest/usdt/tst.allargs.sh | 2 +-
test/unittest/usdt/tst.badguess.sh | 2 +-
test/unittest/usdt/tst.dlclose1.sh | 2 +-
test/unittest/usdt/tst.dlclose2.sh | 2 +-
test/unittest/usdt/tst.dlclose3.sh | 2 +-
test/unittest/usdt/tst.eliminate.sh | 6 +++---
test/unittest/usdt/tst.enabled.sh | 2 +-
test/unittest/usdt/tst.enabled2.sh | 2 +-
test/unittest/usdt/tst.entryreturn.sh | 2 +-
test/unittest/usdt/tst.exec-dof-replacement.sh | 2 +-
test/unittest/usdt/tst.execstack.sh | 6 +++---
test/unittest/usdt/tst.fork.sh | 2 +-
test/unittest/usdt/tst.guess32.sh | 2 +-
test/unittest/usdt/tst.guess64.sh | 2 +-
test/unittest/usdt/tst.header.sh | 2 +-
test/unittest/usdt/tst.lingering.sh | 2 +-
test/unittest/usdt/tst.link-idempotence.sh | 2 +-
test/unittest/usdt/tst.linkpriv.sh | 2 +-
test/unittest/usdt/tst.linkunpriv.sh | 2 +-
test/unittest/usdt/tst.manyprobes.sh | 2 +-
test/unittest/usdt/tst.manyprocs.sh | 2 +-
test/unittest/usdt/tst.multiple.sh | 2 +-
test/unittest/usdt/tst.multitrace.sh | 2 +-
test/unittest/usdt/tst.onlyenabled.sh | 2 +-
test/unittest/usdt/tst.pie.sh | 2 +-
test/unittest/usdt/tst.reeval.sh | 2 +-
test/unittest/usdt/tst.static.sh | 2 +-
test/unittest/usdt/tst.static2.sh | 2 +-
test/unittest/usdt/tst.user.sh | 2 +-
test/unittest/variables/bvar/tst.arg3-ERROR-b.sh | 2 +-
test/unittest/variables/bvar/tst.arg3-ERROR.sh | 14 +++++++-------
test/utils/workload_analyze_loop.sh | 2 +-
52 files changed, 72 insertions(+), 72 deletions(-)
--
2.48.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/4] test: fix 'harness' typo
2025-01-24 2:49 [PATCH 0/4] Further test cleanups Sam James
@ 2025-01-24 2:49 ` Sam James
2025-02-25 18:28 ` Eugene Loh
2025-01-24 2:49 ` [PATCH 2/4] test: fix bashism in tst.bitfield-offset.x Sam James
` (2 subsequent siblings)
3 siblings, 1 reply; 12+ messages in thread
From: Sam James @ 2025-01-24 2:49 UTC (permalink / raw)
To: dtrace; +Cc: Sam James
Noticed when grepping for something else.
Signed-off-by: Sam James <sam@gentoo.org>
---
test/unittest/io/check_io_probe_args.sh | 2 +-
test/unittest/io/dump_io_probe_args.d | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/unittest/io/check_io_probe_args.sh b/test/unittest/io/check_io_probe_args.sh
index 50dba6c6..8e1f5a4c 100755
--- a/test/unittest/io/check_io_probe_args.sh
+++ b/test/unittest/io/check_io_probe_args.sh
@@ -6,7 +6,7 @@
# http://oss.oracle.com/licenses/upl.
#
-# @@skip: not used directly by the test hardness; called by other scripts
+# @@skip: not used directly by the test harness; called by other scripts
#
infile=$1
diff --git a/test/unittest/io/dump_io_probe_args.d b/test/unittest/io/dump_io_probe_args.d
index a28b2d61..5b5ba90f 100644
--- a/test/unittest/io/dump_io_probe_args.d
+++ b/test/unittest/io/dump_io_probe_args.d
@@ -4,7 +4,7 @@
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
-/* @@skip: not used directly by the test hardness; called by other scripts */
+/* @@skip: not used directly by the test harness; called by other scripts */
/*
* For all io::: probes, dump "all" probe arguments (and their interesting members).
--
2.48.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/4] test: fix bashism in tst.bitfield-offset.x
2025-01-24 2:49 [PATCH 0/4] Further test cleanups Sam James
2025-01-24 2:49 ` [PATCH 1/4] test: fix 'harness' typo Sam James
@ 2025-01-24 2:49 ` Sam James
2025-02-25 21:29 ` Eugene Loh
2025-01-24 2:49 ` [PATCH 3/4] test: finalize porting small awk stragglers to gawk Sam James
2025-01-24 2:49 ` [PATCH 4/4] test: allow overriding CC, OBJCOPY, OBJDUMP, NM, Sam James
3 siblings, 1 reply; 12+ messages in thread
From: Sam James @ 2025-01-24 2:49 UTC (permalink / raw)
To: dtrace; +Cc: Sam James
trap ERR is a bashism and won't work with e.g. dash, just change
the shebang to #!/bin/bash in this case as ERR is a bit messy to handle
(it'd be trivial here but there's no real reason to not use bash).
Signed-off-by: Sam James <sam@gentoo.org>
---
test/unittest/bitfields/tst.bitfield-offset.x | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/unittest/bitfields/tst.bitfield-offset.x b/test/unittest/bitfields/tst.bitfield-offset.x
index 4397461a..ae57c2b5 100755
--- a/test/unittest/bitfields/tst.bitfield-offset.x
+++ b/test/unittest/bitfields/tst.bitfield-offset.x
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.
#
--
2.48.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/4] test: finalize porting small awk stragglers to gawk
2025-01-24 2:49 [PATCH 0/4] Further test cleanups Sam James
2025-01-24 2:49 ` [PATCH 1/4] test: fix 'harness' typo Sam James
2025-01-24 2:49 ` [PATCH 2/4] test: fix bashism in tst.bitfield-offset.x Sam James
@ 2025-01-24 2:49 ` Sam James
2025-02-25 21:39 ` Eugene Loh
2025-01-24 2:49 ` [PATCH 4/4] test: allow overriding CC, OBJCOPY, OBJDUMP, NM, Sam James
3 siblings, 1 reply; 12+ messages in thread
From: Sam James @ 2025-01-24 2:49 UTC (permalink / raw)
To: dtrace; +Cc: Sam James
We missed some in 8a1264bf0e818c8624be250eb5174714b62ed93c because some
other test changes landed before it landed.
Signed-off-by: Sam James <sam@gentoo.org>
---
test/unittest/builtinvar/tst.id_ERROR.sh | 2 +-
test/unittest/error/tst.clause_scope-regular.r.p | 2 +-
test/unittest/variables/bvar/tst.arg3-ERROR-b.sh | 2 +-
test/unittest/variables/bvar/tst.arg3-ERROR.sh | 14 +++++++-------
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/test/unittest/builtinvar/tst.id_ERROR.sh b/test/unittest/builtinvar/tst.id_ERROR.sh
index 082ebd0c..480d99a3 100755
--- a/test/unittest/builtinvar/tst.id_ERROR.sh
+++ b/test/unittest/builtinvar/tst.id_ERROR.sh
@@ -30,7 +30,7 @@ fi
# Get the ERROR probe ID from "dtrace -l" output.
-id=`$dtrace $dt_flags -ln dtrace:::ERROR |& awk '/^ *[0-9]* *dtrace *ERROR *$/ { print $1 }'`
+id=`$dtrace $dt_flags -ln dtrace:::ERROR |& gawk '/^ *[0-9]* *dtrace *ERROR *$/ { print $1 }'`
# Construct expected output.
diff --git a/test/unittest/error/tst.clause_scope-regular.r.p b/test/unittest/error/tst.clause_scope-regular.r.p
index f7a200c4..bf7e2614 100755
--- a/test/unittest/error/tst.clause_scope-regular.r.p
+++ b/test/unittest/error/tst.clause_scope-regular.r.p
@@ -1,4 +1,4 @@
-#!/usr/bin/awk -f
+#!/usr/bin/gawk -f
# This report has a variable probe ID in it.
{
diff --git a/test/unittest/variables/bvar/tst.arg3-ERROR-b.sh b/test/unittest/variables/bvar/tst.arg3-ERROR-b.sh
index 2f6e51c3..97661b75 100755
--- a/test/unittest/variables/bvar/tst.arg3-ERROR-b.sh
+++ b/test/unittest/variables/bvar/tst.arg3-ERROR-b.sh
@@ -50,7 +50,7 @@ BEGIN
}
EOT
-awk 'BEGIN {
+gawk 'BEGIN {
ok = 0;
}
diff --git a/test/unittest/variables/bvar/tst.arg3-ERROR.sh b/test/unittest/variables/bvar/tst.arg3-ERROR.sh
index 38cb38df..b5460b6c 100755
--- a/test/unittest/variables/bvar/tst.arg3-ERROR.sh
+++ b/test/unittest/variables/bvar/tst.arg3-ERROR.sh
@@ -49,7 +49,7 @@ fi
# Parse the disassembly output for start PCs for the dt_clause_n.
-awk '
+gawk '
BEGIN { phase = 0 }
# Look for disassembly of dtrace:::BEGIN.
@@ -70,7 +70,7 @@ phase == 3 && NF == 0 { exit(0) }
phase == 3 { next }
' disasm.out > dt_clause_start_pcs.txt
if [ $? -ne 0 ]; then
- echo ERROR: awk
+ echo ERROR: gawk
dump_files disasm.out dt_clause_start_pcs.txt
exit 1
fi
@@ -80,7 +80,7 @@ fi
for n in 0 1 2 3 4 5; do
echo dt_clause_$n >> dt_clause_start_pcs.txt.check
done
-if ! awk '{print $2}' dt_clause_start_pcs.txt | diff - dt_clause_start_pcs.txt.check; then
+if ! gawk '{print $2}' dt_clause_start_pcs.txt | diff - dt_clause_start_pcs.txt.check; then
echo ERROR: did not find all expected dt_clause_n
dump_files disasm.out dt_clause_start_pcs.txt
fi
@@ -94,10 +94,10 @@ fi
# dt_probe_error() is the problematic one. We look for those calls.
for n in 1 2 3 4; do
# For dt_clause_$n, find the starting PC.
- pc=`awk '$2 == "dt_clause_'$n'" { print $1 }' dt_clause_start_pcs.txt`
+ pc=`gawk '$2 == "dt_clause_'$n'" { print $1 }' dt_clause_start_pcs.txt`
# Look for the starting PC and then the second dt_probe_error().
- awk '
+ gawk '
BEGIN { phase = 0 }
# Look for disassembly of dtrace:::BEGIN.
@@ -120,7 +120,7 @@ done
# Do a sanity check on DTrace's error output.
-awk '/^dtrace: error in dt_clause_[1-4] for probe ID 1 \(dtrace:::BEGIN): invalid address \(0x40) at BPF pc [0-9]*$/ { print $NF }' \
+gawk '/^dtrace: error in dt_clause_[1-4] for probe ID 1 \(dtrace:::BEGIN): invalid address \(0x40) at BPF pc [0-9]*$/ { print $NF }' \
disasm.out > err_pcs.txt.chk1
if ! diff -q err_pcs.txt err_pcs.txt.chk1; then
echo ERROR: problem with DTrace error output
@@ -130,7 +130,7 @@ fi
# Check the D script output... the arg3 values reported by the dtrace:::ERROR probe.
-if ! awk 'NF != 0 { print strtonum("0x"$NF) }' D.out | diff -q - err_pcs.txt; then
+if ! gawk 'NF != 0 { print strtonum("0x"$NF) }' D.out | diff -q - err_pcs.txt; then
echo ERROR: D script output looks wrong
dump_files D.out err_pcs.txt
exit 1
--
2.48.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 4/4] test: allow overriding CC, OBJCOPY, OBJDUMP, NM, ...
2025-01-24 2:49 [PATCH 0/4] Further test cleanups Sam James
` (2 preceding siblings ...)
2025-01-24 2:49 ` [PATCH 3/4] test: finalize porting small awk stragglers to gawk Sam James
@ 2025-01-24 2:49 ` Sam James
2025-02-25 22:26 ` Eugene Loh
3 siblings, 1 reply; 12+ messages in thread
From: Sam James @ 2025-01-24 2:49 UTC (permalink / raw)
To: dtrace; +Cc: Sam James
Bug: https://github.com/oracle/dtrace-utils/issues/75
Signed-off-by: Sam James <sam@gentoo.org>
---
test/expensive/locking/tst.DestructionDoubleUnlock.sh | 2 +-
| 2 +-
test/unittest/aggs/tst.aggmod_full2.sh | 2 +-
test/unittest/arrays/tst.uregsarray-check.sh | 2 +-
test/unittest/bitfields/tst.bitfield-offset.x | 8 ++++----
test/unittest/builtinvar/tst.errno3.sh | 2 +-
test/unittest/dtrace-util/tst.ListProbesFuncUSDT.sh | 2 +-
test/unittest/dtrace-util/tst.ListProbesModuleUSDT.sh | 2 +-
test/unittest/dtrace-util/tst.ListProbesNameUSDT.sh | 2 +-
test/unittest/dtrace-util/tst.ListProbesProviderUSDT.sh | 2 +-
test/unittest/misc/tst.include.sh | 2 +-
test/unittest/options/tst.ctypes.sh | 6 +++---
test/unittest/options/tst.dtypes.sh | 6 +++---
test/unittest/options/tst.linktype.sh | 4 ++--
test/unittest/options/tst.strip.sh | 4 ++--
test/unittest/pid/tst.offsets.sh | 2 +-
test/unittest/usdt/tst.allargs.sh | 2 +-
test/unittest/usdt/tst.badguess.sh | 2 +-
test/unittest/usdt/tst.dlclose1.sh | 2 +-
test/unittest/usdt/tst.dlclose2.sh | 2 +-
test/unittest/usdt/tst.dlclose3.sh | 2 +-
test/unittest/usdt/tst.eliminate.sh | 6 +++---
test/unittest/usdt/tst.enabled.sh | 2 +-
test/unittest/usdt/tst.enabled2.sh | 2 +-
test/unittest/usdt/tst.entryreturn.sh | 2 +-
test/unittest/usdt/tst.exec-dof-replacement.sh | 2 +-
test/unittest/usdt/tst.execstack.sh | 6 +++---
test/unittest/usdt/tst.fork.sh | 2 +-
test/unittest/usdt/tst.guess32.sh | 2 +-
test/unittest/usdt/tst.guess64.sh | 2 +-
| 2 +-
test/unittest/usdt/tst.lingering.sh | 2 +-
test/unittest/usdt/tst.link-idempotence.sh | 2 +-
test/unittest/usdt/tst.linkpriv.sh | 2 +-
test/unittest/usdt/tst.linkunpriv.sh | 2 +-
test/unittest/usdt/tst.manyprobes.sh | 2 +-
test/unittest/usdt/tst.manyprocs.sh | 2 +-
test/unittest/usdt/tst.multiple.sh | 2 +-
test/unittest/usdt/tst.multitrace.sh | 2 +-
test/unittest/usdt/tst.onlyenabled.sh | 2 +-
test/unittest/usdt/tst.pie.sh | 2 +-
test/unittest/usdt/tst.reeval.sh | 2 +-
test/unittest/usdt/tst.static.sh | 2 +-
test/unittest/usdt/tst.static2.sh | 2 +-
test/unittest/usdt/tst.user.sh | 2 +-
test/utils/workload_analyze_loop.sh | 2 +-
46 files changed, 59 insertions(+), 59 deletions(-)
diff --git a/test/expensive/locking/tst.DestructionDoubleUnlock.sh b/test/expensive/locking/tst.DestructionDoubleUnlock.sh
index c9b9eadc..c0f7156a 100755
--- a/test/expensive/locking/tst.DestructionDoubleUnlock.sh
+++ b/test/expensive/locking/tst.DestructionDoubleUnlock.sh
@@ -28,7 +28,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS=
DIRNAME="$tmpdir/destruction-double-unlock.$$.$RANDOM"
--git a/test/internals/headers/tst.header-endianness.sh b/test/internals/headers/tst.header-endianness.sh
index e45cc597..317ea90c 100755
--- a/test/internals/headers/tst.header-endianness.sh
+++ b/test/internals/headers/tst.header-endianness.sh
@@ -10,7 +10,7 @@
set -e
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
OLDDIRNAME=${PWD}
CFLAGS="-I${OLDDIRNAME}/include -I${OLDDIRNAME}/uts/common"
diff --git a/test/unittest/aggs/tst.aggmod_full2.sh b/test/unittest/aggs/tst.aggmod_full2.sh
index 66cfc002..48988a1a 100755
--- a/test/unittest/aggs/tst.aggmod_full2.sh
+++ b/test/unittest/aggs/tst.aggmod_full2.sh
@@ -17,7 +17,7 @@
##
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS=
DIRNAME="$tmpdir/aggs-aggmod_full2.$$.$RANDOM"
diff --git a/test/unittest/arrays/tst.uregsarray-check.sh b/test/unittest/arrays/tst.uregsarray-check.sh
index f55d36d0..648072b4 100755
--- a/test/unittest/arrays/tst.uregsarray-check.sh
+++ b/test/unittest/arrays/tst.uregsarray-check.sh
@@ -7,7 +7,7 @@
#
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS=
DIRNAME="$tmpdir/arrays-uregsarray-check.$$.$RANDOM"
diff --git a/test/unittest/bitfields/tst.bitfield-offset.x b/test/unittest/bitfields/tst.bitfield-offset.x
index ae57c2b5..b1f21da4 100755
--- a/test/unittest/bitfields/tst.bitfield-offset.x
+++ b/test/unittest/bitfields/tst.bitfield-offset.x
@@ -12,8 +12,8 @@
# skip the test, since we can't possibly tell what it was
# generated by.
-if ! objdump --ctf=.ctf --ctf-parent=shared_ctf /bin/true > /dev/null 2>&1 && \
- LANG=C objdump --ctf=.ctf --ctf-parent=shared_ctf /bin/true 2>&1 | \
+if ! ${OBJDUMP:-objdump} --ctf=.ctf --ctf-parent=shared_ctf /bin/true > /dev/null 2>&1 && \
+ LANG=C ${OBJDUMP:-objdump} --ctf=.ctf --ctf-parent=shared_ctf /bin/true 2>&1 | \
grep 'unrecognized option' > /dev/null 2>&1; then
exit 2
fi
@@ -21,7 +21,7 @@ fi
ctfa=$tmpdir/vmlinux.ctfa
trap "rm -f $ctfa" EXIT ERR
-objcopy --add-section=.ctf=/lib/modules/$(uname -r)/kernel/vmlinux.ctfa /bin/true $ctfa
+${OBJCOPY:-objcopy} --add-section=.ctf=/lib/modules/$(uname -r)/kernel/vmlinux.ctfa /bin/true $ctfa
-objdump --ctf=.ctf --ctf-parent=shared_ctf $ctfa |\
+${OBJDUMP:-objdump} --ctf=.ctf --ctf-parent=shared_ctf $ctfa |\
gawk '/Version: 3/ { exit 1; } /Version: / { exit 0; }'
diff --git a/test/unittest/builtinvar/tst.errno3.sh b/test/unittest/builtinvar/tst.errno3.sh
index 7546152f..5985a0d3 100755
--- a/test/unittest/builtinvar/tst.errno3.sh
+++ b/test/unittest/builtinvar/tst.errno3.sh
@@ -7,7 +7,7 @@
#
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
DIRNAME="$tmpdir/builtinvar-errno3.$$.$RANDOM"
mkdir -p $DIRNAME
diff --git a/test/unittest/dtrace-util/tst.ListProbesFuncUSDT.sh b/test/unittest/dtrace-util/tst.ListProbesFuncUSDT.sh
index f8083f2c..5de50001 100755
--- a/test/unittest/dtrace-util/tst.ListProbesFuncUSDT.sh
+++ b/test/unittest/dtrace-util/tst.ListProbesFuncUSDT.sh
@@ -22,7 +22,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS=
DIRNAME="$tmpdir/list-probes-func-usdt.$$.$RANDOM"
diff --git a/test/unittest/dtrace-util/tst.ListProbesModuleUSDT.sh b/test/unittest/dtrace-util/tst.ListProbesModuleUSDT.sh
index dc6cb100..0c0694ce 100755
--- a/test/unittest/dtrace-util/tst.ListProbesModuleUSDT.sh
+++ b/test/unittest/dtrace-util/tst.ListProbesModuleUSDT.sh
@@ -22,7 +22,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS=
DIRNAME="$tmpdir/list-probes-module-usdt.$$.$RANDOM"
diff --git a/test/unittest/dtrace-util/tst.ListProbesNameUSDT.sh b/test/unittest/dtrace-util/tst.ListProbesNameUSDT.sh
index 59b8dca5..21e6b841 100755
--- a/test/unittest/dtrace-util/tst.ListProbesNameUSDT.sh
+++ b/test/unittest/dtrace-util/tst.ListProbesNameUSDT.sh
@@ -22,7 +22,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS=
DIRNAME="$tmpdir/list-probes-name-usdt.$$.$RANDOM"
diff --git a/test/unittest/dtrace-util/tst.ListProbesProviderUSDT.sh b/test/unittest/dtrace-util/tst.ListProbesProviderUSDT.sh
index 64fc185d..4d325386 100755
--- a/test/unittest/dtrace-util/tst.ListProbesProviderUSDT.sh
+++ b/test/unittest/dtrace-util/tst.ListProbesProviderUSDT.sh
@@ -22,7 +22,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS=
DIRNAME="$tmpdir/list-probes-provider-usdt.$$.$RANDOM"
diff --git a/test/unittest/misc/tst.include.sh b/test/unittest/misc/tst.include.sh
index 9d9989a3..738b4794 100755
--- a/test/unittest/misc/tst.include.sh
+++ b/test/unittest/misc/tst.include.sh
@@ -13,7 +13,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS=
DIR="$tmpdir/misc-include.$$.$RANDOM"
diff --git a/test/unittest/options/tst.ctypes.sh b/test/unittest/options/tst.ctypes.sh
index 30a6c9b1..19c76792 100755
--- a/test/unittest/options/tst.ctypes.sh
+++ b/test/unittest/options/tst.ctypes.sh
@@ -14,14 +14,14 @@ if [ ! -r $tmpdir/ctypes.ctf ]; then
exit 1
fi
-if objdump --help | grep ctf >/dev/null; then
- objcopy --add-section=.ctf=$tmpdir/ctypes.ctf /bin/true $tmpdir/ctypes.o
+if ${OBJDUMP:-objdump} --help | grep ctf >/dev/null; then
+ ${OBJCOPY:-objcopy} --add-section=.ctf=$tmpdir/ctypes.ctf /bin/true $tmpdir/ctypes.o
if [ $? -ne 0 ]; then
echo "ERROR: Failed to create ELF object from ctypes.ctf"
exit 1
fi
- objdump --ctf=.ctf $tmpdir/ctypes.o | \
+ ${OBJDUMP:-objdump} --ctf=.ctf $tmpdir/ctypes.o | \
gawk '/CTF_VERSION/ { found = 1; next; }
found && $1 ~ /0x[0-9A-Fa-f]+:/ { cnt++; next; }
END { print "C CTF data" (found ? " " : " NOT ") "found";
diff --git a/test/unittest/options/tst.dtypes.sh b/test/unittest/options/tst.dtypes.sh
index 441de098..658793c7 100755
--- a/test/unittest/options/tst.dtypes.sh
+++ b/test/unittest/options/tst.dtypes.sh
@@ -14,14 +14,14 @@ if [ ! -r $tmpdir/dtypes.ctf ]; then
exit 1
fi
-if objdump --help | grep ctf >/dev/null; then
- objcopy --add-section=.ctf=$tmpdir/dtypes.ctf /bin/true $tmpdir/dtypes.o
+if ${OBJDUMP:-objdump} --help | grep ctf >/dev/null; then
+ ${OBJCOPY:-objcopy} --add-section=.ctf=$tmpdir/dtypes.ctf /bin/true $tmpdir/dtypes.o
if [ $? -ne 0 ]; then
echo "ERROR: Failed to create ELF object from dtypes.ctf"
exit 1
fi
- objdump --ctf=.ctf $tmpdir/dtypes.o | \
+ ${OBJDUMP:-objdump} --ctf=.ctf $tmpdir/dtypes.o | \
gawk '/CTF_VERSION/ { found = 1; next; }
found && $1 ~ /0x[0-9A-Fa-f]+:/ { cnt++; next; }
END { print "D CTF data" (found ? " " : " NOT ") "found";
diff --git a/test/unittest/options/tst.linktype.sh b/test/unittest/options/tst.linktype.sh
index 564d9b0f..15bc649b 100755
--- a/test/unittest/options/tst.linktype.sh
+++ b/test/unittest/options/tst.linktype.sh
@@ -9,7 +9,7 @@
# @@nosort
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS=
DIRNAME="$tmpdir/linktype.$$.$RANDOM"
@@ -61,7 +61,7 @@ function mytest() {
fi
# report whether the file format is recognized
- objdump --file-headers prov.o |& gawk '
+ ${OBJDUMP:-objdump} --file-headers prov.o |& gawk '
/format not recognized/ {
print "objdump does NOT recognize file format";
exit(0);
diff --git a/test/unittest/options/tst.strip.sh b/test/unittest/options/tst.strip.sh
index 054955fb..1124ccc5 100755
--- a/test/unittest/options/tst.strip.sh
+++ b/test/unittest/options/tst.strip.sh
@@ -7,7 +7,7 @@
#
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS=
DIRNAME="$tmpdir/strip.$$.$RANDOM"
@@ -48,7 +48,7 @@ fi
# link with and without -xstrip, dumping the DOF section
-objdump="objdump --full-contents --section=.SUNW_dof prov.o"
+objdump="${OBJDUMP:-objdump} --full-contents --section=.SUNW_dof prov.o"
$dtrace $dt_flags -G -xstrip -s prov.d test.o
if [ $? -ne 0 ]; then
diff --git a/test/unittest/pid/tst.offsets.sh b/test/unittest/pid/tst.offsets.sh
index cc1a440d..795553b0 100755
--- a/test/unittest/pid/tst.offsets.sh
+++ b/test/unittest/pid/tst.offsets.sh
@@ -85,7 +85,7 @@ fi
# hot and cold instructions in the function.
#
-objdump -d a.out | gawk '
+${OBJDUMP:-objdump} -d a.out | gawk '
BEGIN {
pc0 = 0; # First PC of loopfunc()
pcjump = 0; # PC of the jump
diff --git a/test/unittest/usdt/tst.allargs.sh b/test/unittest/usdt/tst.allargs.sh
index 179552b6..3404b62b 100755
--- a/test/unittest/usdt/tst.allargs.sh
+++ b/test/unittest/usdt/tst.allargs.sh
@@ -15,7 +15,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="-std=gnu89 $test_cppflags"
LDFLAGS="$test_ldflags"
diff --git a/test/unittest/usdt/tst.badguess.sh b/test/unittest/usdt/tst.badguess.sh
index b6ff9e23..45044c32 100755
--- a/test/unittest/usdt/tst.badguess.sh
+++ b/test/unittest/usdt/tst.badguess.sh
@@ -11,7 +11,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="$test_cppflags"
LDFLAGS="$test_ldflags"
diff --git a/test/unittest/usdt/tst.dlclose1.sh b/test/unittest/usdt/tst.dlclose1.sh
index a6bad02b..a62da006 100755
--- a/test/unittest/usdt/tst.dlclose1.sh
+++ b/test/unittest/usdt/tst.dlclose1.sh
@@ -29,7 +29,7 @@
# The second should not.
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS=
DIRNAME="$tmpdir/usdt-dlclose1.$$.$RANDOM"
diff --git a/test/unittest/usdt/tst.dlclose2.sh b/test/unittest/usdt/tst.dlclose2.sh
index 907685a6..1f7064ad 100755
--- a/test/unittest/usdt/tst.dlclose2.sh
+++ b/test/unittest/usdt/tst.dlclose2.sh
@@ -15,7 +15,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS=
DIRNAME="$tmpdir/usdt-dlclose2.$$.$RANDOM"
diff --git a/test/unittest/usdt/tst.dlclose3.sh b/test/unittest/usdt/tst.dlclose3.sh
index 0b70906f..f65ba4e6 100755
--- a/test/unittest/usdt/tst.dlclose3.sh
+++ b/test/unittest/usdt/tst.dlclose3.sh
@@ -21,7 +21,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS=
DIRNAME="$tmpdir/usdt-dlclose3.$$.$RANDOM"
diff --git a/test/unittest/usdt/tst.eliminate.sh b/test/unittest/usdt/tst.eliminate.sh
index e74896bb..b0174fca 100755
--- a/test/unittest/usdt/tst.eliminate.sh
+++ b/test/unittest/usdt/tst.eliminate.sh
@@ -16,7 +16,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="$test_cppflags"
LDFLAGS="$test_ldflags"
@@ -71,13 +71,13 @@ if [ $? -ne 0 ]; then
exit 1
fi
-nm test.o | grep \$dtrace > /dev/null
+${NM:-nm} test.o | grep \$dtrace > /dev/null
if [ $? -ne 0 ]; then
echo "no temporary symbols in the object file" >& 2
exit 1
fi
-nm test | grep \$dtrace > /dev/null
+${NM:-nm} test | grep \$dtrace > /dev/null
if [ $? -eq 0 ]; then
echo "failed to eliminate temporary symbols" >& 2
exit 1
diff --git a/test/unittest/usdt/tst.enabled.sh b/test/unittest/usdt/tst.enabled.sh
index 4cd1eccd..d444a1fd 100755
--- a/test/unittest/usdt/tst.enabled.sh
+++ b/test/unittest/usdt/tst.enabled.sh
@@ -11,7 +11,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="$test_cppflags"
LDFLAGS="$test_ldflags"
diff --git a/test/unittest/usdt/tst.enabled2.sh b/test/unittest/usdt/tst.enabled2.sh
index 1732085e..7d7648fa 100755
--- a/test/unittest/usdt/tst.enabled2.sh
+++ b/test/unittest/usdt/tst.enabled2.sh
@@ -15,7 +15,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="$test_cppflags"
LDFLAGS="$test_ldflags"
diff --git a/test/unittest/usdt/tst.entryreturn.sh b/test/unittest/usdt/tst.entryreturn.sh
index 84af9672..3c0cba9a 100755
--- a/test/unittest/usdt/tst.entryreturn.sh
+++ b/test/unittest/usdt/tst.entryreturn.sh
@@ -13,7 +13,7 @@ fi
# @@xfail: dtv2, no wildcard usdt probes yet
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="$test_cppflags"
LDFLAGS="$test_ldflags"
diff --git a/test/unittest/usdt/tst.exec-dof-replacement.sh b/test/unittest/usdt/tst.exec-dof-replacement.sh
index 6d547cce..191f749f 100755
--- a/test/unittest/usdt/tst.exec-dof-replacement.sh
+++ b/test/unittest/usdt/tst.exec-dof-replacement.sh
@@ -14,7 +14,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="$test_cppflags"
LDFLAGS="$test_ldflags"
diff --git a/test/unittest/usdt/tst.execstack.sh b/test/unittest/usdt/tst.execstack.sh
index e7b59105..75586dfb 100755
--- a/test/unittest/usdt/tst.execstack.sh
+++ b/test/unittest/usdt/tst.execstack.sh
@@ -11,11 +11,11 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="$test_cppflags"
LDFLAGS="$test_ldflags"
-OBJDUMP=/usr/bin/objdump
-READELF=/usr/bin/readelf
+OBJDUMP=${OBJDUMP:-/usr/bin/objdump}
+READELF=${READELF:-/usr/bin/readelf}
DIRNAME="$tmpdir/usdt-execstack.$$.$RANDOM"
mkdir -p $DIRNAME
diff --git a/test/unittest/usdt/tst.fork.sh b/test/unittest/usdt/tst.fork.sh
index 9b2b372a..75cf99fd 100755
--- a/test/unittest/usdt/tst.fork.sh
+++ b/test/unittest/usdt/tst.fork.sh
@@ -12,7 +12,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="$test_cppflags"
LDFLAGS="$test_ldflags"
diff --git a/test/unittest/usdt/tst.guess32.sh b/test/unittest/usdt/tst.guess32.sh
index 7a130e17..8ae4fb00 100755
--- a/test/unittest/usdt/tst.guess32.sh
+++ b/test/unittest/usdt/tst.guess32.sh
@@ -11,7 +11,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="$test_cppflags"
LDFLAGS="$test_ldflags"
diff --git a/test/unittest/usdt/tst.guess64.sh b/test/unittest/usdt/tst.guess64.sh
index 23b7a241..1141d5e4 100755
--- a/test/unittest/usdt/tst.guess64.sh
+++ b/test/unittest/usdt/tst.guess64.sh
@@ -11,7 +11,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="$test_cppflags"
LDFLAGS="$test_ldflags"
--git a/test/unittest/usdt/tst.header.sh b/test/unittest/usdt/tst.header.sh
index c5e411be..05813c1e 100755
--- a/test/unittest/usdt/tst.header.sh
+++ b/test/unittest/usdt/tst.header.sh
@@ -11,7 +11,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="$test_cppflags"
LDFLAGS="$test_ldflags"
diff --git a/test/unittest/usdt/tst.lingering.sh b/test/unittest/usdt/tst.lingering.sh
index 079acb75..d1a1b03c 100755
--- a/test/unittest/usdt/tst.lingering.sh
+++ b/test/unittest/usdt/tst.lingering.sh
@@ -14,7 +14,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="$test_cppflags"
LDFLAGS="$test_ldflags"
diff --git a/test/unittest/usdt/tst.link-idempotence.sh b/test/unittest/usdt/tst.link-idempotence.sh
index 643ba10c..62f2a518 100755
--- a/test/unittest/usdt/tst.link-idempotence.sh
+++ b/test/unittest/usdt/tst.link-idempotence.sh
@@ -11,7 +11,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="$test_cppflags"
LDFLAGS="$test_ldflags"
diff --git a/test/unittest/usdt/tst.linkpriv.sh b/test/unittest/usdt/tst.linkpriv.sh
index 2c89f5d4..0e95dcac 100755
--- a/test/unittest/usdt/tst.linkpriv.sh
+++ b/test/unittest/usdt/tst.linkpriv.sh
@@ -11,7 +11,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="-std=gnu99 $test_cppflags"
LDFLAGS="$test_ldflags"
diff --git a/test/unittest/usdt/tst.linkunpriv.sh b/test/unittest/usdt/tst.linkunpriv.sh
index 9ef38639..1775db82 100755
--- a/test/unittest/usdt/tst.linkunpriv.sh
+++ b/test/unittest/usdt/tst.linkunpriv.sh
@@ -13,7 +13,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="$test_cppflags"
DIRNAME="$tmpdir/usdt-linkunpriv.$$.$RANDOM"
diff --git a/test/unittest/usdt/tst.manyprobes.sh b/test/unittest/usdt/tst.manyprobes.sh
index c0deb8df..080d9cda 100755
--- a/test/unittest/usdt/tst.manyprobes.sh
+++ b/test/unittest/usdt/tst.manyprobes.sh
@@ -11,7 +11,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="$test_cppflags"
LDFLAGS="$test_ldflags"
DIRNAME="$tmpdir/usdt-manyprobes.$$.$RANDOM"
diff --git a/test/unittest/usdt/tst.manyprocs.sh b/test/unittest/usdt/tst.manyprocs.sh
index 58550302..05cc8717 100755
--- a/test/unittest/usdt/tst.manyprocs.sh
+++ b/test/unittest/usdt/tst.manyprocs.sh
@@ -14,7 +14,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="$test_cppflags"
LDFLAGS="$test_ldflags"
diff --git a/test/unittest/usdt/tst.multiple.sh b/test/unittest/usdt/tst.multiple.sh
index 440a7d7b..e6eab3e5 100755
--- a/test/unittest/usdt/tst.multiple.sh
+++ b/test/unittest/usdt/tst.multiple.sh
@@ -11,7 +11,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="$test_cppflags"
LDFLAGS="$test_ldflags"
diff --git a/test/unittest/usdt/tst.multitrace.sh b/test/unittest/usdt/tst.multitrace.sh
index 262c7828..b73dd830 100755
--- a/test/unittest/usdt/tst.multitrace.sh
+++ b/test/unittest/usdt/tst.multitrace.sh
@@ -14,7 +14,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="$test_cppflags"
LDFLAGS="$test_ldflags"
diff --git a/test/unittest/usdt/tst.onlyenabled.sh b/test/unittest/usdt/tst.onlyenabled.sh
index d3487834..8d84e3ec 100755
--- a/test/unittest/usdt/tst.onlyenabled.sh
+++ b/test/unittest/usdt/tst.onlyenabled.sh
@@ -11,7 +11,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="$test_cppflags"
LDFLAGS="$test_ldflags"
diff --git a/test/unittest/usdt/tst.pie.sh b/test/unittest/usdt/tst.pie.sh
index 0d62c376..4ddae43e 100755
--- a/test/unittest/usdt/tst.pie.sh
+++ b/test/unittest/usdt/tst.pie.sh
@@ -11,7 +11,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="-fno-inline -pie $test_cppflags"
LDFLAGS="-pie $test_ldflags"
diff --git a/test/unittest/usdt/tst.reeval.sh b/test/unittest/usdt/tst.reeval.sh
index 371eee3d..9d49755a 100755
--- a/test/unittest/usdt/tst.reeval.sh
+++ b/test/unittest/usdt/tst.reeval.sh
@@ -12,7 +12,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="$test_cppflags"
LDFLAGS="$test_ldflags"
diff --git a/test/unittest/usdt/tst.static.sh b/test/unittest/usdt/tst.static.sh
index 81b3ba04..d6dd4a7b 100755
--- a/test/unittest/usdt/tst.static.sh
+++ b/test/unittest/usdt/tst.static.sh
@@ -11,7 +11,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="$test_cppflags"
LDFLAGS="$test_ldflags"
diff --git a/test/unittest/usdt/tst.static2.sh b/test/unittest/usdt/tst.static2.sh
index 115a9551..b7b1be16 100755
--- a/test/unittest/usdt/tst.static2.sh
+++ b/test/unittest/usdt/tst.static2.sh
@@ -15,7 +15,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="$test_cppflags"
LDFLAGS="$test_ldflags"
diff --git a/test/unittest/usdt/tst.user.sh b/test/unittest/usdt/tst.user.sh
index 30513acc..30e897e3 100755
--- a/test/unittest/usdt/tst.user.sh
+++ b/test/unittest/usdt/tst.user.sh
@@ -13,7 +13,7 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-CC=/usr/bin/gcc
+CC=${CC:-/usr/bin/gcc}
CFLAGS="$test_cppflags"
LDFLAGS="$test_ldflags"
diff --git a/test/utils/workload_analyze_loop.sh b/test/utils/workload_analyze_loop.sh
index 3bbadf78..1fb8c0b2 100755
--- a/test/utils/workload_analyze_loop.sh
+++ b/test/utils/workload_analyze_loop.sh
@@ -13,7 +13,7 @@ if [ ! -e $prog ]; then
exit 1
fi
-objdump -d $prog | gawk -v myarch=$(uname -m) '
+${OBJDUMP:-objdump} -d $prog | gawk -v myarch=$(uname -m) '
# decide whether to track instructions (which we number n = 1, 2, 3, ...) or not (n < 0)
# specifically, do not track instructions until we find the disassembly for <main>
BEGIN { n = -1; }
--
2.48.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 1/4] test: fix 'harness' typo
2025-01-24 2:49 ` [PATCH 1/4] test: fix 'harness' typo Sam James
@ 2025-02-25 18:28 ` Eugene Loh
0 siblings, 0 replies; 12+ messages in thread
From: Eugene Loh @ 2025-02-25 18:28 UTC (permalink / raw)
To: Sam James, dtrace
Reviewed-by: Eugene Loh <eugene.loh@oracle.com>
On 1/23/25 21:49, Sam James wrote:
> Noticed when grepping for something else.
>
> Signed-off-by: Sam James <sam@gentoo.org>
> ---
> test/unittest/io/check_io_probe_args.sh | 2 +-
> test/unittest/io/dump_io_probe_args.d | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/test/unittest/io/check_io_probe_args.sh b/test/unittest/io/check_io_probe_args.sh
> index 50dba6c6..8e1f5a4c 100755
> --- a/test/unittest/io/check_io_probe_args.sh
> +++ b/test/unittest/io/check_io_probe_args.sh
> @@ -6,7 +6,7 @@
> # http://oss.oracle.com/licenses/upl.
>
> #
> -# @@skip: not used directly by the test hardness; called by other scripts
> +# @@skip: not used directly by the test harness; called by other scripts
> #
>
> infile=$1
> diff --git a/test/unittest/io/dump_io_probe_args.d b/test/unittest/io/dump_io_probe_args.d
> index a28b2d61..5b5ba90f 100644
> --- a/test/unittest/io/dump_io_probe_args.d
> +++ b/test/unittest/io/dump_io_probe_args.d
> @@ -4,7 +4,7 @@
> * Licensed under the Universal Permissive License v 1.0 as shown at
> * http://oss.oracle.com/licenses/upl.
> */
> -/* @@skip: not used directly by the test hardness; called by other scripts */
> +/* @@skip: not used directly by the test harness; called by other scripts */
>
> /*
> * For all io::: probes, dump "all" probe arguments (and their interesting members).
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/4] test: fix bashism in tst.bitfield-offset.x
2025-01-24 2:49 ` [PATCH 2/4] test: fix bashism in tst.bitfield-offset.x Sam James
@ 2025-02-25 21:29 ` Eugene Loh
0 siblings, 0 replies; 12+ messages in thread
From: Eugene Loh @ 2025-02-25 21:29 UTC (permalink / raw)
To: Sam James, dtrace
Reviewed-by: Eugene Loh <eugene.loh@oracle.com>
On 1/23/25 21:49, Sam James wrote:
> trap ERR is a bashism and won't work with e.g. dash, just change
> the shebang to #!/bin/bash in this case as ERR is a bit messy to handle
> (it'd be trivial here but there's no real reason to not use bash).
>
> Signed-off-by: Sam James <sam@gentoo.org>
> ---
> test/unittest/bitfields/tst.bitfield-offset.x | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/test/unittest/bitfields/tst.bitfield-offset.x b/test/unittest/bitfields/tst.bitfield-offset.x
> index 4397461a..ae57c2b5 100755
> --- a/test/unittest/bitfields/tst.bitfield-offset.x
> +++ b/test/unittest/bitfields/tst.bitfield-offset.x
> @@ -1,4 +1,4 @@
> -#!/bin/sh
> +#!/bin/bash
> # Licensed under the Universal Permissive License v 1.0 as shown at
> # http://oss.oracle.com/licenses/upl.
> #
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/4] test: finalize porting small awk stragglers to gawk
2025-01-24 2:49 ` [PATCH 3/4] test: finalize porting small awk stragglers to gawk Sam James
@ 2025-02-25 21:39 ` Eugene Loh
0 siblings, 0 replies; 12+ messages in thread
From: Eugene Loh @ 2025-02-25 21:39 UTC (permalink / raw)
To: Sam James, dtrace
Reviewed-by: Eugene Loh <eugene.loh@oracle.com>
but I think we need updated copyright years for
test/unittest/builtinvar/tst.id_ERROR.sh
test/unittest/variables/bvar/tst.arg3-ERROR-b.sh
test/unittest/variables/bvar/tst.arg3-ERROR.sh
Also, at this point there are other "awk" instances on origin/dev.
(You're welcome. Oops. Sorry. I bet a lot of these are from me.) I'm
okay with going with this patch and then iterating further with a later
patch. I can imagine such awk stragglers will continue to find their
way into the code. Anyhow, here are other awk instances on origin/dev:
test/unittest/funcs/err.badalloca.r.p:#!/usr/bin/awk -f
test/unittest/pid/tst.entry_off0.sh:awk '$2 == "0" || $2 ==
"entry"' D.out | awk '
test/unittest/pid/tst.newprobes.sh:pid*:awk::
test/unittest/pid/tst.newprobes.sh: system("$dtrace $dt_flags -c
awk -n 'pid\$target::main:entry{exit(0);}' >/dev/null 2>&1");
test/unittest/pid/tst.newprobes.sh: system("$dtrace $dt_flags -c
awk -n 'pid\$target::main:entry{exit(0);}' >/dev/null 2>&1");
test/unittest/stack/tst.stack_fbt.sh:awk 'NF != 0 {
sub(/+0x[0-9a-f]*$/, "+{ptr}"); print }' dtrace.out > dtrace.post
test/unittest/usdt/tst.defer-Z.sh: awk '
test/unittest/usdt/tst.defer-Z.sh:awk 'NF != 0 { print $1, $2, $3
}' dtrace.out | sort > dtrace.out.post
test/unittest/usdt/tst.defer-nodtrace.sh:if ! awk '{ $2 =
"undefined"; print }' main.out | diff -q - main.out.expected; then
test/unittest/usdt/tst.defer.sh: awk '
test/unittest/usdt/tst.defer.sh:awk 'NF != 0 { print $1, $2, $3 }'
dtrace.out | sort > dtrace.out.post
test/unittest/usdt/tst.dlclose4.sh: $dtrace $dt_flags -lP
test_prov$pid |& awk '
test/unittest/usdt/tst.enable_pid.r.p:#!/usr/bin/awk -f
test/unittest/usdt/tst.nusdtprobes.sh: awk 'NF == 5 { print $1,
$2, $3, $4 }' dtrace.out | sort > dtrace.out.sorted
test/unittest/usdt/tst.pidprobes.sh:if [ `awk 'NF != 0 { print $1
}' dtrace.out | uniq | wc -l` -ne 1 ]; then
test/unittest/usdt/tst.pidprobes.sh:pid=`awk 'NF != 0 { print $1 }'
dtrace.out | uniq`
test/unittest/usdt/tst.pidprobes.sh:objdump -d main | awk '
test/unittest/usdt/tst.pidprobes.sh:pcs=`awk '{print
strtonum("0x"$1)}' disasm_foo.txt`
test/unittest/usdt/tst.pidprobes.sh:pc0=`echo $pcs | awk '{print $1}'`
test/unittest/usdt/tst.pidprobes.sh: usdt_pcs_all=`awk '
test/unittest/usdt/tst.pidprobes.sh: if [ `echo $usdt_pcs_all |
awk '{print NF}'` -ne 4 ]; then
test/unittest/usdt/tst.pidprobes.sh: usdt_pcs=`echo
$usdt_pcs_all | awk '{ print $1, $3 }'`
test/unittest/usdt/tst.pidprobes.sh: usdt_pcs_isenabled=`echo
$usdt_pcs_all | awk '{ print $2, $4 }'`
test/unittest/usdt/tst.pidprobes.sh: usdt_pcs=`awk
'/<__dtrace_pyramid___entry>/ { print strtonum("0x"$1) + '$pc0' }'
disasm_foo.txt.before`
test/unittest/usdt/tst.pidprobes.sh: usdt_pcs_isenabled=`awk
'/<__dtraceenabled_pyramid___entry>/ { print strtonum("0x"$1) + '$pc0'
}' disasm_foo.t
xt.before`
test/unittest/usdt/tst.pidprobes.sh: if [ `echo $usdt_pcs | awk
'{print NF}'` -ne 2 -o \
test/unittest/usdt/tst.pidprobes.sh: `echo
$usdt_pcs_isenabled | awk '{print NF}'` -ne 2 ]; then
test/unittest/usdt/tst.pidprobes.sh:pc_return=`awk '/'$pid'
pid'$pid':main:foo:return/ { print $NF }' dtrace.out`
test/unittest/usdt/tst.pidprobes.sh:objdump -d main | awk '
test/unittest/usdt/tst.pidprobes.sh:echo $usdt_pcs | awk
'{printf("'$pid' pyramid'$pid':main:foo:entry %x\n", $1);}' >>
dtrace.out.expected
test/unittest/usdt/tst.pidprobes.sh:echo $usdt_pcs | awk
'{printf("'$pid' pyramid'$pid':main:foo:entry %x\n", $2);}' >>
dtrace.out.expected
On 1/23/25 21:49, Sam James wrote:
> We missed some in 8a1264bf0e818c8624be250eb5174714b62ed93c because some
> other test changes landed before it landed.
>
> Signed-off-by: Sam James <sam@gentoo.org>
> ---
> test/unittest/builtinvar/tst.id_ERROR.sh | 2 +-
> test/unittest/error/tst.clause_scope-regular.r.p | 2 +-
> test/unittest/variables/bvar/tst.arg3-ERROR-b.sh | 2 +-
> test/unittest/variables/bvar/tst.arg3-ERROR.sh | 14 +++++++-------
> 4 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/test/unittest/builtinvar/tst.id_ERROR.sh b/test/unittest/builtinvar/tst.id_ERROR.sh
> index 082ebd0c..480d99a3 100755
> --- a/test/unittest/builtinvar/tst.id_ERROR.sh
> +++ b/test/unittest/builtinvar/tst.id_ERROR.sh
> @@ -30,7 +30,7 @@ fi
>
> # Get the ERROR probe ID from "dtrace -l" output.
>
> -id=`$dtrace $dt_flags -ln dtrace:::ERROR |& awk '/^ *[0-9]* *dtrace *ERROR *$/ { print $1 }'`
> +id=`$dtrace $dt_flags -ln dtrace:::ERROR |& gawk '/^ *[0-9]* *dtrace *ERROR *$/ { print $1 }'`
>
> # Construct expected output.
>
> diff --git a/test/unittest/error/tst.clause_scope-regular.r.p b/test/unittest/error/tst.clause_scope-regular.r.p
> index f7a200c4..bf7e2614 100755
> --- a/test/unittest/error/tst.clause_scope-regular.r.p
> +++ b/test/unittest/error/tst.clause_scope-regular.r.p
> @@ -1,4 +1,4 @@
> -#!/usr/bin/awk -f
> +#!/usr/bin/gawk -f
>
> # This report has a variable probe ID in it.
> {
> diff --git a/test/unittest/variables/bvar/tst.arg3-ERROR-b.sh b/test/unittest/variables/bvar/tst.arg3-ERROR-b.sh
> index 2f6e51c3..97661b75 100755
> --- a/test/unittest/variables/bvar/tst.arg3-ERROR-b.sh
> +++ b/test/unittest/variables/bvar/tst.arg3-ERROR-b.sh
> @@ -50,7 +50,7 @@ BEGIN
> }
> EOT
>
> -awk 'BEGIN {
> +gawk 'BEGIN {
> ok = 0;
> }
>
> diff --git a/test/unittest/variables/bvar/tst.arg3-ERROR.sh b/test/unittest/variables/bvar/tst.arg3-ERROR.sh
> index 38cb38df..b5460b6c 100755
> --- a/test/unittest/variables/bvar/tst.arg3-ERROR.sh
> +++ b/test/unittest/variables/bvar/tst.arg3-ERROR.sh
> @@ -49,7 +49,7 @@ fi
>
> # Parse the disassembly output for start PCs for the dt_clause_n.
>
> -awk '
> +gawk '
> BEGIN { phase = 0 }
>
> # Look for disassembly of dtrace:::BEGIN.
> @@ -70,7 +70,7 @@ phase == 3 && NF == 0 { exit(0) }
> phase == 3 { next }
> ' disasm.out > dt_clause_start_pcs.txt
> if [ $? -ne 0 ]; then
> - echo ERROR: awk
> + echo ERROR: gawk
> dump_files disasm.out dt_clause_start_pcs.txt
> exit 1
> fi
> @@ -80,7 +80,7 @@ fi
> for n in 0 1 2 3 4 5; do
> echo dt_clause_$n >> dt_clause_start_pcs.txt.check
> done
> -if ! awk '{print $2}' dt_clause_start_pcs.txt | diff - dt_clause_start_pcs.txt.check; then
> +if ! gawk '{print $2}' dt_clause_start_pcs.txt | diff - dt_clause_start_pcs.txt.check; then
> echo ERROR: did not find all expected dt_clause_n
> dump_files disasm.out dt_clause_start_pcs.txt
> fi
> @@ -94,10 +94,10 @@ fi
> # dt_probe_error() is the problematic one. We look for those calls.
> for n in 1 2 3 4; do
> # For dt_clause_$n, find the starting PC.
> - pc=`awk '$2 == "dt_clause_'$n'" { print $1 }' dt_clause_start_pcs.txt`
> + pc=`gawk '$2 == "dt_clause_'$n'" { print $1 }' dt_clause_start_pcs.txt`
>
> # Look for the starting PC and then the second dt_probe_error().
> - awk '
> + gawk '
> BEGIN { phase = 0 }
>
> # Look for disassembly of dtrace:::BEGIN.
> @@ -120,7 +120,7 @@ done
>
> # Do a sanity check on DTrace's error output.
>
> -awk '/^dtrace: error in dt_clause_[1-4] for probe ID 1 \(dtrace:::BEGIN): invalid address \(0x40) at BPF pc [0-9]*$/ { print $NF }' \
> +gawk '/^dtrace: error in dt_clause_[1-4] for probe ID 1 \(dtrace:::BEGIN): invalid address \(0x40) at BPF pc [0-9]*$/ { print $NF }' \
> disasm.out > err_pcs.txt.chk1
> if ! diff -q err_pcs.txt err_pcs.txt.chk1; then
> echo ERROR: problem with DTrace error output
> @@ -130,7 +130,7 @@ fi
>
> # Check the D script output... the arg3 values reported by the dtrace:::ERROR probe.
>
> -if ! awk 'NF != 0 { print strtonum("0x"$NF) }' D.out | diff -q - err_pcs.txt; then
> +if ! gawk 'NF != 0 { print strtonum("0x"$NF) }' D.out | diff -q - err_pcs.txt; then
> echo ERROR: D script output looks wrong
> dump_files D.out err_pcs.txt
> exit 1
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 4/4] test: allow overriding CC, OBJCOPY, OBJDUMP, NM, ...
2025-01-24 2:49 ` [PATCH 4/4] test: allow overriding CC, OBJCOPY, OBJDUMP, NM, Sam James
@ 2025-02-25 22:26 ` Eugene Loh
2025-02-26 0:09 ` Sam James
0 siblings, 1 reply; 12+ messages in thread
From: Eugene Loh @ 2025-02-25 22:26 UTC (permalink / raw)
To: Sam James, dtrace
I'm open to signing off on this patch, but I have some questions:
*) You said you'd do a full test run. Did that happen?
*) If objdump is used several times in a script, how about setting it
once and then reusing the same definition? E.g.,
test/unittest/bitfields/tst.bitfield-offset.x
test/unittest/options/tst.ctypes.sh
test/unittest/options/tst.dtypes.sh
Same for nm:
test/unittest/usdt/tst.eliminate.sh
But wait, before you answer that question...
*) How about just setting
CC=...
NM=...
OBJCOPY=...
OBJDUMP=...
READELF=...
"once" in runtest.sh? Then use $CC, et al., everywhere, rather
than replicating the assignments in all those different files.
*) By the way, more bare objdump instances have crept into origin/dev:
test/unittest/usdt/tst.pidprobes.sh
Sorry. I guess I'm to blame. (Recurring theme here. Oops. Sorry.)
*) Some files still have "CC=/usr/bin/gcc":
test/unittest/dtrace-util/tst.ListProbesArgsUSDT.sh
test/unittest/usdt/tst.dlclose4.sh
test/unittest/usdt/tst.enable_pid.sh
test/unittest/usdt/tst.multiprov-dupprobe-shlibs.sh
*) Some files still have "gcc" hardwired in:
test/stress/options/tst.cpu-syscall.sh
test/unittest/funcs/copyout/tst.copyout.sh
test/unittest/funcs/copyoutstr/tst.copyoutstr.sh
test/unittest/options/tst.cpu-syscall.sh
test/unittest/pid/tst.offsets.sh
test/unittest/usdt/tst.badguess.x
test/unittest/usdt/tst.nusdtprobes.sh
*) Some still have "cc" hardwired in:
test/unittest/pid/tst.provregex1.sh
test/unittest/pid/tst.provregex2.sh
test/unittest/pid/tst.provregex3.sh
test/unittest/pid/tst.provregex4.sh
test/unittest/usdt/tst.enable_pid.sh
test/unittest/usdt/tst.pidprobes.sh
*) A lot of files need updated Copyright years:
test/expensive/locking/tst.DestructionDoubleUnlock.sh
test/internals/headers/tst.header-endianness.sh
test/unittest/aggs/tst.aggmod_full2.sh
test/unittest/arrays/tst.uregsarray-check.sh
test/unittest/builtinvar/tst.errno3.sh
test/unittest/dtrace-util/tst.ListProbesFuncUSDT.sh
test/unittest/dtrace-util/tst.ListProbesModuleUSDT.sh
test/unittest/dtrace-util/tst.ListProbesNameUSDT.sh
test/unittest/dtrace-util/tst.ListProbesProviderUSDT.sh
test/unittest/misc/tst.include.sh
test/unittest/options/tst.ctypes.sh
test/unittest/options/tst.dtypes.sh
test/unittest/options/tst.linktype.sh
test/unittest/options/tst.strip.sh
test/unittest/pid/tst.offsets.sh
test/unittest/usdt/tst.allargs.sh
test/unittest/usdt/tst.badguess.sh
test/unittest/usdt/tst.dlclose1.sh
test/unittest/usdt/tst.dlclose2.sh
test/unittest/usdt/tst.dlclose3.sh
test/unittest/usdt/tst.eliminate.sh
test/unittest/usdt/tst.enabled.sh
test/unittest/usdt/tst.enabled2.sh
test/unittest/usdt/tst.entryreturn.sh
test/unittest/usdt/tst.exec-dof-replacement.sh
test/unittest/usdt/tst.execstack.sh
test/unittest/usdt/tst.fork.sh
test/unittest/usdt/tst.guess32.sh
test/unittest/usdt/tst.guess64.sh
test/unittest/usdt/tst.header.sh
test/unittest/usdt/tst.lingering.sh
test/unittest/usdt/tst.link-idempotence.sh
test/unittest/usdt/tst.linkpriv.sh
test/unittest/usdt/tst.linkunpriv.sh
test/unittest/usdt/tst.manyprobes.sh
test/unittest/usdt/tst.manyprocs.sh
test/unittest/usdt/tst.multiple.sh
test/unittest/usdt/tst.multitrace.sh
test/unittest/usdt/tst.onlyenabled.sh
test/unittest/usdt/tst.pie.sh
test/unittest/usdt/tst.reeval.sh
test/unittest/usdt/tst.static.sh
test/unittest/usdt/tst.static2.sh
test/unittest/usdt/tst.user.sh
test/utils/workload_analyze_loop.sh
On 1/23/25 21:49, Sam James wrote:
> Bug: https://github.com/oracle/dtrace-utils/issues/75
> Signed-off-by: Sam James <sam@gentoo.org>
> ---
> test/expensive/locking/tst.DestructionDoubleUnlock.sh | 2 +-
> test/internals/headers/tst.header-endianness.sh | 2 +-
> test/unittest/aggs/tst.aggmod_full2.sh | 2 +-
> test/unittest/arrays/tst.uregsarray-check.sh | 2 +-
> test/unittest/bitfields/tst.bitfield-offset.x | 8 ++++----
> test/unittest/builtinvar/tst.errno3.sh | 2 +-
> test/unittest/dtrace-util/tst.ListProbesFuncUSDT.sh | 2 +-
> test/unittest/dtrace-util/tst.ListProbesModuleUSDT.sh | 2 +-
> test/unittest/dtrace-util/tst.ListProbesNameUSDT.sh | 2 +-
> test/unittest/dtrace-util/tst.ListProbesProviderUSDT.sh | 2 +-
> test/unittest/misc/tst.include.sh | 2 +-
> test/unittest/options/tst.ctypes.sh | 6 +++---
> test/unittest/options/tst.dtypes.sh | 6 +++---
> test/unittest/options/tst.linktype.sh | 4 ++--
> test/unittest/options/tst.strip.sh | 4 ++--
> test/unittest/pid/tst.offsets.sh | 2 +-
> test/unittest/usdt/tst.allargs.sh | 2 +-
> test/unittest/usdt/tst.badguess.sh | 2 +-
> test/unittest/usdt/tst.dlclose1.sh | 2 +-
> test/unittest/usdt/tst.dlclose2.sh | 2 +-
> test/unittest/usdt/tst.dlclose3.sh | 2 +-
> test/unittest/usdt/tst.eliminate.sh | 6 +++---
> test/unittest/usdt/tst.enabled.sh | 2 +-
> test/unittest/usdt/tst.enabled2.sh | 2 +-
> test/unittest/usdt/tst.entryreturn.sh | 2 +-
> test/unittest/usdt/tst.exec-dof-replacement.sh | 2 +-
> test/unittest/usdt/tst.execstack.sh | 6 +++---
> test/unittest/usdt/tst.fork.sh | 2 +-
> test/unittest/usdt/tst.guess32.sh | 2 +-
> test/unittest/usdt/tst.guess64.sh | 2 +-
> test/unittest/usdt/tst.header.sh | 2 +-
> test/unittest/usdt/tst.lingering.sh | 2 +-
> test/unittest/usdt/tst.link-idempotence.sh | 2 +-
> test/unittest/usdt/tst.linkpriv.sh | 2 +-
> test/unittest/usdt/tst.linkunpriv.sh | 2 +-
> test/unittest/usdt/tst.manyprobes.sh | 2 +-
> test/unittest/usdt/tst.manyprocs.sh | 2 +-
> test/unittest/usdt/tst.multiple.sh | 2 +-
> test/unittest/usdt/tst.multitrace.sh | 2 +-
> test/unittest/usdt/tst.onlyenabled.sh | 2 +-
> test/unittest/usdt/tst.pie.sh | 2 +-
> test/unittest/usdt/tst.reeval.sh | 2 +-
> test/unittest/usdt/tst.static.sh | 2 +-
> test/unittest/usdt/tst.static2.sh | 2 +-
> test/unittest/usdt/tst.user.sh | 2 +-
> test/utils/workload_analyze_loop.sh | 2 +-
> 46 files changed, 59 insertions(+), 59 deletions(-)
>
> diff --git a/test/expensive/locking/tst.DestructionDoubleUnlock.sh b/test/expensive/locking/tst.DestructionDoubleUnlock.sh
> index c9b9eadc..c0f7156a 100755
> --- a/test/expensive/locking/tst.DestructionDoubleUnlock.sh
> +++ b/test/expensive/locking/tst.DestructionDoubleUnlock.sh
> @@ -28,7 +28,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS=
>
> DIRNAME="$tmpdir/destruction-double-unlock.$$.$RANDOM"
> diff --git a/test/internals/headers/tst.header-endianness.sh b/test/internals/headers/tst.header-endianness.sh
> index e45cc597..317ea90c 100755
> --- a/test/internals/headers/tst.header-endianness.sh
> +++ b/test/internals/headers/tst.header-endianness.sh
> @@ -10,7 +10,7 @@
> set -e
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> OLDDIRNAME=${PWD}
> CFLAGS="-I${OLDDIRNAME}/include -I${OLDDIRNAME}/uts/common"
>
> diff --git a/test/unittest/aggs/tst.aggmod_full2.sh b/test/unittest/aggs/tst.aggmod_full2.sh
> index 66cfc002..48988a1a 100755
> --- a/test/unittest/aggs/tst.aggmod_full2.sh
> +++ b/test/unittest/aggs/tst.aggmod_full2.sh
> @@ -17,7 +17,7 @@
> ##
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS=
>
> DIRNAME="$tmpdir/aggs-aggmod_full2.$$.$RANDOM"
> diff --git a/test/unittest/arrays/tst.uregsarray-check.sh b/test/unittest/arrays/tst.uregsarray-check.sh
> index f55d36d0..648072b4 100755
> --- a/test/unittest/arrays/tst.uregsarray-check.sh
> +++ b/test/unittest/arrays/tst.uregsarray-check.sh
> @@ -7,7 +7,7 @@
> #
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS=
>
> DIRNAME="$tmpdir/arrays-uregsarray-check.$$.$RANDOM"
> diff --git a/test/unittest/bitfields/tst.bitfield-offset.x b/test/unittest/bitfields/tst.bitfield-offset.x
> index ae57c2b5..b1f21da4 100755
> --- a/test/unittest/bitfields/tst.bitfield-offset.x
> +++ b/test/unittest/bitfields/tst.bitfield-offset.x
> @@ -12,8 +12,8 @@
> # skip the test, since we can't possibly tell what it was
> # generated by.
>
> -if ! objdump --ctf=.ctf --ctf-parent=shared_ctf /bin/true > /dev/null 2>&1 && \
> - LANG=C objdump --ctf=.ctf --ctf-parent=shared_ctf /bin/true 2>&1 | \
> +if ! ${OBJDUMP:-objdump} --ctf=.ctf --ctf-parent=shared_ctf /bin/true > /dev/null 2>&1 && \
> + LANG=C ${OBJDUMP:-objdump} --ctf=.ctf --ctf-parent=shared_ctf /bin/true 2>&1 | \
> grep 'unrecognized option' > /dev/null 2>&1; then
> exit 2
> fi
> @@ -21,7 +21,7 @@ fi
> ctfa=$tmpdir/vmlinux.ctfa
> trap "rm -f $ctfa" EXIT ERR
>
> -objcopy --add-section=.ctf=/lib/modules/$(uname -r)/kernel/vmlinux.ctfa /bin/true $ctfa
> +${OBJCOPY:-objcopy} --add-section=.ctf=/lib/modules/$(uname -r)/kernel/vmlinux.ctfa /bin/true $ctfa
>
> -objdump --ctf=.ctf --ctf-parent=shared_ctf $ctfa |\
> +${OBJDUMP:-objdump} --ctf=.ctf --ctf-parent=shared_ctf $ctfa |\
> gawk '/Version: 3/ { exit 1; } /Version: / { exit 0; }'
> diff --git a/test/unittest/builtinvar/tst.errno3.sh b/test/unittest/builtinvar/tst.errno3.sh
> index 7546152f..5985a0d3 100755
> --- a/test/unittest/builtinvar/tst.errno3.sh
> +++ b/test/unittest/builtinvar/tst.errno3.sh
> @@ -7,7 +7,7 @@
> #
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
>
> DIRNAME="$tmpdir/builtinvar-errno3.$$.$RANDOM"
> mkdir -p $DIRNAME
> diff --git a/test/unittest/dtrace-util/tst.ListProbesFuncUSDT.sh b/test/unittest/dtrace-util/tst.ListProbesFuncUSDT.sh
> index f8083f2c..5de50001 100755
> --- a/test/unittest/dtrace-util/tst.ListProbesFuncUSDT.sh
> +++ b/test/unittest/dtrace-util/tst.ListProbesFuncUSDT.sh
> @@ -22,7 +22,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS=
>
> DIRNAME="$tmpdir/list-probes-func-usdt.$$.$RANDOM"
> diff --git a/test/unittest/dtrace-util/tst.ListProbesModuleUSDT.sh b/test/unittest/dtrace-util/tst.ListProbesModuleUSDT.sh
> index dc6cb100..0c0694ce 100755
> --- a/test/unittest/dtrace-util/tst.ListProbesModuleUSDT.sh
> +++ b/test/unittest/dtrace-util/tst.ListProbesModuleUSDT.sh
> @@ -22,7 +22,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS=
>
> DIRNAME="$tmpdir/list-probes-module-usdt.$$.$RANDOM"
> diff --git a/test/unittest/dtrace-util/tst.ListProbesNameUSDT.sh b/test/unittest/dtrace-util/tst.ListProbesNameUSDT.sh
> index 59b8dca5..21e6b841 100755
> --- a/test/unittest/dtrace-util/tst.ListProbesNameUSDT.sh
> +++ b/test/unittest/dtrace-util/tst.ListProbesNameUSDT.sh
> @@ -22,7 +22,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS=
>
> DIRNAME="$tmpdir/list-probes-name-usdt.$$.$RANDOM"
> diff --git a/test/unittest/dtrace-util/tst.ListProbesProviderUSDT.sh b/test/unittest/dtrace-util/tst.ListProbesProviderUSDT.sh
> index 64fc185d..4d325386 100755
> --- a/test/unittest/dtrace-util/tst.ListProbesProviderUSDT.sh
> +++ b/test/unittest/dtrace-util/tst.ListProbesProviderUSDT.sh
> @@ -22,7 +22,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS=
>
> DIRNAME="$tmpdir/list-probes-provider-usdt.$$.$RANDOM"
> diff --git a/test/unittest/misc/tst.include.sh b/test/unittest/misc/tst.include.sh
> index 9d9989a3..738b4794 100755
> --- a/test/unittest/misc/tst.include.sh
> +++ b/test/unittest/misc/tst.include.sh
> @@ -13,7 +13,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS=
>
> DIR="$tmpdir/misc-include.$$.$RANDOM"
> diff --git a/test/unittest/options/tst.ctypes.sh b/test/unittest/options/tst.ctypes.sh
> index 30a6c9b1..19c76792 100755
> --- a/test/unittest/options/tst.ctypes.sh
> +++ b/test/unittest/options/tst.ctypes.sh
> @@ -14,14 +14,14 @@ if [ ! -r $tmpdir/ctypes.ctf ]; then
> exit 1
> fi
>
> -if objdump --help | grep ctf >/dev/null; then
> - objcopy --add-section=.ctf=$tmpdir/ctypes.ctf /bin/true $tmpdir/ctypes.o
> +if ${OBJDUMP:-objdump} --help | grep ctf >/dev/null; then
> + ${OBJCOPY:-objcopy} --add-section=.ctf=$tmpdir/ctypes.ctf /bin/true $tmpdir/ctypes.o
> if [ $? -ne 0 ]; then
> echo "ERROR: Failed to create ELF object from ctypes.ctf"
> exit 1
> fi
>
> - objdump --ctf=.ctf $tmpdir/ctypes.o | \
> + ${OBJDUMP:-objdump} --ctf=.ctf $tmpdir/ctypes.o | \
> gawk '/CTF_VERSION/ { found = 1; next; }
> found && $1 ~ /0x[0-9A-Fa-f]+:/ { cnt++; next; }
> END { print "C CTF data" (found ? " " : " NOT ") "found";
> diff --git a/test/unittest/options/tst.dtypes.sh b/test/unittest/options/tst.dtypes.sh
> index 441de098..658793c7 100755
> --- a/test/unittest/options/tst.dtypes.sh
> +++ b/test/unittest/options/tst.dtypes.sh
> @@ -14,14 +14,14 @@ if [ ! -r $tmpdir/dtypes.ctf ]; then
> exit 1
> fi
>
> -if objdump --help | grep ctf >/dev/null; then
> - objcopy --add-section=.ctf=$tmpdir/dtypes.ctf /bin/true $tmpdir/dtypes.o
> +if ${OBJDUMP:-objdump} --help | grep ctf >/dev/null; then
> + ${OBJCOPY:-objcopy} --add-section=.ctf=$tmpdir/dtypes.ctf /bin/true $tmpdir/dtypes.o
> if [ $? -ne 0 ]; then
> echo "ERROR: Failed to create ELF object from dtypes.ctf"
> exit 1
> fi
>
> - objdump --ctf=.ctf $tmpdir/dtypes.o | \
> + ${OBJDUMP:-objdump} --ctf=.ctf $tmpdir/dtypes.o | \
> gawk '/CTF_VERSION/ { found = 1; next; }
> found && $1 ~ /0x[0-9A-Fa-f]+:/ { cnt++; next; }
> END { print "D CTF data" (found ? " " : " NOT ") "found";
> diff --git a/test/unittest/options/tst.linktype.sh b/test/unittest/options/tst.linktype.sh
> index 564d9b0f..15bc649b 100755
> --- a/test/unittest/options/tst.linktype.sh
> +++ b/test/unittest/options/tst.linktype.sh
> @@ -9,7 +9,7 @@
> # @@nosort
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS=
>
> DIRNAME="$tmpdir/linktype.$$.$RANDOM"
> @@ -61,7 +61,7 @@ function mytest() {
> fi
>
> # report whether the file format is recognized
> - objdump --file-headers prov.o |& gawk '
> + ${OBJDUMP:-objdump} --file-headers prov.o |& gawk '
> /format not recognized/ {
> print "objdump does NOT recognize file format";
> exit(0);
> diff --git a/test/unittest/options/tst.strip.sh b/test/unittest/options/tst.strip.sh
> index 054955fb..1124ccc5 100755
> --- a/test/unittest/options/tst.strip.sh
> +++ b/test/unittest/options/tst.strip.sh
> @@ -7,7 +7,7 @@
> #
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS=
>
> DIRNAME="$tmpdir/strip.$$.$RANDOM"
> @@ -48,7 +48,7 @@ fi
>
> # link with and without -xstrip, dumping the DOF section
>
> -objdump="objdump --full-contents --section=.SUNW_dof prov.o"
> +objdump="${OBJDUMP:-objdump} --full-contents --section=.SUNW_dof prov.o"
>
> $dtrace $dt_flags -G -xstrip -s prov.d test.o
> if [ $? -ne 0 ]; then
> diff --git a/test/unittest/pid/tst.offsets.sh b/test/unittest/pid/tst.offsets.sh
> index cc1a440d..795553b0 100755
> --- a/test/unittest/pid/tst.offsets.sh
> +++ b/test/unittest/pid/tst.offsets.sh
> @@ -85,7 +85,7 @@ fi
> # hot and cold instructions in the function.
> #
>
> -objdump -d a.out | gawk '
> +${OBJDUMP:-objdump} -d a.out | gawk '
> BEGIN {
> pc0 = 0; # First PC of loopfunc()
> pcjump = 0; # PC of the jump
> diff --git a/test/unittest/usdt/tst.allargs.sh b/test/unittest/usdt/tst.allargs.sh
> index 179552b6..3404b62b 100755
> --- a/test/unittest/usdt/tst.allargs.sh
> +++ b/test/unittest/usdt/tst.allargs.sh
> @@ -15,7 +15,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="-std=gnu89 $test_cppflags"
> LDFLAGS="$test_ldflags"
>
> diff --git a/test/unittest/usdt/tst.badguess.sh b/test/unittest/usdt/tst.badguess.sh
> index b6ff9e23..45044c32 100755
> --- a/test/unittest/usdt/tst.badguess.sh
> +++ b/test/unittest/usdt/tst.badguess.sh
> @@ -11,7 +11,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="$test_cppflags"
> LDFLAGS="$test_ldflags"
>
> diff --git a/test/unittest/usdt/tst.dlclose1.sh b/test/unittest/usdt/tst.dlclose1.sh
> index a6bad02b..a62da006 100755
> --- a/test/unittest/usdt/tst.dlclose1.sh
> +++ b/test/unittest/usdt/tst.dlclose1.sh
> @@ -29,7 +29,7 @@
> # The second should not.
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS=
>
> DIRNAME="$tmpdir/usdt-dlclose1.$$.$RANDOM"
> diff --git a/test/unittest/usdt/tst.dlclose2.sh b/test/unittest/usdt/tst.dlclose2.sh
> index 907685a6..1f7064ad 100755
> --- a/test/unittest/usdt/tst.dlclose2.sh
> +++ b/test/unittest/usdt/tst.dlclose2.sh
> @@ -15,7 +15,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS=
>
> DIRNAME="$tmpdir/usdt-dlclose2.$$.$RANDOM"
> diff --git a/test/unittest/usdt/tst.dlclose3.sh b/test/unittest/usdt/tst.dlclose3.sh
> index 0b70906f..f65ba4e6 100755
> --- a/test/unittest/usdt/tst.dlclose3.sh
> +++ b/test/unittest/usdt/tst.dlclose3.sh
> @@ -21,7 +21,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS=
>
> DIRNAME="$tmpdir/usdt-dlclose3.$$.$RANDOM"
> diff --git a/test/unittest/usdt/tst.eliminate.sh b/test/unittest/usdt/tst.eliminate.sh
> index e74896bb..b0174fca 100755
> --- a/test/unittest/usdt/tst.eliminate.sh
> +++ b/test/unittest/usdt/tst.eliminate.sh
> @@ -16,7 +16,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="$test_cppflags"
> LDFLAGS="$test_ldflags"
>
> @@ -71,13 +71,13 @@ if [ $? -ne 0 ]; then
> exit 1
> fi
>
> -nm test.o | grep \$dtrace > /dev/null
> +${NM:-nm} test.o | grep \$dtrace > /dev/null
> if [ $? -ne 0 ]; then
> echo "no temporary symbols in the object file" >& 2
> exit 1
> fi
>
> -nm test | grep \$dtrace > /dev/null
> +${NM:-nm} test | grep \$dtrace > /dev/null
> if [ $? -eq 0 ]; then
> echo "failed to eliminate temporary symbols" >& 2
> exit 1
> diff --git a/test/unittest/usdt/tst.enabled.sh b/test/unittest/usdt/tst.enabled.sh
> index 4cd1eccd..d444a1fd 100755
> --- a/test/unittest/usdt/tst.enabled.sh
> +++ b/test/unittest/usdt/tst.enabled.sh
> @@ -11,7 +11,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="$test_cppflags"
> LDFLAGS="$test_ldflags"
>
> diff --git a/test/unittest/usdt/tst.enabled2.sh b/test/unittest/usdt/tst.enabled2.sh
> index 1732085e..7d7648fa 100755
> --- a/test/unittest/usdt/tst.enabled2.sh
> +++ b/test/unittest/usdt/tst.enabled2.sh
> @@ -15,7 +15,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="$test_cppflags"
> LDFLAGS="$test_ldflags"
>
> diff --git a/test/unittest/usdt/tst.entryreturn.sh b/test/unittest/usdt/tst.entryreturn.sh
> index 84af9672..3c0cba9a 100755
> --- a/test/unittest/usdt/tst.entryreturn.sh
> +++ b/test/unittest/usdt/tst.entryreturn.sh
> @@ -13,7 +13,7 @@ fi
> # @@xfail: dtv2, no wildcard usdt probes yet
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="$test_cppflags"
> LDFLAGS="$test_ldflags"
>
> diff --git a/test/unittest/usdt/tst.exec-dof-replacement.sh b/test/unittest/usdt/tst.exec-dof-replacement.sh
> index 6d547cce..191f749f 100755
> --- a/test/unittest/usdt/tst.exec-dof-replacement.sh
> +++ b/test/unittest/usdt/tst.exec-dof-replacement.sh
> @@ -14,7 +14,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="$test_cppflags"
> LDFLAGS="$test_ldflags"
>
> diff --git a/test/unittest/usdt/tst.execstack.sh b/test/unittest/usdt/tst.execstack.sh
> index e7b59105..75586dfb 100755
> --- a/test/unittest/usdt/tst.execstack.sh
> +++ b/test/unittest/usdt/tst.execstack.sh
> @@ -11,11 +11,11 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="$test_cppflags"
> LDFLAGS="$test_ldflags"
> -OBJDUMP=/usr/bin/objdump
> -READELF=/usr/bin/readelf
> +OBJDUMP=${OBJDUMP:-/usr/bin/objdump}
> +READELF=${READELF:-/usr/bin/readelf}
>
> DIRNAME="$tmpdir/usdt-execstack.$$.$RANDOM"
> mkdir -p $DIRNAME
> diff --git a/test/unittest/usdt/tst.fork.sh b/test/unittest/usdt/tst.fork.sh
> index 9b2b372a..75cf99fd 100755
> --- a/test/unittest/usdt/tst.fork.sh
> +++ b/test/unittest/usdt/tst.fork.sh
> @@ -12,7 +12,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="$test_cppflags"
> LDFLAGS="$test_ldflags"
>
> diff --git a/test/unittest/usdt/tst.guess32.sh b/test/unittest/usdt/tst.guess32.sh
> index 7a130e17..8ae4fb00 100755
> --- a/test/unittest/usdt/tst.guess32.sh
> +++ b/test/unittest/usdt/tst.guess32.sh
> @@ -11,7 +11,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="$test_cppflags"
> LDFLAGS="$test_ldflags"
>
> diff --git a/test/unittest/usdt/tst.guess64.sh b/test/unittest/usdt/tst.guess64.sh
> index 23b7a241..1141d5e4 100755
> --- a/test/unittest/usdt/tst.guess64.sh
> +++ b/test/unittest/usdt/tst.guess64.sh
> @@ -11,7 +11,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="$test_cppflags"
> LDFLAGS="$test_ldflags"
>
> diff --git a/test/unittest/usdt/tst.header.sh b/test/unittest/usdt/tst.header.sh
> index c5e411be..05813c1e 100755
> --- a/test/unittest/usdt/tst.header.sh
> +++ b/test/unittest/usdt/tst.header.sh
> @@ -11,7 +11,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="$test_cppflags"
> LDFLAGS="$test_ldflags"
>
> diff --git a/test/unittest/usdt/tst.lingering.sh b/test/unittest/usdt/tst.lingering.sh
> index 079acb75..d1a1b03c 100755
> --- a/test/unittest/usdt/tst.lingering.sh
> +++ b/test/unittest/usdt/tst.lingering.sh
> @@ -14,7 +14,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="$test_cppflags"
> LDFLAGS="$test_ldflags"
>
> diff --git a/test/unittest/usdt/tst.link-idempotence.sh b/test/unittest/usdt/tst.link-idempotence.sh
> index 643ba10c..62f2a518 100755
> --- a/test/unittest/usdt/tst.link-idempotence.sh
> +++ b/test/unittest/usdt/tst.link-idempotence.sh
> @@ -11,7 +11,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="$test_cppflags"
> LDFLAGS="$test_ldflags"
>
> diff --git a/test/unittest/usdt/tst.linkpriv.sh b/test/unittest/usdt/tst.linkpriv.sh
> index 2c89f5d4..0e95dcac 100755
> --- a/test/unittest/usdt/tst.linkpriv.sh
> +++ b/test/unittest/usdt/tst.linkpriv.sh
> @@ -11,7 +11,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="-std=gnu99 $test_cppflags"
> LDFLAGS="$test_ldflags"
>
> diff --git a/test/unittest/usdt/tst.linkunpriv.sh b/test/unittest/usdt/tst.linkunpriv.sh
> index 9ef38639..1775db82 100755
> --- a/test/unittest/usdt/tst.linkunpriv.sh
> +++ b/test/unittest/usdt/tst.linkunpriv.sh
> @@ -13,7 +13,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="$test_cppflags"
>
> DIRNAME="$tmpdir/usdt-linkunpriv.$$.$RANDOM"
> diff --git a/test/unittest/usdt/tst.manyprobes.sh b/test/unittest/usdt/tst.manyprobes.sh
> index c0deb8df..080d9cda 100755
> --- a/test/unittest/usdt/tst.manyprobes.sh
> +++ b/test/unittest/usdt/tst.manyprobes.sh
> @@ -11,7 +11,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="$test_cppflags"
> LDFLAGS="$test_ldflags"
> DIRNAME="$tmpdir/usdt-manyprobes.$$.$RANDOM"
> diff --git a/test/unittest/usdt/tst.manyprocs.sh b/test/unittest/usdt/tst.manyprocs.sh
> index 58550302..05cc8717 100755
> --- a/test/unittest/usdt/tst.manyprocs.sh
> +++ b/test/unittest/usdt/tst.manyprocs.sh
> @@ -14,7 +14,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="$test_cppflags"
> LDFLAGS="$test_ldflags"
>
> diff --git a/test/unittest/usdt/tst.multiple.sh b/test/unittest/usdt/tst.multiple.sh
> index 440a7d7b..e6eab3e5 100755
> --- a/test/unittest/usdt/tst.multiple.sh
> +++ b/test/unittest/usdt/tst.multiple.sh
> @@ -11,7 +11,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="$test_cppflags"
> LDFLAGS="$test_ldflags"
>
> diff --git a/test/unittest/usdt/tst.multitrace.sh b/test/unittest/usdt/tst.multitrace.sh
> index 262c7828..b73dd830 100755
> --- a/test/unittest/usdt/tst.multitrace.sh
> +++ b/test/unittest/usdt/tst.multitrace.sh
> @@ -14,7 +14,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="$test_cppflags"
> LDFLAGS="$test_ldflags"
>
> diff --git a/test/unittest/usdt/tst.onlyenabled.sh b/test/unittest/usdt/tst.onlyenabled.sh
> index d3487834..8d84e3ec 100755
> --- a/test/unittest/usdt/tst.onlyenabled.sh
> +++ b/test/unittest/usdt/tst.onlyenabled.sh
> @@ -11,7 +11,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="$test_cppflags"
> LDFLAGS="$test_ldflags"
>
> diff --git a/test/unittest/usdt/tst.pie.sh b/test/unittest/usdt/tst.pie.sh
> index 0d62c376..4ddae43e 100755
> --- a/test/unittest/usdt/tst.pie.sh
> +++ b/test/unittest/usdt/tst.pie.sh
> @@ -11,7 +11,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="-fno-inline -pie $test_cppflags"
> LDFLAGS="-pie $test_ldflags"
>
> diff --git a/test/unittest/usdt/tst.reeval.sh b/test/unittest/usdt/tst.reeval.sh
> index 371eee3d..9d49755a 100755
> --- a/test/unittest/usdt/tst.reeval.sh
> +++ b/test/unittest/usdt/tst.reeval.sh
> @@ -12,7 +12,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="$test_cppflags"
> LDFLAGS="$test_ldflags"
>
> diff --git a/test/unittest/usdt/tst.static.sh b/test/unittest/usdt/tst.static.sh
> index 81b3ba04..d6dd4a7b 100755
> --- a/test/unittest/usdt/tst.static.sh
> +++ b/test/unittest/usdt/tst.static.sh
> @@ -11,7 +11,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="$test_cppflags"
> LDFLAGS="$test_ldflags"
>
> diff --git a/test/unittest/usdt/tst.static2.sh b/test/unittest/usdt/tst.static2.sh
> index 115a9551..b7b1be16 100755
> --- a/test/unittest/usdt/tst.static2.sh
> +++ b/test/unittest/usdt/tst.static2.sh
> @@ -15,7 +15,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="$test_cppflags"
> LDFLAGS="$test_ldflags"
>
> diff --git a/test/unittest/usdt/tst.user.sh b/test/unittest/usdt/tst.user.sh
> index 30513acc..30e897e3 100755
> --- a/test/unittest/usdt/tst.user.sh
> +++ b/test/unittest/usdt/tst.user.sh
> @@ -13,7 +13,7 @@ if [ $# != 1 ]; then
> fi
>
> dtrace=$1
> -CC=/usr/bin/gcc
> +CC=${CC:-/usr/bin/gcc}
> CFLAGS="$test_cppflags"
> LDFLAGS="$test_ldflags"
>
> diff --git a/test/utils/workload_analyze_loop.sh b/test/utils/workload_analyze_loop.sh
> index 3bbadf78..1fb8c0b2 100755
> --- a/test/utils/workload_analyze_loop.sh
> +++ b/test/utils/workload_analyze_loop.sh
> @@ -13,7 +13,7 @@ if [ ! -e $prog ]; then
> exit 1
> fi
>
> -objdump -d $prog | gawk -v myarch=$(uname -m) '
> +${OBJDUMP:-objdump} -d $prog | gawk -v myarch=$(uname -m) '
> # decide whether to track instructions (which we number n = 1, 2, 3, ...) or not (n < 0)
> # specifically, do not track instructions until we find the disassembly for <main>
> BEGIN { n = -1; }
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 4/4] test: allow overriding CC, OBJCOPY, OBJDUMP, NM, ...
2025-02-25 22:26 ` Eugene Loh
@ 2025-02-26 0:09 ` Sam James
2025-05-09 4:59 ` Eugene Loh
0 siblings, 1 reply; 12+ messages in thread
From: Sam James @ 2025-02-26 0:09 UTC (permalink / raw)
To: Eugene Loh; +Cc: dtrace
Eugene Loh <eugene.loh@oracle.com> writes:
> I'm open to signing off on this patch, but I have some questions:
Thanks for the reviews. I'm just replying to let you know it may be a
little while before I can handle answering & respinning.
> [...]
sam
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 4/4] test: allow overriding CC, OBJCOPY, OBJDUMP, NM, ...
2025-02-26 0:09 ` Sam James
@ 2025-05-09 4:59 ` Eugene Loh
2025-05-10 1:50 ` Sam James
0 siblings, 1 reply; 12+ messages in thread
From: Eugene Loh @ 2025-05-09 4:59 UTC (permalink / raw)
To: Sam James; +Cc: dtrace
I went ahead and rebased the patch on origin/dev, incorporated my
suggestions, and ran the test suite to check things out. I'll post a v2
of the patch momentarily. I hope that's okay. I don't mean to step on
your toes, but the patch has so many little changes that it'd be nice to
get these changes made and then adhere to the new practice.
On 2/25/25 19:09, Sam James wrote:
> Eugene Loh <eugene.loh@oracle.com> writes:
>
>> I'm open to signing off on this patch, but I have some questions:
> Thanks for the reviews. I'm just replying to let you know it may be a
> little while before I can handle answering & respinning.
>
>> [...]
> sam
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 4/4] test: allow overriding CC, OBJCOPY, OBJDUMP, NM, ...
2025-05-09 4:59 ` Eugene Loh
@ 2025-05-10 1:50 ` Sam James
0 siblings, 0 replies; 12+ messages in thread
From: Sam James @ 2025-05-10 1:50 UTC (permalink / raw)
To: Eugene Loh; +Cc: dtrace
Eugene Loh <eugene.loh@oracle.com> writes:
> I went ahead and rebased the patch on origin/dev, incorporated my
> suggestions, and ran the test suite to check things out. I'll post a
> v2 of the patch momentarily. I hope that's okay. I don't mean to
> step on your toes, but the patch has so many little changes that it'd
> be nice to get these changes made and then adhere to the new practice.
Please do -- and thank you!
>
> On 2/25/25 19:09, Sam James wrote:
>> Eugene Loh <eugene.loh@oracle.com> writes:
>>
>>> I'm open to signing off on this patch, but I have some questions:
>> Thanks for the reviews. I'm just replying to let you know it may be a
>> little while before I can handle answering & respinning.
>>
>>> [...]
>> sam
>>
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2025-05-10 1:50 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-24 2:49 [PATCH 0/4] Further test cleanups Sam James
2025-01-24 2:49 ` [PATCH 1/4] test: fix 'harness' typo Sam James
2025-02-25 18:28 ` Eugene Loh
2025-01-24 2:49 ` [PATCH 2/4] test: fix bashism in tst.bitfield-offset.x Sam James
2025-02-25 21:29 ` Eugene Loh
2025-01-24 2:49 ` [PATCH 3/4] test: finalize porting small awk stragglers to gawk Sam James
2025-02-25 21:39 ` Eugene Loh
2025-01-24 2:49 ` [PATCH 4/4] test: allow overriding CC, OBJCOPY, OBJDUMP, NM, Sam James
2025-02-25 22:26 ` Eugene Loh
2025-02-26 0:09 ` Sam James
2025-05-09 4:59 ` Eugene Loh
2025-05-10 1:50 ` Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox