[DTrace-devel] [oracle/dtrace-utils] c92966: Extend a few test timeouts

euloh noreply at github.com
Fri Apr 22 06:59:25 UTC 2022


  Branch: refs/heads/dev
  Home:   https://github.com/oracle/dtrace-utils
  Commit: c92966dc98478ad791378302ae2332a079508e2d
      https://github.com/oracle/dtrace-utils/commit/c92966dc98478ad791378302ae2332a079508e2d
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2022-04-20 (Wed, 20 Apr 2022)

  Changed paths:
    M test/unittest/actions/exit/tst.kill.sh
    M test/unittest/dtrace-util/tst.ListProbesNameEmpty.sh
    M test/unittest/providers/tst.dtrace_cleanup.sh

  Log Message:
  -----------
  Extend a few test timeouts

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


  Commit: 9f03c5a2e027ed6d9b3c70c244d4fac8d45f7218
      https://github.com/oracle/dtrace-utils/commit/9f03c5a2e027ed6d9b3c70c244d4fac8d45f7218
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2022-04-21 (Thu, 21 Apr 2022)

  Changed paths:
    M libdtrace/dt_dis.c
    M libdtrace/dt_dis.h

  Log Message:
  -----------
  Add dt_dis_insn() to disassemble a single instruction

Mostly, move BPF ops out of dt_dis_difo(), so that they can
be used for other functions as well.

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


  Commit: ffa26a7235af58f1aa0381355c89e43446aee46a
      https://github.com/oracle/dtrace-utils/commit/ffa26a7235af58f1aa0381355c89e43446aee46a
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2022-04-21 (Thu, 21 Apr 2022)

  Changed paths:
    M test/triggers/Build
    A test/triggers/futex.c
    M test/unittest/fbtprovider/tst.entry.d
    M test/unittest/fbtprovider/tst.entryargs.d
    M test/unittest/fbtprovider/tst.tls.d
    M test/unittest/fbtprovider/tst.tls2.d

  Log Message:
  -----------
  Clean up fbtprovider tests

Specifically, add a futex trigger to the test suite and have tests
match the trigger pid rather than the dtrace pid.

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


  Commit: ff9a0a6724fc1134de4de51775c2fd9a61169b51
      https://github.com/oracle/dtrace-utils/commit/ff9a0a6724fc1134de4de51775c2fd9a61169b51
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2022-04-21 (Thu, 21 Apr 2022)

  Changed paths:
    M INCOMPATIBILITIES

  Log Message:
  -----------
  Rename members in dtrace_syminfo_t

In patch "6f930f0341a6 Add support for BPF identifiers, functions, and maps"
members of dtrace_syminfo_t were renamed.  Complete the remaining changes,
in INCOMPATIBILITIES.  The required changes in tst.symbols.c are the subject
of another patch.  Note that struct dt_symbol still has a member named
dts_name that does not require renaming.

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


  Commit: 80a539ae86535d681fc54151c8dc38c1b43f4443
      https://github.com/oracle/dtrace-utils/commit/80a539ae86535d681fc54151c8dc38c1b43f4443
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2022-04-21 (Thu, 21 Apr 2022)

  Changed paths:
    R test/demo/intro/test.options
    R test/unittest/aggs/test.options
    M test/unittest/aggs/tst.aggmod_full.sh
    M test/unittest/aggs/tst.aggmod_full2.sh
    M test/unittest/aggs/tst.llquantincr.d
    M test/unittest/aggs/tst.llquantize.d
    M test/unittest/aggs/tst.llquantneg.d
    M test/unittest/aggs/tst.llquantstep.d
    M test/unittest/funcs/substr/tst.substrminate.d
    M test/unittest/speculation/tst.SingleCPU.d
    A test/unittest/tick-n/tst.tickquality-100ms.d
    A test/unittest/tick-n/tst.tickquality-10ms.d

  Log Message:
  -----------
  test: Account for unreliable tick firing

As mentioned in commit 3e380b35cbcc "Change trigger for rand() test",
the tick-* probe is unreliable on some kernels, depending on how their
timers subsystem is configured (CONFIG*_HZ*).  Some tests depend on
many probe firings and use tick-* probes.  They are susceptible to
taking unnecessarily long and timing out rather than passing.  Such
intermittent failures have been observed.

Fix tests accordingly.  Specifically, one add bogus-ioctl as a trigger
and then use syscall::ioctl:entry as the probe to fire repeatedly.

For tst.substrminate.d, simply cut down the excessive iteration count.
For the time being, this test XFAILs anyhow.

Add some tick quality-of-service tests to expose the underlying
problem.  For now, mark these tests as "unstable".

Commit
c25036d6f2aa "runtest: automatic reinvocation of specific erratic tests"
introduced the reinvocation of certain failing tests (test/unittest/aggs
and test/demo/intro), though the exact problems are not described.  A
quick survey of some recent test runs indicates that reinvocations are
only used for tests that are fixed with the current patch.  In particular,
reinvocations were observed only for aggs tests with strenuous dependence
on the profile provider.  The demo/intro tests, while not reinvoked in
recent runs, have modest reliance on the profile provider.  If those
tests fail, they can also be reworked.  In short, with the current patch,
remove the reinvocation tags in the test suite.  (The reinvocation
mechanism in runtest.sh can remain untouched for now.)

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


  Commit: 14b51ea1735e2b502cb15491d0b41fb8c36b9db1
      https://github.com/oracle/dtrace-utils/commit/14b51ea1735e2b502cb15491d0b41fb8c36b9db1
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2022-04-21 (Thu, 21 Apr 2022)

  Changed paths:
    M test/unittest/ustack/tst.ustack_profile.r
    M test/unittest/ustack/tst.ustack_profile.r.p

  Log Message:
  -----------
  test: Detect correct libc "start main" frame depending on glibc version

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


  Commit: ebfecdf55e5704fc34a7eab5e1fc86a7c93ed6b3
      https://github.com/oracle/dtrace-utils/commit/ebfecdf55e5704fc34a7eab5e1fc86a7c93ed6b3
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2022-04-21 (Thu, 21 Apr 2022)

  Changed paths:
    M libdtrace/dt_cg.c
    A test/unittest/funcs/tst.getmajor.d
    A test/unittest/funcs/tst.getmajor.r
    A test/unittest/funcs/tst.getminor.d
    A test/unittest/funcs/tst.getminor.r

  Log Message:
  -----------
  Add support for getmajor() and getminor() subroutines

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


  Commit: 51494091c05e0c8a47dc9ed9a48f593c1d143610
      https://github.com/oracle/dtrace-utils/commit/51494091c05e0c8a47dc9ed9a48f593c1d143610
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2022-04-21 (Thu, 21 Apr 2022)

  Changed paths:
    M bpf/Build
    A bpf/progenyof.S
    M libdtrace/dt_bpf.h
    M libdtrace/dt_cc.c
    M libdtrace/dt_cg.c
    M libdtrace/dt_dlibs.c
    R test/unittest/funcs/err.D_FUNC_UNDEF.progenyofbad1.d
    R test/unittest/funcs/err.D_FUNC_UNDEF.progenyofbad1.r
    A test/unittest/funcs/err.D_PROTO_ARG.progenyofbad1.d
    A test/unittest/funcs/err.D_PROTO_ARG.progenyofbad1.r
    A test/unittest/funcs/err.D_PROTO_ARG.progenyofbad2.d
    A test/unittest/funcs/err.D_PROTO_ARG.progenyofbad2.r
    R test/unittest/funcs/err.D_PROTO_LEN.progenyofbad2.d
    R test/unittest/funcs/err.D_PROTO_LEN.progenyofbad2.r
    A test/unittest/funcs/err.D_PROTO_LEN.progenyoftoofew.d
    A test/unittest/funcs/err.D_PROTO_LEN.progenyoftoofew.r
    A test/unittest/funcs/err.D_PROTO_LEN.progenyoftoomany.d
    A test/unittest/funcs/err.D_PROTO_LEN.progenyoftoomany.r
    M test/unittest/funcs/tst.progenyof.d

  Log Message:
  -----------
  Add support for progenyof() subroutine

Also, clean up err*progeny*.d tests.  In particular,

*)  err.D_FUNC_UNDEF.progenyofbad1.d was failing because it had always
    been wrong:  the test was mislabeled.  The test was introduced in patch
        c17a42e11dba "Add the OpenSolaris dtrace testsuite."
    with a .r results file that explicitly indicates D_PROTO_LEN,
    even though the test name expects D_FUNC_UNDEF.  However, runtest.sh
    did not check the error tag.  Though runtest.sh was eventually fixed,
    the test fail was simply dismissed XFAIL.

*)  err.D_PROTO_LEN.progenyofbad2.d was passing, but for reasons unrelated
    to progenyof() or its argument checks.  The test used progenyof(trace())
    and therefore did not test progenyof() at all;  rather, it failed on
    trace(), which is missing its argument.

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


  Commit: 160341afd2116d851e63847c5300065fdacab675
      https://github.com/oracle/dtrace-utils/commit/160341afd2116d851e63847c5300065fdacab675
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2022-04-21 (Thu, 21 Apr 2022)

  Changed paths:
    M bpf/get_bvar.c
    M libdtrace/dt_bpf.c
    M libdtrace/dt_bpf.h
    M libdtrace/dt_cc.c
    M libdtrace/dt_dlibs.c
    M libdtrace/dt_state.h

  Log Message:
  -----------
  Pass load-time constants to BPF programs in a consistent way

In bpf/, there are .c and .S programs that are cross-compiled at
build time, but they sometimes rely on constants that are not known
until the programs are loaded.  Two ways were being used to provide
those constants.  One was to put them in the state map.  Another was
to set the values during relocation.

Use one consistent method for providing these constants.

Specifically, set the constants during relocation rather than using
the state map:

*)  These constants do not change during execution.

*)  Avoiding a map lookup saves a function call, saving BPF
    instructions, simplifying BPF programming, and reducing
    register pressure.

*)  The constants' values are made known to the BPF verifier.

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


  Commit: 0cccfc6f2648adf6d5a96a83f4e3cf842ffa7ce2
      https://github.com/oracle/dtrace-utils/commit/0cccfc6f2648adf6d5a96a83f4e3cf842ffa7ce2
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2022-04-21 (Thu, 21 Apr 2022)

  Changed paths:
    A test/unittest/offsetof/err.D_SYNTAX.badmemb.d
    A test/unittest/offsetof/err.D_SYNTAX.badmemb.r
    R test/unittest/offsetof/err.D_UNKNOWN.badmemb.d
    R test/unittest/offsetof/err.D_UNKNOWN.badmemb.r

  Log Message:
  -----------
  test: Fix error tag in test name

A number of err.D_*.d tests had the wrong error tag in the test
name, which escaped detection for a long time because runtest.sh
did not check the error tags.  A number of such cases were fixed.
This appears to be the last case.  The test encounters D_SYNTAX,
both in legacy DTrace on Linux and in the current version.  Rename
the test appropriately.

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


  Commit: 4e5539c98e52152175d47631a56a4aa64b302bef
      https://github.com/oracle/dtrace-utils/commit/4e5539c98e52152175d47631a56a4aa64b302bef
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2022-04-21 (Thu, 21 Apr 2022)

  Changed paths:
    R test/unittest/dif/tst.DisSubrNames.sh
    R test/unittest/dif/tst.DisVarNames.r
    R test/unittest/dif/tst.DisVarNames.sh
    A test/unittest/disasm/tst.ann-sub.sh
    A test/unittest/disasm/tst.ann-tvar.r
    A test/unittest/disasm/tst.ann-tvar.sh
    A test/unittest/disasm/tst.ann-var.r
    A test/unittest/disasm/tst.ann-var.sh
    R test/unittest/variables/tvar/tst.dis-ann.r
    R test/unittest/variables/tvar/tst.dis-ann.sh

  Log Message:
  -----------
  test: Consolidate disassembly-annotation tests to new directory

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


  Commit: f72a4ff966dd0b3b122c62f7862fcd61bfcc1ed3
      https://github.com/oracle/dtrace-utils/commit/f72a4ff966dd0b3b122c62f7862fcd61bfcc1ed3
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2022-04-21 (Thu, 21 Apr 2022)

  Changed paths:
    M bpf/substr.S
    M libdtrace/dt_cg.c

  Log Message:
  -----------
  Minor edits

Jump to Lempty for zero-length source strings.  Remove dead code
claiming to reuse register for dnp->dn_reg.

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


  Commit: 192d12cc4db22d6767b2a1f39779aee5b8b58dd7
      https://github.com/oracle/dtrace-utils/commit/192d12cc4db22d6767b2a1f39779aee5b8b58dd7
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2022-04-22 (Fri, 22 Apr 2022)

  Changed paths:
    M bpf/Build
    A bpf/mutex_owned.S
    A bpf/mutex_owner.S
    A bpf/rw_iswriter.S
    A bpf/rw_read_held.S
    A bpf/rw_write_held.S
    M libdtrace/dt_bpf.h
    M libdtrace/dt_cc.c
    M libdtrace/dt_cg.c
    M libdtrace/dt_dlibs.c
    A test/unittest/funcs/err.D_PROTO_ARG.mtabadarg.d
    A test/unittest/funcs/err.D_PROTO_ARG.mtabadarg.r
    M test/unittest/funcs/err.D_PROTO_LEN.motoofew.d
    A test/unittest/funcs/err.D_PROTO_LEN.motoofew.r
    M test/unittest/funcs/err.D_PROTO_LEN.motoomany.d
    M test/unittest/funcs/err.D_PROTO_LEN.motoomany.r
    R test/unittest/funcs/err.D_PROTO_LEN.mtabadarg.d
    R test/unittest/funcs/err.D_PROTO_LEN.mtabadarg.r
    M test/unittest/funcs/err.D_PROTO_LEN.mtatoofew.d
    A test/unittest/funcs/err.D_PROTO_LEN.mtatoofew.r
    M test/unittest/funcs/err.D_PROTO_LEN.mtatoomany.d
    M test/unittest/funcs/err.D_PROTO_LEN.mtatoomany.r
    M test/unittest/funcs/tst.mutex_owned.d
    M test/unittest/funcs/tst.mutex_owner.d
    M test/unittest/funcs/tst.mutex_type_adaptive.d
    M test/unittest/funcs/tst.mutex_type_spin.d
    A test/unittest/funcs/tst.rw_.r
    A test/unittest/funcs/tst.rw_.sh
    A test/unittest/funcs/tst.rw_.x

  Log Message:
  -----------
  Add support for mutex-related subroutines

Implement the relevant subroutines.  Clean up the tests.

A few tests were broken in ways that were not being detected:
early on because runtest.sh was not checking error tags and later
because the tests were marked XFAIL.  Clean these tests up.

Changes include not using kmutex_t any longer in the tests.  This
type was not recognized even in legacy DTrace.  The documentation
needs a corresponding update.

Similarly, probe lockstat:genunix:mutex_enter:adaptive-acquire was
not recognized, even by legacy DTrace, and it was not needed for the
tests in question.

There were no rw_* tests.  One has been added, but it remains
unclear how stable the test is -- specifically, whether enough
write-lock events are generated.

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


  Commit: bbf2ebd36b8e05d0996583631a6dd95b8871f10a
      https://github.com/oracle/dtrace-utils/commit/bbf2ebd36b8e05d0996583631a6dd95b8871f10a
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2022-04-22 (Fri, 22 Apr 2022)

  Changed paths:
    M test/unittest/dtrace-util/tst.ZeroFunctionProbes.r
    M test/unittest/dtrace-util/tst.ZeroFunctionProbes.sh
    M test/unittest/dtrace-util/tst.ZeroProviderProbes.r
    M test/unittest/dtrace-util/tst.ZeroProviderProbes.sh

  Log Message:
  -----------
  test: Handle concurrent firing probes with exit()

A few tests have profile probes that emit an expected message and then
exit.  The problem with this is that it is possible for two such probes,
on different CPUs, to fire "concurrently."  DTrace says that when exit()
occurs, other actions already in progress on other CPUs complete.

Fix the tests to allow for more than one instance of the expected
message.  Note that this is a race condition.  The problem being fixed
was observed only intermittently.  In some test runs, the failure was
seen only 3% of the time with tst.ZeroProviderProbes.sh and only 0.06%
of the time with tst.ZeroFunctionProbes.sh.

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


  Commit: b27bdde9d6492e7547e2d517a4026a4acccae5f8
      https://github.com/oracle/dtrace-utils/commit/b27bdde9d6492e7547e2d517a4026a4acccae5f8
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2022-04-22 (Fri, 22 Apr 2022)

  Changed paths:
    M libdtrace/dt_cg.c

  Log Message:
  -----------
  Rename subroutine helper (arg to tstring)

When the code generator sets up a call to a precompiled BPF function,
it emits a lot of boilerplate code.  The implementations of DTrace
subroutines typically make such calls.  So there is potential for
much code reuse.

The "path" helper is one such attempt.  Since its usefulness is
broader than just for a "path name" argument, rename this helper to
suggest its broader usage more clearly.

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


  Commit: 489c74576b19ddbacc42f4c0eb5218b65e7cdb71
      https://github.com/oracle/dtrace-utils/commit/489c74576b19ddbacc42f4c0eb5218b65e7cdb71
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2022-04-22 (Fri, 22 Apr 2022)

  Changed paths:
    M bpf/lltostr.S
    M libdtrace/dt_cg.c

  Log Message:
  -----------
  Change lltostr() to take advantage of tstring1 helper

Switch the order of arguments in bpf/lltostr.S to accommodate
this change.

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


  Commit: 14c5158963ad7c924feec363dca50481e75366a0
      https://github.com/oracle/dtrace-utils/commit/14c5158963ad7c924feec363dca50481e75366a0
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2022-04-22 (Fri, 22 Apr 2022)

  Changed paths:
    M bpf/Build
    A bpf/inet_ntoa.S
    M libdtrace/dt_cg.c
    M libdtrace/dt_open.c
    M test/unittest/funcs/tst.inet_ntoa.d

  Log Message:
  -----------
  Add support for inet_ntoa() subroutine

For the time being, there is no definition of ipaddr_t, which
traditionally has been defined in the kernel portion of DTrace.  So
for now, the prototype for the subroutine is not string(ipaddr_t*)
but string(void*) and the test defines ipaddr_t itself.

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


  Commit: 58a36b2d3be25d7eca5cb9b312bd248f963906a5
      https://github.com/oracle/dtrace-utils/commit/58a36b2d3be25d7eca5cb9b312bd248f963906a5
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2022-04-22 (Fri, 22 Apr 2022)

  Changed paths:
    R test/unittest/buffering/tst.alignring.d

  Log Message:
  -----------
  test: remove tst.alignring.d

This test produces excessive output, writing 100Ks of lines to runtest.log.
It tests nothing, in that the output is not checked.  Also, it targets ring
buffering, which means something entirely different in the current
implementation than it did in Solaris.

Remove the test.

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


  Commit: 0b57daf92bbc596b5574eb3c55f5ad288180371f
      https://github.com/oracle/dtrace-utils/commit/0b57daf92bbc596b5574eb3c55f5ad288180371f
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2022-04-22 (Fri, 22 Apr 2022)

  Changed paths:
    M test/unittest/variables/bvar/tst.walltimestamp2.r.p

  Log Message:
  -----------
  test: Allow walltimestamp not to progress on successive calls

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


Compare: https://github.com/oracle/dtrace-utils/compare/9cd13c7355d9...0b57daf92bbc



More information about the DTrace-devel mailing list