Files
mercury/tests/debugger/Mercury.options
Zoltan Somogyi 56509009dd Fix some test failures in debug grades.
browser/declarative_oracle.m:
    The code that checks whether the declarative debugger should trust
    a module because it is a standard library module was apparently written
    before any of module in the standard library had submodules, because
    it checked the unqualified name of the module in question against
    the *qualified* module names returned by the mercury_std_library_module
    predicate.

    For a long time after we had submodules such as thread.mvar.m in the
    standard library, this caused no test failures, because our tests
    did not execute code in those submodules. This changed with the breakup
    of io.m. The move of the output_stream_2 predicate from io.m, which
    this code recognized as trusted, to io.stream_ops.m, which it did not,
    caused the declarative debugger to ask questions about the validity
    of calls to it, which the caused the failure of the declarative_debugger/
    all_trusted test case, due to its .inp file containing something other
    than the corresponding answers.

    Fix this for the case of module names of the forms a.b and a.b.c.

library/library.m:
    Add a note to the mercury_std_library_module predicate to update
    the code in declarative_oracle.m if we ever add a library module
    whose fully qualified name has the form a.b.c.d.

tests/debugger/user_event_shallow.exp:
    Update the expected output of this test for some ancient change.

tests/debugger/Mercury.options:
    Specify the optimization level for the user_event_shallow test,
    which eliminates one source of variability in the output.
    Another source is intermodule optimization, which this diff does *not*
    eliminate.

tests/debugger/all_solutions.exp:
tests/debugger/all_solutions.exp2:
tests/debugger/all_solutions.exp3:
tests/debugger/all_solutions.exp4:
tests/debugger/all_solutions.m:
    The output of this test case in debug grades with intermodule optimization
    did not match any of the .exp* files, though it differed from .exp2 only
    in the text of an error message. (The difference was not a bug.)

    Instead of adding this expected output as .exp5, use it to replace
    the .exp3 file. This expected output file could not have been matched
    in the last seven years, because it expects main/2 to be on line 16,
    and that predicate's context has been line 20 since 2015.

    Document the fact that .exp3 is the expected output for debug grade
    bootchecks with intermodule optimization. This documentation changes
    line numbers yet again, so update the line numbers in all the *other*
    .exp* files as well.

tests/declarative_debugger/Mmakefile:
    Fix indentation.
2022-06-26 10:09:48 +10:00

64 lines
3.0 KiB
Plaintext

# The completion test requires mdb to use readline, even though
# the input is not a terminal.
MCFLAGS-completion = --runtime-flags --force-readline
C2INITFLAGS-completion = --runtime-flags --force-readline
# The debugger can't know about type class declarations unless we generate
# the new type of RTTI for them.
MCFLAGS-class_decl = --new-type-class-rtti
# The label_layout test is for a bug that showed up only with --opt-space.
MCFLAGS-label_layout = --opt-space
MCFLAGS-io_tab_goto = --trace-table-io-all
MCFLAGS-no_inline_builtins = --no-inline-builtins
MCFLAGS-poly_io_retry = --trace-table-io-all
MCFLAGS-poly_io_retry2 = --trace-table-io-all
MCFLAGS-print_io_actions = --trace-table-io-all
MCFLAGS-queens_rep = --trace rep
MCFLAGS-scripts = --trace rep
MCFLAGS-shallow = --trace shallow
MCFLAGS-shallow2 = --trace deep
MCFLAGS-tabled_read = --trace-table-io-all
MCFLAGS-tabled_read_unitize = --trace-table-io-all
MCFLAGS-tabled_read_decl = --trace-table-io-all
MCFLAGS-tabled_typeclass = --trace-table-io-all
# By default, we reclaim heap on failure in non-Boehm-gc grades.
# The extra stack slots required for this reclamation cause spurious
# differences from the expected output on the nondet_stack test case.
# The optimization level also affects stack frame sizes.
MCFLAGS-nondet_stack = -O2 --no-reclaim-heap-on-failure
# We test the behavior of comparisons both with and without index predicates.
# The --compare-specialization flag creates index predicates for type
# constructors with three or more alternatives. The optimization level
# is fixed to fix the event numbers in the input script; this is needed
# because one cannot (yet) put breakpoints on unify, compare and index preds.
MCFLAGS-uci = -O2 --compare-specialization 2
# uci_index is a regression test. We used to get a garbage value for the call
# sequence number of the index predicate, which shouldn't have had debugging
# enabled in the first place. The --compare-specialization option was required
# to get the compiler to create the index predicate in the first place, and
# intermodule optimization was required to export the type, and thus its unify,
# compare and index predicates. The bug occurred only in asm_fast.gc, not
# asm_fast.gc.debug.tr.
MCFLAGS-uci_index = --compare-specialization 2 --intermodule-optimization
MCFLAGS-user_event = --event-set-file-name user_event_spec
MCFLAGS-user_event_shallow = --event-set-file-name user_event_spec \
--trace shallow -O2
MCFLAGS-user_event_shallow_exported = --event-set-file-name user_event_spec_3 --trace shallow
MCFLAGS-user_event_2 = --event-set-file-name user_event_spec_2
MCFLAGS-synth_attr = --event-set-file-name synth_attr_spec
MCFLAGS-synth_attr_impure = --event-set-file-name synth_attr_impure_spec
MCFLAGS-tailrec1 = --trace deep --exec-trace-tail-rec --trace-table-io-all
# We need to use shared libraries for interactive queries to work.
# The following is necessary for shared libraries to work on Linux.
MLFLAGS-interactive = --shared
MERCURY_LINKAGE-interactive = shared