make/tests/scripts/features
Paul Smith 9e2fa24649 [SV 41273] Allow the directory cache to be invalidated
Each time we invoke a command it's possible that it will change the
filesystem in ways that were not described by the target.  If that
happens but we have cached previous directory contents then we may
make decisions or report results based on obsolete information.

Keep a count of how many commands we've invoked, and remember the
current command count every time we load the contents of a directory.
If we request the directory and the current command count has changed
we know the cache is outdated so reload from scratch.

* NEWS: Announce the change.
* src/makeint.h (command_count): Create a global counter.
* src/main.c (command_count): Ditto.
* src/job.c (reap_children): Increment the counter on job completion.
* src/function.c (func_file): Increment if we write a file.
* src/dir.c (clear_directory_contents): Clear the current contents of
a cached directory.
(struct directory_contents): Remember the counter value.
(struct directory): Remember the counter value for non-existing dirs.
(find_directory): If we have a cached directory and the count hasn't
changed then return it.  Else, clear the previous contents and re-read
from scratch.
* tests/scripts/features/dircache: Add tests of the directory cache.
2020-11-29 17:59:16 -05:00
..
archives
comments
conditionals
default_names
dircache [SV 41273] Allow the directory cache to be invalidated 2020-11-29 17:59:16 -05:00
double_colon
echoing
errors
escape
exec * tests/scripts/features/exec: Don't use $ENV in the description 2020-01-03 02:08:59 -05:00
export Support "unexport" in target-specific variables. 2020-11-29 17:57:33 -05:00
grouped_targets
include [SV 58735] Define the order that makefiles are rebuilt. 2020-07-19 13:56:23 -04:00
jobserver tests: Simplify customization of %ENV 2020-04-01 02:02:57 -04:00
load
loadapi
mult_rules
mult_targets
order_only
output-sync
override
parallelism tests: Simplify customization of %ENV 2020-04-01 02:02:57 -04:00
patspecific_vars
patternrules * tests/scripts/features/patternrules: Use Windows-compatible quoting 2020-01-03 02:08:59 -05:00
quoting
recursion
reinvoke Convert [ ... ] to test ... in scripting. 2020-05-03 14:23:56 -04:00
rule_glob
se_explicit
se_implicit
se_statpat
shell_assignment
statipattrules
suffixrules [SV 40657] Reinstate old behavior for suffix rules with prereqs 2020-01-19 17:04:52 -05:00
targetvars Support "unexport" in target-specific variables. 2020-11-29 17:57:33 -05:00
utf8
varnesting
vpath
vpath2
vpath3
vpathgpath
vpathplus