History log of /netbsd-current/usr.bin/make/unit-tests/opt-debug-file.mk
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.10 19-Nov-2023 rillig

tests/make: replace 'variable expression' with 'expression'

Each expression is based on a variable, there's no need for the
verbosity. The wording in make's diagnostics will be changed in a
follow-up commit.


# 1.9 01-Jun-2023 rillig

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 tags: netbsd-10-0-RC1 netbsd-10-base
# 1.8 11-Jan-2022 rillig

tests/make: clean up after test for option '-dF'

When the file for the debug log cannot be opened, make exits
immediately. This doesn't give the test a chance to clean up the
temporary log file.

Instead of trying to treat a regular file as a directory and create a
file in it, assume that the directory /nonexistent-$uuid is actually
nonexistent. This leads to the same kind of error message, independent
of strerror(3).


# 1.7 09-Jan-2022 rillig

tests/make: test output channels for parse errors and other errors


# 1.6 28-Dec-2021 rillig

tests/make: clean up after test 'opt-debug-file'


# 1.5 27-Dec-2021 rillig

tests/make: cover a debug log file that cannot be opened


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.4 05-Oct-2020 rillig

make(1): revert previous commit

It had accidentally reverted all the work from the past few days.


# 1.3 05-Oct-2020 rillig

make(1): fix double-free bug in -DCLEANUP mode (since 2020-10-02)

The bug had been introduced with dir.c 1.155 on 2020-10-02 22:20:25. In
that commit, openDirectories was replaced with a combination of a list
with a hash table, for more efficient lookup by name.

Upon cleanup, OpenDirs_Done is called, which in turn called
Dir_ClearPath. Dir_ClearPath takes full ownership of the given list and
empties it. This was no problem before since afterwards the list was
empty and calling Lst_Free just frees the remaining list pointer.

With OpenDirs, this list was combined with a hash table, and the hash
table contains the list nodes, assuming that the OpenDirs functions have
full ownership of both the list and the hash table. This assumption was
generally correct, except for the one moment during cleanup where full
ownership of the list was passed to Dir_ClearPath, while the hash table
still contained pointers to the (now freed) list nodes. This by itself
was not a problem since the hash table would be freed afterwards. But
as part of Dir_ClearPath, OpenDirs_Remove was called, which looked up
the freed directory by name and now found the freed list node, trying to
free it again. Boom.

Fixed by replacing the call to Dir_ClearPath with code that only frees
the directories, without giving up control over the list.


# 1.2 03-Oct-2020 rillig

make(1): add test for the -dF option


# 1.1 05-Sep-2020 rillig

make(1): add tests for each debug option


# 1.9 01-Jun-2023 rillig

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 tags: netbsd-10-base
# 1.8 11-Jan-2022 rillig

tests/make: clean up after test for option '-dF'

When the file for the debug log cannot be opened, make exits
immediately. This doesn't give the test a chance to clean up the
temporary log file.

Instead of trying to treat a regular file as a directory and create a
file in it, assume that the directory /nonexistent-$uuid is actually
nonexistent. This leads to the same kind of error message, independent
of strerror(3).


# 1.7 09-Jan-2022 rillig

tests/make: test output channels for parse errors and other errors


# 1.6 28-Dec-2021 rillig

tests/make: clean up after test 'opt-debug-file'


# 1.5 27-Dec-2021 rillig

tests/make: cover a debug log file that cannot be opened


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.4 05-Oct-2020 rillig

make(1): revert previous commit

It had accidentally reverted all the work from the past few days.


# 1.3 05-Oct-2020 rillig

make(1): fix double-free bug in -DCLEANUP mode (since 2020-10-02)

The bug had been introduced with dir.c 1.155 on 2020-10-02 22:20:25. In
that commit, openDirectories was replaced with a combination of a list
with a hash table, for more efficient lookup by name.

Upon cleanup, OpenDirs_Done is called, which in turn called
Dir_ClearPath. Dir_ClearPath takes full ownership of the given list and
empties it. This was no problem before since afterwards the list was
empty and calling Lst_Free just frees the remaining list pointer.

With OpenDirs, this list was combined with a hash table, and the hash
table contains the list nodes, assuming that the OpenDirs functions have
full ownership of both the list and the hash table. This assumption was
generally correct, except for the one moment during cleanup where full
ownership of the list was passed to Dir_ClearPath, while the hash table
still contained pointers to the (now freed) list nodes. This by itself
was not a problem since the hash table would be freed afterwards. But
as part of Dir_ClearPath, OpenDirs_Remove was called, which looked up
the freed directory by name and now found the freed list node, trying to
free it again. Boom.

Fixed by replacing the call to Dir_ClearPath with code that only frees
the directories, without giving up control over the list.


# 1.2 03-Oct-2020 rillig

make(1): add test for the -dF option


# 1.1 05-Sep-2020 rillig

make(1): add tests for each debug option


# 1.8 11-Jan-2022 rillig

tests/make: clean up after test for option '-dF'

When the file for the debug log cannot be opened, make exits
immediately. This doesn't give the test a chance to clean up the
temporary log file.

Instead of trying to treat a regular file as a directory and create a
file in it, assume that the directory /nonexistent-$uuid is actually
nonexistent. This leads to the same kind of error message, independent
of strerror(3).


# 1.7 09-Jan-2022 rillig

tests/make: test output channels for parse errors and other errors


# 1.6 28-Dec-2021 rillig

tests/make: clean up after test 'opt-debug-file'


# 1.5 27-Dec-2021 rillig

tests/make: cover a debug log file that cannot be opened


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.4 05-Oct-2020 rillig

make(1): revert previous commit

It had accidentally reverted all the work from the past few days.


# 1.3 05-Oct-2020 rillig

make(1): fix double-free bug in -DCLEANUP mode (since 2020-10-02)

The bug had been introduced with dir.c 1.155 on 2020-10-02 22:20:25. In
that commit, openDirectories was replaced with a combination of a list
with a hash table, for more efficient lookup by name.

Upon cleanup, OpenDirs_Done is called, which in turn called
Dir_ClearPath. Dir_ClearPath takes full ownership of the given list and
empties it. This was no problem before since afterwards the list was
empty and calling Lst_Free just frees the remaining list pointer.

With OpenDirs, this list was combined with a hash table, and the hash
table contains the list nodes, assuming that the OpenDirs functions have
full ownership of both the list and the hash table. This assumption was
generally correct, except for the one moment during cleanup where full
ownership of the list was passed to Dir_ClearPath, while the hash table
still contained pointers to the (now freed) list nodes. This by itself
was not a problem since the hash table would be freed afterwards. But
as part of Dir_ClearPath, OpenDirs_Remove was called, which looked up
the freed directory by name and now found the freed list node, trying to
free it again. Boom.

Fixed by replacing the call to Dir_ClearPath with code that only frees
the directories, without giving up control over the list.


# 1.2 03-Oct-2020 rillig

make(1): add test for the -dF option


# 1.1 05-Sep-2020 rillig

make(1): add tests for each debug option


# 1.7 09-Jan-2022 rillig

tests/make: test output channels for parse errors and other errors


# 1.6 28-Dec-2021 rillig

tests/make: clean up after test 'opt-debug-file'


# 1.5 27-Dec-2021 rillig

tests/make: cover a debug log file that cannot be opened


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.4 05-Oct-2020 rillig

make(1): revert previous commit

It had accidentally reverted all the work from the past few days.


# 1.3 05-Oct-2020 rillig

make(1): fix double-free bug in -DCLEANUP mode (since 2020-10-02)

The bug had been introduced with dir.c 1.155 on 2020-10-02 22:20:25. In
that commit, openDirectories was replaced with a combination of a list
with a hash table, for more efficient lookup by name.

Upon cleanup, OpenDirs_Done is called, which in turn called
Dir_ClearPath. Dir_ClearPath takes full ownership of the given list and
empties it. This was no problem before since afterwards the list was
empty and calling Lst_Free just frees the remaining list pointer.

With OpenDirs, this list was combined with a hash table, and the hash
table contains the list nodes, assuming that the OpenDirs functions have
full ownership of both the list and the hash table. This assumption was
generally correct, except for the one moment during cleanup where full
ownership of the list was passed to Dir_ClearPath, while the hash table
still contained pointers to the (now freed) list nodes. This by itself
was not a problem since the hash table would be freed afterwards. But
as part of Dir_ClearPath, OpenDirs_Remove was called, which looked up
the freed directory by name and now found the freed list node, trying to
free it again. Boom.

Fixed by replacing the call to Dir_ClearPath with code that only frees
the directories, without giving up control over the list.


# 1.2 03-Oct-2020 rillig

make(1): add test for the -dF option


# 1.1 05-Sep-2020 rillig

make(1): add tests for each debug option


# 1.6 28-Dec-2021 rillig

tests/make: clean up after test 'opt-debug-file'


# 1.5 27-Dec-2021 rillig

tests/make: cover a debug log file that cannot be opened


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.4 05-Oct-2020 rillig

make(1): revert previous commit

It had accidentally reverted all the work from the past few days.


# 1.3 05-Oct-2020 rillig

make(1): fix double-free bug in -DCLEANUP mode (since 2020-10-02)

The bug had been introduced with dir.c 1.155 on 2020-10-02 22:20:25. In
that commit, openDirectories was replaced with a combination of a list
with a hash table, for more efficient lookup by name.

Upon cleanup, OpenDirs_Done is called, which in turn called
Dir_ClearPath. Dir_ClearPath takes full ownership of the given list and
empties it. This was no problem before since afterwards the list was
empty and calling Lst_Free just frees the remaining list pointer.

With OpenDirs, this list was combined with a hash table, and the hash
table contains the list nodes, assuming that the OpenDirs functions have
full ownership of both the list and the hash table. This assumption was
generally correct, except for the one moment during cleanup where full
ownership of the list was passed to Dir_ClearPath, while the hash table
still contained pointers to the (now freed) list nodes. This by itself
was not a problem since the hash table would be freed afterwards. But
as part of Dir_ClearPath, OpenDirs_Remove was called, which looked up
the freed directory by name and now found the freed list node, trying to
free it again. Boom.

Fixed by replacing the call to Dir_ClearPath with code that only frees
the directories, without giving up control over the list.


# 1.2 03-Oct-2020 rillig

make(1): add test for the -dF option


# 1.1 05-Sep-2020 rillig

make(1): add tests for each debug option


# 1.4 05-Oct-2020 rillig

make(1): revert previous commit

It had accidentally reverted all the work from the past few days.


# 1.3 05-Oct-2020 rillig

make(1): fix double-free bug in -DCLEANUP mode (since 2020-10-02)

The bug had been introduced with dir.c 1.155 on 2020-10-02 22:20:25. In
that commit, openDirectories was replaced with a combination of a list
with a hash table, for more efficient lookup by name.

Upon cleanup, OpenDirs_Done is called, which in turn called
Dir_ClearPath. Dir_ClearPath takes full ownership of the given list and
empties it. This was no problem before since afterwards the list was
empty and calling Lst_Free just frees the remaining list pointer.

With OpenDirs, this list was combined with a hash table, and the hash
table contains the list nodes, assuming that the OpenDirs functions have
full ownership of both the list and the hash table. This assumption was
generally correct, except for the one moment during cleanup where full
ownership of the list was passed to Dir_ClearPath, while the hash table
still contained pointers to the (now freed) list nodes. This by itself
was not a problem since the hash table would be freed afterwards. But
as part of Dir_ClearPath, OpenDirs_Remove was called, which looked up
the freed directory by name and now found the freed list node, trying to
free it again. Boom.

Fixed by replacing the call to Dir_ClearPath with code that only frees
the directories, without giving up control over the list.


# 1.2 03-Oct-2020 rillig

make(1): add test for the -dF option


# 1.1 05-Sep-2020 rillig

make(1): add tests for each debug option