<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/make-git.git/tests/scripts/features, branch master</title>
<subtitle>git.savannah.gnu.org: git/make.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/'/>
<entry>
<title>[SV 63219] Support an "unload" function for loaded objects</title>
<updated>2023-05-14T22:26:35+00:00</updated>
<author>
<name>Paul Smith</name>
<email>psmith@gnu.org</email>
</author>
<published>2023-05-07T20:51:12+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/commit/?id=1748e6641419e8a48f830caad072ed5b298577af'/>
<id>1748e6641419e8a48f830caad072ed5b298577af</id>
<content type='text'>
If a loaded object defines a symbol &lt;object&gt;_gmk_unload, assume it's
a function and invoke it whenever the loaded object is unloaded.
Original implementation by Dmitry Goncharov &lt;dgoncharov@users.sf.net&gt;

* NEWS: Announce the change.
* doc/make.texi: Describe the behavior.
* src/gnumake.h: Add information to the comments.
* src/makeint.h (unload_all): Declare a new function.
* src/main.c (die): Invoke unload_all().
* src/load.c (unload_func_t): Declare a new type for unload.
(struct load_list): Remember the unload symbol if it exists.
(load_object): Move the parsing of the object name from load_file.
Check for the _gmk_unload symbol and if found, remember it.
(load_file): Allow load_object to do object filename parsing.
(unload_file): Remove the load_list entry when unloading the object.
(unload_all): Unload all the loaded objects.
* tests/scripts/features/loadapi: Test the unload function.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a loaded object defines a symbol &lt;object&gt;_gmk_unload, assume it's
a function and invoke it whenever the loaded object is unloaded.
Original implementation by Dmitry Goncharov &lt;dgoncharov@users.sf.net&gt;

* NEWS: Announce the change.
* doc/make.texi: Describe the behavior.
* src/gnumake.h: Add information to the comments.
* src/makeint.h (unload_all): Declare a new function.
* src/main.c (die): Invoke unload_all().
* src/load.c (unload_func_t): Declare a new type for unload.
(struct load_list): Remember the unload symbol if it exists.
(load_object): Move the parsing of the object name from load_file.
Check for the _gmk_unload symbol and if found, remember it.
(load_file): Allow load_object to do object filename parsing.
(unload_file): Remove the load_list entry when unloading the object.
(unload_all): Unload all the loaded objects.
* tests/scripts/features/loadapi: Test the unload function.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove the "preview" status from the loaded object feature</title>
<updated>2023-05-07T20:51:06+00:00</updated>
<author>
<name>Paul Smith</name>
<email>psmith@gnu.org</email>
</author>
<published>2023-05-06T20:21:39+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/commit/?id=8e0e6c678f3cf1199751e3b097745531ceed34ed'/>
<id>8e0e6c678f3cf1199751e3b097745531ceed34ed</id>
<content type='text'>
Add an ABI version both to the header file and passed to the setup
function.  Unfortunately this itself is an ABI break and I couldn't
find a good way to avoid it.

* NEWS: Announce the ABI is not a preview and the incompatibility.
* doc/make.texi: Remove the preview warnings for object loading.
Document the new ABI version argument.
* src/gnumake.h (GMK_ABI_VERSION): Set the ABI version to 1.
Add comments documenting the format of the setup function.
* src/load.c (setup_func_t): Rename from load_func_t.
(load_file): Pass the ABI version to the setup function.
* tests/scripts/features/load: Rework the setup function.
* tests/scripts/features/loadapi: Ditto.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add an ABI version both to the header file and passed to the setup
function.  Unfortunately this itself is an ABI break and I couldn't
find a good way to avoid it.

* NEWS: Announce the ABI is not a preview and the incompatibility.
* doc/make.texi: Remove the preview warnings for object loading.
Document the new ABI version argument.
* src/gnumake.h (GMK_ABI_VERSION): Set the ABI version to 1.
Add comments documenting the format of the setup function.
* src/load.c (setup_func_t): Rename from load_func_t.
(load_file): Pass the ABI version to the setup function.
* tests/scripts/features/load: Rework the setup function.
* tests/scripts/features/loadapi: Ditto.
</pre>
</div>
</content>
</entry>
<entry>
<title>* src/read.c (eval): [SV 40942] Allow targets named "load"</title>
<updated>2023-05-07T20:51:06+00:00</updated>
<author>
<name>Paul Smith</name>
<email>psmith@gnu.org</email>
</author>
<published>2023-05-06T20:12:11+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/commit/?id=3f28ec2f58c3defebd1d9e66ec0ae653e78d88d5'/>
<id>3f28ec2f58c3defebd1d9e66ec0ae653e78d88d5</id>
<content type='text'>
Previously "load:" worked but "load :" failed.  Allow the latter as
well.  This doesn't fix all issues; "load foo :" is still treated
as a load operation for "foo" and ":".  Avoids SV 50413 as well.
* tests/scripts/features/load: Write tests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously "load:" worked but "load :" failed.  Allow the latter as
well.  This doesn't fix all issues; "load foo :" is still treated
as a load operation for "foo" and ":".  Avoids SV 50413 as well.
* tests/scripts/features/load: Write tests.
</pre>
</div>
</content>
</entry>
<entry>
<title>* tests/scripts/features/comments: Add missing "1;"</title>
<updated>2023-05-06T18:45:09+00:00</updated>
<author>
<name>Paul Smith</name>
<email>psmith@gnu.org</email>
</author>
<published>2023-05-06T18:45:09+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/commit/?id=05c86bfcb2db2a9916b0ed99fdab273f6cbd47da'/>
<id>05c86bfcb2db2a9916b0ed99fdab273f6cbd47da</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[SV 64124] Avoid use-after-free in expand_variable_buf()</title>
<updated>2023-04-30T13:41:02+00:00</updated>
<author>
<name>Dmitry Goncharov</name>
<email>dgoncharov@users.sf.net</email>
</author>
<published>2023-04-30T13:39:04+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/commit/?id=06c75a35b93ac6ceacf0474e8b3a23d494fcea07'/>
<id>06c75a35b93ac6ceacf0474e8b3a23d494fcea07</id>
<content type='text'>
When the expanded value of the variable in buf occupies more space
than available in variable_buffer, function variable_buffer_output
reallocates variable_buffer: return a pointer into the new memory,
not the old memory.

* src/expand.c (expand_variable_buf): Preserve the offset of buf and
return that offset into the (potentially reallocated) buffer.
* tests/scripts/features/expand: Add tests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the expanded value of the variable in buf occupies more space
than available in variable_buffer, function variable_buffer_output
reallocates variable_buffer: return a pointer into the new memory,
not the old memory.

* src/expand.c (expand_variable_buf): Preserve the offset of buf and
return that offset into the (potentially reallocated) buffer.
* tests/scripts/features/expand: Add tests.
</pre>
</div>
</content>
</entry>
<entry>
<title>* tests/scripts/features/double_colon: Test parallel double-colon rules</title>
<updated>2023-04-30T13:40:50+00:00</updated>
<author>
<name>Paul Smith</name>
<email>psmith@gnu.org</email>
</author>
<published>2023-04-30T13:19:06+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/commit/?id=0e06c7588961bb04c7bb01606356941baf1cb146'/>
<id>0e06c7588961bb04c7bb01606356941baf1cb146</id>
<content type='text'>
Original test proposed by Dmitry Goncharov &lt;dgoncharov@users.sf.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Original test proposed by Dmitry Goncharov &lt;dgoncharov@users.sf.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Run each file in a separate directory</title>
<updated>2023-04-02T21:32:09+00:00</updated>
<author>
<name>Paul Smith</name>
<email>psmith@gnu.org</email>
</author>
<published>2023-04-02T21:32:09+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/commit/?id=971b02d58ee2d19d8ba0c7c9813f02fa86c8fd0c'/>
<id>971b02d58ee2d19d8ba0c7c9813f02fa86c8fd0c</id>
<content type='text'>
Avoid cross-contamination between test files by creating a new
working directory for each file, and setting it as the current
directory before starting the tests in that file.

Rename the test output as tNNN.{base,log,diff,mk} where NNN is
a test number starting with 001 for the first test.  It is
slightly more annoying to find diff files since you can't use
autocomplete directly but it is simpler to match things.

Detect the source directory as the location of the test_driver.pl
script, so remove the separate -srcdir option.

* Makefile.am: Remove hacks to create symlinks when building
out-of-tree, and remove -srcdir option from run_make_tests.
* tests/test_driver.pl: Locate $srcpath based on __FILE__, then
compute $toppath as its parent.  Set $scriptpath under $srcpath
and $workpath under the current directory.  Toss $*_filename
and modify get_logfile() etc. to use the suffix directly.  Add
a chdir() around the invocation of the test.
* tests/run_make_tests.pl: Throw out the -srcdir option and use
$srcpath set in test_driver.pl.  The #WORK# helper is no longer
useful so remove it.  Set #PWD# to the current working dir. Always
search the local directory and $srcpath for config-flags.pm.
Use $srcpath for finding the thelp.pl script.
* tests/scripts/features/vpath: Don't put things in work/ as it
is no longer a subdirectory.
* tests/scripts/features/vpathgpath: Ditto.
* tests/scripts/features/vpathplus: Ditto.
* tests/scripts/misc/general1: Ditto.
* tests/scripts/misc/general2: Ditto.
* tests/scripts/options/dash-k: Ditto.
* tests/scripts/options/symlinks: Use $testpath as the working
directory.
* tests/scripts/variables/GNUMAKEFLAGS: Use the test helper to
display env var values (grepping for GNUMAKEFLAGS finds extra things
now that it is our current working directory).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Avoid cross-contamination between test files by creating a new
working directory for each file, and setting it as the current
directory before starting the tests in that file.

Rename the test output as tNNN.{base,log,diff,mk} where NNN is
a test number starting with 001 for the first test.  It is
slightly more annoying to find diff files since you can't use
autocomplete directly but it is simpler to match things.

Detect the source directory as the location of the test_driver.pl
script, so remove the separate -srcdir option.

* Makefile.am: Remove hacks to create symlinks when building
out-of-tree, and remove -srcdir option from run_make_tests.
* tests/test_driver.pl: Locate $srcpath based on __FILE__, then
compute $toppath as its parent.  Set $scriptpath under $srcpath
and $workpath under the current directory.  Toss $*_filename
and modify get_logfile() etc. to use the suffix directly.  Add
a chdir() around the invocation of the test.
* tests/run_make_tests.pl: Throw out the -srcdir option and use
$srcpath set in test_driver.pl.  The #WORK# helper is no longer
useful so remove it.  Set #PWD# to the current working dir. Always
search the local directory and $srcpath for config-flags.pm.
Use $srcpath for finding the thelp.pl script.
* tests/scripts/features/vpath: Don't put things in work/ as it
is no longer a subdirectory.
* tests/scripts/features/vpathgpath: Ditto.
* tests/scripts/features/vpathplus: Ditto.
* tests/scripts/misc/general1: Ditto.
* tests/scripts/misc/general2: Ditto.
* tests/scripts/options/dash-k: Ditto.
* tests/scripts/options/symlinks: Use $testpath as the working
directory.
* tests/scripts/variables/GNUMAKEFLAGS: Use the test helper to
display env var values (grepping for GNUMAKEFLAGS finds extra things
now that it is our current working directory).
</pre>
</div>
</content>
</entry>
<entry>
<title>[SV 63981] Don't warn on explicit -j1</title>
<updated>2023-04-02T14:29:37+00:00</updated>
<author>
<name>Paul Smith</name>
<email>psmith@gnu.org</email>
</author>
<published>2023-04-02T14:29:37+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/commit/?id=54b3202f8da0761c7d5a3410313f0a32eb63ef8b'/>
<id>54b3202f8da0761c7d5a3410313f0a32eb63ef8b</id>
<content type='text'>
If -j1 is given explicitly on the command line don't warn about it.

* src/main.c (main): Skip the warning if -j1.
* tests/scripts/features/jobserver: Add a test for this behavior.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If -j1 is given explicitly on the command line don't warn about it.

* src/main.c (main): Skip the warning if -j1.
* tests/scripts/features/jobserver: Add a test for this behavior.
</pre>
</div>
</content>
</entry>
<entry>
<title>Adjust output strings to be aligned</title>
<updated>2023-04-02T14:02:18+00:00</updated>
<author>
<name>Paul Smith</name>
<email>psmith@gnu.org</email>
</author>
<published>2023-04-01T19:57:04+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/commit/?id=c2792d6129fe9b13efba159126430d657f447033'/>
<id>c2792d6129fe9b13efba159126430d657f447033</id>
<content type='text'>
Change error and fatal messages to start with lowercase and not
end with a period.  Note a few very common messages were left
as-is, just in case some other tools parse them.

Also modify the test known-good-output to satisfy the messages.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change error and fatal messages to start with lowercase and not
end with a period.  Note a few very common messages were left
as-is, just in case some other tools parse them.

Also modify the test known-good-output to satisfy the messages.
</pre>
</div>
</content>
</entry>
<entry>
<title>Clean up memory leak warnings from ASAN and Valgrind</title>
<updated>2023-04-01T15:13:12+00:00</updated>
<author>
<name>Paul Smith</name>
<email>psmith@gnu.org</email>
</author>
<published>2023-03-26T19:35:00+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/commit/?id=9db74434cd34b2b875b3f9bfbab4f1e0b682e27c'/>
<id>9db74434cd34b2b875b3f9bfbab4f1e0b682e27c</id>
<content type='text'>
* src/main.c (main): Add "sanitize" to .FEATURES if ASAN is enabled.
* src/expand.c (expand_variable_output): Remember "recursive" setting
in case it's changed by the expansion of the variable.
* src/file.c (rehash_file): If we drop a file from the global 'files'
hash, remember it in rehashed_files.  We can't free it because it's
still being referenced (callers will invoke check_renamed()) but
it will be a leak since it's no longer referenced by 'files'.
* src/remake.c (update_file_1): If we drop a dependency, remember it
in dropped_list.  We can't free it because it's still being referenced
by callers but it will be a leak since it's no longer referenced as
a prerequisite.
* tests/scripts/functions/guile: Don't run Guile tests when ASAN is
enabled.
* tests/scripts/functions/wildcard: Enabling ASAN causes glob(3) to
break!  Don't run this test.
* tests/scripts/features/exec: Valgrind's exec() doesn't support
scripts with no shbang.
* tests/scripts/jobserver: Valgrind fails if TMPDIR is set to an
invalid directory: skip those tests.
* tests/scripts/features/output-sync: Ditto.
* tests/scripts/features/temp_stdin: Ditto.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/main.c (main): Add "sanitize" to .FEATURES if ASAN is enabled.
* src/expand.c (expand_variable_output): Remember "recursive" setting
in case it's changed by the expansion of the variable.
* src/file.c (rehash_file): If we drop a file from the global 'files'
hash, remember it in rehashed_files.  We can't free it because it's
still being referenced (callers will invoke check_renamed()) but
it will be a leak since it's no longer referenced by 'files'.
* src/remake.c (update_file_1): If we drop a dependency, remember it
in dropped_list.  We can't free it because it's still being referenced
by callers but it will be a leak since it's no longer referenced as
a prerequisite.
* tests/scripts/functions/guile: Don't run Guile tests when ASAN is
enabled.
* tests/scripts/functions/wildcard: Enabling ASAN causes glob(3) to
break!  Don't run this test.
* tests/scripts/features/exec: Valgrind's exec() doesn't support
scripts with no shbang.
* tests/scripts/jobserver: Valgrind fails if TMPDIR is set to an
invalid directory: skip those tests.
* tests/scripts/features/output-sync: Ditto.
* tests/scripts/features/temp_stdin: Ditto.
</pre>
</div>
</content>
</entry>
</feed>
