Where comment 7 (https://bugzilla.samba.org/show_bug.cgi?id=4271#c7) says:
"""
It is really that printing includes from testparm is deceiving
since it will for one section (share ir global) only ever print
the last include file encountered in that section.
"""
I was under the impression that the fix for that bug, which got merged, would completely remove the include lines from the output of samba-tool testparm, but as you found out, the last include directive is included.
So what happens is that:
- the content of all include files is read and included in the output
- the last include statement is also included, as is, as well as its content. This sounds like a bug, and one that was there before.
The same happens with 4.8.2, a much newer version (latest one at this time is 4.8.3).
This is unrelated to the presence of %macros in the include statement as far as I can see, therefore I believe it's ok to tag and upload.
It looks like it is somewhat expected that it always includes only the last include statement, and this is not a change introduced with this fix.
I found this old bug: https:/ /bugzilla. samba.org/ show_bug. cgi?id= 4271
Where comment 7 (https:/ /bugzilla. samba.org/ show_bug. cgi?id= 4271#c7) says:
"""
It is really that printing includes from testparm is deceiving
since it will for one section (share ir global) only ever print
the last include file encountered in that section.
"""
I was under the impression that the fix for that bug, which got merged, would completely remove the include lines from the output of samba-tool testparm, but as you found out, the last include directive is included.
So what happens is that:
- the content of all include files is read and included in the output
- the last include statement is also included, as is, as well as its content. This sounds like a bug, and one that was there before.
The same happens with 4.8.2, a much newer version (latest one at this time is 4.8.3).
This is unrelated to the presence of %macros in the include statement as far as I can see, therefore I believe it's ok to tag and upload.