<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/make-git.git/tests/scripts, 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>[SV 64115] Suppress warnings about undefined GNUMAKEFLAGS</title>
<updated>2023-04-30T13:40:50+00:00</updated>
<author>
<name>Dmitry Goncharov</name>
<email>dgoncharov@users.sf.net</email>
</author>
<published>2023-04-30T13:30:19+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/commit/?id=ebe0a1c9f1d1529a3f2c64d628686f500d460b0e'/>
<id>ebe0a1c9f1d1529a3f2c64d628686f500d460b0e</id>
<content type='text'>
* src/variable.c (defined_vars): Add GNUMAKEFLAGS to defined variables.
* tests/scripts/options/warn: Add a test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/variable.c (defined_vars): Add GNUMAKEFLAGS to defined variables.
* tests/scripts/options/warn: Add a test.
</pre>
</div>
</content>
</entry>
<entry>
<title>[SV 64107] Disable builtins immediately on -R or -r</title>
<updated>2023-04-30T13:40:50+00:00</updated>
<author>
<name>Dmitry Goncharov</name>
<email>dgoncharov@users.sf.net</email>
</author>
<published>2023-04-30T13:26:29+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/commit/?id=0880e5c86ab7ba92c3ba0f83bab1a230906ee657'/>
<id>0880e5c86ab7ba92c3ba0f83bab1a230906ee657</id>
<content type='text'>
Disable builtin variables and rules immediately, when -R or -r is
added to MAKEFLAGS inside the makefile.

* src/main.c (disable_builtins): Add new function disable_builtins().
(main): Call disable_builtins().
(reset_makeflags): Call disable_builtins().
* tests/scripts/options/dash-r: Add tests.
* tests/scripts/variables/MAKEFLAGS: Update tests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Disable builtin variables and rules immediately, when -R or -r is
added to MAKEFLAGS inside the makefile.

* src/main.c (disable_builtins): Add new function disable_builtins().
(main): Call disable_builtins().
(reset_makeflags): Call disable_builtins().
* tests/scripts/options/dash-r: Add tests.
* tests/scripts/variables/MAKEFLAGS: Update 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>* tests/scripts/targets/WAIT: Add whitespace to avoid W32 issues</title>
<updated>2023-04-02T21:30:27+00:00</updated>
<author>
<name>Paul Smith</name>
<email>psmith@gnu.org</email>
</author>
<published>2023-04-02T21:30:27+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/commit/?id=fdd61fc06865d4393246da2ce05bad96c1aef5aa'/>
<id>fdd61fc06865d4393246da2ce05bad96c1aef5aa</id>
<content type='text'>
On Windows systems, "X:" for any "X" is considered a drive letter
so add whitespace.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On Windows systems, "X:" for any "X" is considered a drive letter
so add whitespace.
</pre>
</div>
</content>
</entry>
</feed>
