The NetBSD Project

CVS log for src/usr.bin/make/unit-tests/vardebug.exp

[BACK] Up to [cvs.NetBSD.org] / src / usr.bin / make / unit-tests

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.34 / (download) - annotate - [select for diffs], Wed Dec 20 09:46:00 2023 UTC (3 months, 4 weeks ago) by rillig
Branch: MAIN
CVS Tags: HEAD
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored)

tests/make: add the expected output to the test for variable debugging

Revision 1.33 / (download) - annotate - [select for diffs], Wed Dec 20 09:03:09 2023 UTC (3 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.32: +4 -4 lines
Diff to previous 1.32 (colored)

make: use consistent debug messages style when ignoring variables

When a variable is not modified or not deleted, clearly say so and state
the reason.  Use the same style of debug messages everywhere, putting
the word 'ignoring' at the front.  Previously, that word sticked out to
the right, but only in some cases.

Revision 1.32 / (download) - annotate - [select for diffs], Wed Dec 20 08:50:10 2023 UTC (3 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)

make: fix confusing debug logging when deleting a variable

Be clear when deleting a variable is ignored and state the reason,
instead of only providing a keyword as a hint for insiders.

Revision 1.31 / (download) - annotate - [select for diffs], Sun Dec 10 20:17:23 2023 UTC (4 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.30: +1 -1 lines
Diff to previous 1.30 (colored)

make: explain in the debug log why a variable assignment is ignored

Revision 1.30 / (download) - annotate - [select for diffs], Thu Jun 1 20:56:35 2023 UTC (10 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.29: +3 -3 lines
Diff to previous 1.29 (colored)

tests/make: force line-based diagnostics to be listed in the tests

This way, contradictions between the intended output and the actual
output are closer together and have a better chance of being spotted.

Revision 1.29 / (download) - annotate - [select for diffs], Sat Mar 26 14:34:07 2022 UTC (2 years ago) by rillig
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Changes since 1.28: +1 -1 lines
Diff to previous 1.28 (colored)

make: avoid trailing whitespace in debug log for variables

Since trailing whitespace is invisible, describe the variable value in
words to make it visible.

Revision 1.28 / (download) - annotate - [select for diffs], Sat Mar 26 14:17:46 2022 UTC (2 years ago) by rillig
Branch: MAIN
Changes since 1.27: +5 -5 lines
Diff to previous 1.27 (colored)

make: add space after colon in debug logging for variables

These log messages are intended for human interpretation, so don't make
them unnecessarily hard to read.

Revision 1.27 / (download) - annotate - [select for diffs], Sat Nov 20 17:51:48 2021 UTC (2 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

make: use correct plural form in debug message

Revision 1.26 / (download) - annotate - [select for diffs], Sat Apr 10 22:35:02 2021 UTC (3 years ago) by rillig
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored)

make: reword debug log message for empty variable name

The function names did not match anymore, after one of the many
refactorings in the last few months.

Revision 1.25 / (download) - annotate - [select for diffs], Sat Apr 10 22:09:54 2021 UTC (3 years ago) by rillig
Branch: MAIN
Changes since 1.24: +0 -12 lines
Diff to previous 1.24 (colored)

make: reduce debug logging and memory allocation for ${:U...}

Expressions of the form ${:U...} are often generated by .for loops.
Since these expressions are not generated knowingly by the make user, do
not fill the debug log with them since that would interrupt the normal
reading flow of the -dv log for nested expressions.

Revision 1.24 / (download) - annotate - [select for diffs], Tue Apr 6 01:38:39 2021 UTC (3 years ago) by rillig
Branch: MAIN
Changes since 1.23: +7 -7 lines
Diff to previous 1.23 (colored)

make: reduce verbosity of the -dv debug logging for standard cases

The verbosity was already removed from LogBeforeApply, now it is
consistent between LogBeforeApply and LogAfterApply.

Revision 1.23 / (download) - annotate - [select for diffs], Mon Apr 5 13:35:41 2021 UTC (3 years ago) by rillig
Branch: MAIN
Changes since 1.22: +12 -12 lines
Diff to previous 1.22 (colored)

make: in debug log, add space between scope and variable name

Without this space, the debug log looked more like line noise, even
though the only punctuation was a single innocent ':'.  From a make
user's perspective, the variable name is a word of its own and should
not be visually glued to its namespace.

Revision 1.22 / (download) - annotate - [select for diffs], Mon Apr 5 13:27:30 2021 UTC (3 years ago) by rillig
Branch: MAIN
Changes since 1.21: +7 -7 lines
Diff to previous 1.21 (colored)

make: omit unnecessary details from -dv debug log

When an expression is based on a defined variable, it does not matter
whether the evaluation mode is "eval" or "eval-defined", therefore omit
these details to reduce confusion.

Revision 1.21 / (download) - annotate - [select for diffs], Mon Apr 5 13:14:55 2021 UTC (3 years ago) by rillig
Branch: MAIN
Changes since 1.20: +16 -16 lines
Diff to previous 1.20 (colored)

make: be more verbose in -dv debug logging

The previous log output was too brief to be understandable.  Give more
hints by describing each part of the expression when evaluating a
modifier.  Distinguish between parse-only mode and eval mode since in
parse-only mode most of the details are irrelevant.

Revision 1.20 / (download) - annotate - [select for diffs], Mon Apr 5 12:51:35 2021 UTC (3 years ago) by rillig
Branch: MAIN
Changes since 1.19: +4 -9 lines
Diff to previous 1.19 (colored)

make: clean up debug logging for ':M' and ':N'

Using square brackets as quotes was confusing since patterns can contain
square brackets themselves.

The debug logging for VarMatch was a bit too detailed.  Having the
"before" and "after" states is enough for all practically relevant
cases.

Revision 1.19 / (download) - annotate - [select for diffs], Sat Apr 3 22:02:59 2021 UTC (3 years ago) by rillig
Branch: MAIN
Changes since 1.18: +32 -32 lines
Diff to previous 1.18 (colored)

make: remove VarFlags from debug logging

Before the introduction of ExprDefined, VarFlags contained whether the
expression was defined or not, which was useful to know since the final
value of the expression depends on this information.  The other VarFlags
do not influence the evaluation, so there is no point logging them.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Mar 15 15:39:13 2021 UTC (3 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.17: +44 -44 lines
Diff to previous 1.17 (colored)

make: change debug log for variable evaluation flags to lowercase

This makes them easier distinguishable from variable names since the
latter are usually uppercase.

No functional change outside debug mode.

Revision 1.17 / (download) - annotate - [select for diffs], Tue Feb 23 15:19:41 2021 UTC (3 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.16: +1 -1 lines
Diff to previous 1.16 (colored)

make: improve error message for unknown modifier

Back in 1995, the modifiers were all single-character, and it made sense
to print only the first character.  Nowadays, with ':S', ':@var@...@',
'::=' and several others, a little more context is useful to see where
the exact error is.  The actual modifier is still guessed, and the guess
may be wrong as soon as backslashes get involved, but it is still better
than before.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Feb 15 18:23:32 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.15: +32 -32 lines
Diff to previous 1.15 (colored)

make: rename ExprDefined constants for debug logging

Revision 1.15 / (download) - annotate - [select for diffs], Tue Feb 2 16:18:16 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.14: +18 -18 lines
Diff to previous 1.14 (colored)

make: replace VarExprFlags with VarExprStatus

The combination of !VEF_UNDEF && VEF_DEF was not possible, which made it
rather strange to model this state as a bit set.

The only functional change is the renamed constants in the debug output.

Using ENUM_VALUE_RTTI_2 felt like overengineering since it's harder to
understand than a simple array of names.

Revision 1.14 / (download) - annotate - [select for diffs], Sun Dec 20 19:47:34 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.13: +1 -1 lines
Diff to previous 1.13 (colored)

make(1): error out on unknown variable modifiers at parse time

Before, make printed an "error message" that did not include the word
error and thus was not easily identified as such.  This "error message"
also did not influence the exit status in the default mode but only in
-dL mode.  The error message also didn't include any line number
information and was thus rude.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Nov 17 20:27:35 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.12: +1 -1 lines
Diff to previous 1.12 (colored)

make(1): make test vardebug independent from the shell

Revision 1.12 / (download) - annotate - [select for diffs], Sat Oct 31 18:14:59 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.11: +0 -2 lines
Diff to previous 1.11 (colored)

make(1): remove debug logging for the :Q variable modifier

The same information is already logged in LogAfterApply.

Revision 1.11 / (download) - annotate - [select for diffs], Thu Oct 29 18:38:24 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.10: +3 -0 lines
Diff to previous 1.10 (colored)

make(1): add test for ignoring assignment to read-only variable

Revision 1.10 / (download) - annotate - [select for diffs], Thu Oct 29 18:19:41 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.9: +7 -2 lines
Diff to previous 1.9 (colored)

make(1): move MAKEFLAGS handling in vardebug test to the test itself

Revision 1.9 / (download) - annotate - [select for diffs], Wed Sep 30 05:58:22 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

make(1): fix bug in evaluation of indirect variable modifiers

Since 2020-09-22, when indirect variable modifiers were applied to a
variable expression based on an undefined variable, these modifiers did
not change the state of a variable expression from undefined to defined.
The modifiers that do this are :D, :U, :L, :P.  Minimal example:

	${VARNAME:${:UL}}

The :L modifier from the inner expression sets the value of the outer
expression to its variable name, in this case "VARNAME".  The outer
expression was not marked as being defined though, which resulted in a
"Malformed conditional" error.

In the commit from 2020-09-22, vardebug.exp had changed a lot, and I had
not inspected the change closely.  The important detail was in lines 56
and 60, where VAR_JUNK|VAR_KEEP changed into VEF_UNDEF, thereby losing
the VEF_DEF bit.

Revision 1.8 / (download) - annotate - [select for diffs], Tue Sep 22 06:13:39 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.7: +32 -32 lines
Diff to previous 1.7 (colored)

make(1): move VAR_JUNK and VAR_KEEP away from VarFlags

These two flags have nothing to do with a variable.  They are only used
while evaluating a variable expression.

While here, rename the flags and make their documentation more precise.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Sep 13 16:47:24 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.6: +32 -32 lines
Diff to previous 1.6 (colored)

make(1): shorten debug output of ApplyModifiers

Having the words "eflags" and "vflags" in the debug output was too
repetitive.  That they are flags is made obvious by the '|' separator,
and the flags have clearly distinguishable names (VARE_* vs. VAR_*),
which lowers the chance for confusion.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Aug 8 18:50:12 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.5: +12 -0 lines
Diff to previous 1.5 (colored)

make(1): add debug logging for Var_Parse

This will hopefully help with tracking down why the "Undefined variable"
error message is not triggered.

There is some other non-obvious behavior nearby.  In Parse_DoVar, the !=
assignment operator evaluates the variable using VARE_UNDEFERR, but
there is not even a warning for the following line:

!= echo err ${UNDEFINED} 1>&2

Revision 1.5 / (download) - annotate - [select for diffs], Sat Aug 8 14:28:46 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.4: +8 -1 lines
Diff to previous 1.4 (colored)

make(1): extend debug logging to error values

The error marker var_Error is just an empty string.  In the debug log
this empty string was not distinguishable from an otherwise empty
string.

Having this distinction helps in understanding the exact data flow.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Aug 8 13:50:23 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.3: +28 -28 lines
Diff to previous 1.3 (colored)

make(1): add more detailed debug logging for variable modifiers

Before a modifier is applied to a variable, it is not yet parsed,
therefore it is only possible to log a rough estimate of the modifier.
But after applying it, the parsing position has advanced, and the full
modifier can be logged.

In addition, to fully understand how the modifiers work, it's not enough
to just know the variable names and values, there are also some flags
that influence how the modifiers behave.  The most influential is
VARE_WANTRES.

Thanks to sjg for the extensive review and valuable feedback on the
first drafts.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Aug 8 12:32:26 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.2: +1 -1 lines
Diff to previous 1.2 (colored)

make(1): fix debug output for indirect modifiers

The trailing part after the modifier was confusing at best.  It does
make sense to log the string from p to p+rlen, but not from p+len to
p+len+len.

Consistently use double quotes for strings.

Revision 1.2 / (download) - annotate - [select for diffs], Sat Aug 8 12:22:10 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.1: +15 -0 lines
Diff to previous 1.1 (colored)

make(1): add test for debugging message for indirect modifiers

The current output format stops in the middle of the next modifier,
which was probably not intended.

Revision 1.1 / (download) - annotate - [select for diffs], Sat Jul 25 21:19:29 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN

make(1): add tests for previously uncovered code

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>