[DTrace-devel] [oracle/dtrace-utils] aeac9a: Fix dt_print_visit() to compile also on OL7

Nick Alcock noreply at github.com
Wed Jan 31 18:07:09 UTC 2024


  Branch: refs/heads/devel
  Home:   https://github.com/oracle/dtrace-utils
  Commit: aeac9ac3c7a54d52b676eabda2d9f6662c8cdbe8
      https://github.com/oracle/dtrace-utils/commit/aeac9ac3c7a54d52b676eabda2d9f6662c8cdbe8
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-01-30 (Tue, 30 Jan 2024)

  Changed paths:
    M libdtrace/dt_printf.c

  Log Message:
  -----------
  Fix dt_print_visit() to compile also on OL7

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Alan Maguire <alan.maguire at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: bea9dfe41eba67c7f2e01b29cb7d6f6f26c1c344
      https://github.com/oracle/dtrace-utils/commit/bea9dfe41eba67c7f2e01b29cb7d6f6f26c1c344
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-01-30 (Tue, 30 Jan 2024)

  Changed paths:
    M test/unittest/print/tst.print.skb.d
    M test/unittest/print/tst.print.skb.r

  Log Message:
  -----------
  test: Fix tst.print.skb.r

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 42f4bfc1f1f8f2fcd524ac6cc2491581be5132c7
      https://github.com/oracle/dtrace-utils/commit/42f4bfc1f1f8f2fcd524ac6cc2491581be5132c7
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-01-30 (Tue, 30 Jan 2024)

  Changed paths:
    M libdtrace/dt_printf.c
    M test/unittest/print/tst.print.local.trunc.d
    M test/unittest/print/tst.print.local.trunc.r
    A test/unittest/print/tst.print.local.trunc2.d
    A test/unittest/print/tst.print.local.trunc2.r

  Log Message:
  -----------
  print: Fix truncation

The printsize option can be used to limit how much data is reported
by print().  A few corrections are needed.

1)  In dt_print_visit(), we check if offset/NBBY > dv_size.  E.g.,
if a 40-byte limit is set, then an 8-byte record at offset 40 will
be reported.  Change to offset/NBBY >= dv_size.  We do not worry
about the case where the print size ends in the middle of a record.

2)  dt_print_type() sets the size and then calls dt_print_visit().
But dt_print_visit() can also call itself recursively, and in this
case dv_size is not set.  The dv_size values at deeper depths are
garbage.  Have dt_print_visit() set dva2.dt_size.

The existing test for -xprintsize is corrected and a new test,
focused on truncation at deeper depths, is added.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 06eb21821691c333b8917ccd6982d6940333f0b9
      https://github.com/oracle/dtrace-utils/commit/06eb21821691c333b8917ccd6982d6940333f0b9
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-01-30 (Tue, 30 Jan 2024)

  Changed paths:
    M test/unittest/usdt/tst.static2.sh

  Log Message:
  -----------
  test: Add xfail pending binutils fix

This test started to fail with commit 2096fd77
"usdt: remove relocations rather than changing their type to R_*_NONE"

Add an xfail pending a binutils fix to not consider R_*_NONE invalid.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 17b2a47fa3dd5f6eac1628e0983bd84c508e47e7
      https://github.com/oracle/dtrace-utils/commit/17b2a47fa3dd5f6eac1628e0983bd84c508e47e7
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-01-30 (Tue, 30 Jan 2024)

  Changed paths:
    M test/stress/fbtprovider/tst.basic.d
    M test/stress/fbtprovider/tst.return.d
    M test/stress/fbtsafety/tst.basename.d
    M test/stress/fbtsafety/tst.caller.d
    M test/stress/fbtsafety/tst.dirname.d
    M test/stress/fbtsafety/tst.errno.d
    M test/stress/fbtsafety/tst.execname.d
    M test/stress/fbtsafety/tst.gid.d
    M test/stress/fbtsafety/tst.hton.d
    M test/stress/fbtsafety/tst.index.d
    M test/stress/fbtsafety/tst.null.d
    M test/stress/fbtsafety/tst.pid.d
    M test/stress/fbtsafety/tst.ppid.d
    M test/stress/fbtsafety/tst.progenyof.d
    M test/stress/fbtsafety/tst.random.d
    M test/stress/fbtsafety/tst.rw.d
    M test/stress/fbtsafety/tst.stack.d
    M test/stress/fbtsafety/tst.stackdepth.d
    M test/stress/fbtsafety/tst.stddev.d
    M test/stress/fbtsafety/tst.strchr.d
    M test/stress/fbtsafety/tst.strjoin.d
    M test/stress/fbtsafety/tst.strstr.d
    M test/stress/fbtsafety/tst.strtok.d
    M test/stress/fbtsafety/tst.substr.d
    M test/stress/fbtsafety/tst.ucaller.d
    M test/stress/fbtsafety/tst.uid.d
    M test/stress/fbtsafety/tst.unalign.d
    M test/stress/fbtsafety/tst.uregs.d
    M test/stress/fbtsafety/tst.ustack.d
    M test/stress/fbtsafety/tst.ustackdepth.d

  Log Message:
  -----------
  test: Remove XFAIL from many fbt stress tests

These tests started to pass with commit bcf5f82d
"cc, bpf: separate final BPF program creation from linking and loading".

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 4fff0c41e49a1202dcc4ec3748fc68be8604a701
      https://github.com/oracle/dtrace-utils/commit/4fff0c41e49a1202dcc4ec3748fc68be8604a701
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-01-30 (Tue, 30 Jan 2024)

  Changed paths:
    A test/unittest/providers/rawtp/err.lockmem-too-low.r
    M test/unittest/providers/rawtp/err.lockmem-too-low.sh

  Log Message:
  -----------
  test: XFAIL lockmem test if rawtp-arg-type uses CTF

To get rawtp arg types, we rely on CTF.  If CTF info is not available,
we fall back on a "trial and error" method simply for the number of args.
But we signal to the user if the trial-and-error method is failing due
to lockmem limits.

This test checked for that failure mode.  The test was skipped if
lockmem limits are not observed on the test system.

Skip the test also if CTF info *IS* available.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 19d94043fa630817dec140aef95bf4a4c7c4d45c
      https://github.com/oracle/dtrace-utils/commit/19d94043fa630817dec140aef95bf4a4c7c4d45c
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-01-30 (Tue, 30 Jan 2024)

  Changed paths:
    M test/unittest/aggs/tst.negtruncquant.d

  Log Message:
  -----------
  test: Convert tick-* probes to ioctl:entry for tst.negtruncquant.d

Mimic other "test: Convert tick-* probes to ioctl:entry" patches.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 44b67e7610eef0e9ad291e378cf3345ff656d5d0
      https://github.com/oracle/dtrace-utils/commit/44b67e7610eef0e9ad291e378cf3345ff656d5d0
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-01-30 (Tue, 30 Jan 2024)

  Changed paths:
    M test/unittest/options/tst.modpath.r
    M test/unittest/options/tst.modpath.sh
    R test/unittest/options/tst.modpath.x
    A test/unittest/options/tst.modpath.x

  Log Message:
  -----------
  test: Update -xmodpath test

We test -xmodpath by checking that pointing modpath to:
- an empty directory produces "bad" results
- an appropriate symlink reproduces good (default) results

With the addition of a BTF-to-CTF convertor, however, DTrace basically
functions even in the absence of CTF info.

One signature of the convertor, though, is that rawtp-provider args[]
type information will be (void*) regardless of what the actual type is.
Use this signature to verify that -xmodpath is working.

One complication is that a trial-and-error method of getting rawtp args[]
info is used if there is no HAVE_LIBCTF.  In this case, rawtp args[]
types will be uint64_t, even when no -xmodpath is specified.  Skip the
test in this case.

To review:

- If no HAVE_LIBCTF, rawtp args[] type will always be uint64_t.
  Skip the test in this case.

- If HAVE_LIBCTF but -xmodpath points at an empty directory, many
  DTrace features should still work, but rawtp args[] types will
  all be (void*).  Check that -xmodpath=empty produces (void*).

- Under "normal" circumstances, many rawtp args[] types will be
  neither uint64_t nor (void*).  Check such results in the default
  case and when -xmodpath points at a valid CTF archive.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 049dd8b1b9cf2cd45e57385247befb9e10f5a333
      https://github.com/oracle/dtrace-utils/commit/049dd8b1b9cf2cd45e57385247befb9e10f5a333
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-01-30 (Tue, 30 Jan 2024)

  Changed paths:
    M test/unittest/options/err.ctfpath.r
    M test/unittest/options/err.ctfpath.sh

  Log Message:
  -----------
  test: Update -xctfpath test

With commit f86b1e27 "btf: support compilation in older environments",
error messages for a bad -xctfpath depend on HAVE_LIBCTF.  So loosen
the check.  Just check for "Cannot open CTF archive /dev/null".

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 744249d700fcd6b716e9dc8449d2917440959a4f
      https://github.com/oracle/dtrace-utils/commit/744249d700fcd6b716e9dc8449d2917440959a4f
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-01-31 (Wed, 31 Jan 2024)

  Changed paths:
    M GNUmakefile
    M dtrace.spec
    M libdtrace/Build

  Log Message:
  -----------
  spec: support building from RPMs again

We need a way to override the /source and /build suffixes which
/lib/modules/$(uname -r) needs after it to find the kernel
headers, because devel rpms don't use either (things are just
directly in /usr/src/kernels/$(kernel)/, with no suffix).

Introduce KERNELSRCNAME and KERNELBLDNAME which the specfile can
set to nothing to make the RPMs build again.

(As a benefit, this might mean we can be made to build fine
without a source/ link at all, which current upstream kernels
are now doing.  Not tested that yet, though.)

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


Compare: https://github.com/oracle/dtrace-utils/compare/7e159efa0343...744249d700fc



More information about the DTrace-devel mailing list