From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Thu, 29 Apr 2021 09:03:38 -0700 Subject: [PATCH] dtoc: Correct dtoc output when testing In-Reply-To: <20210427081932.1.I11516ded2712e18c212c5621fe93ea4ae5199408@changeid> References: <20210427081932.1.I11516ded2712e18c212c5621fe93ea4ae5199408@changeid> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de At present each invocation of run_steps() updates OUTPUT_FILES_COMMON, since it does not make a copy of the dict. This is fine for a single invocation, but for tests, run_steps() is invoked many times. As a result it may include unwanted items from the previous run, if it happens that a test runs twice on the same CPU. The problem has not been noticied previously, as there are few enough tests and enough CPUs that is is rare for the 'wrong' combination of tests to run together. Fix this by making a copy of the dict, before updating it. Update the tests to suit, taking account of the files that are no-longer generated. With this fix, we no-longer generate files which are not needed for a particular state of OF_PLATDATA_INST, so the check_instantiate() function is not needed anymore. It has become dead code and so fails the code-coverage test (dtoc -T). Remove it. Signed-off-by: Simon Glass --- tools/dtoc/dtb_platdata.py | 24 +----------------- tools/dtoc/test_dtoc.py | 51 ++++++++++++++++---------------------- 2 files changed, 22 insertions(+), 53 deletions(-) Applied to u-boot-dm, thanks!