From 0320e7db0e7465c3c2578feb261b52853507bfa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20S=C3=B6nnerup?= Date: Wed, 5 Feb 2025 16:16:53 +0100 Subject: [PATCH 1/2] Changed cast to correct type when trace is enabled for filebd --- bd/lfs_filebd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bd/lfs_filebd.c b/bd/lfs_filebd.c index 4ff25d44..ca2fa05e 100644 --- a/bd/lfs_filebd.c +++ b/bd/lfs_filebd.c @@ -133,7 +133,7 @@ int lfs_filebd_prog(const struct lfs_config *cfg, lfs_block_t block, int lfs_filebd_erase(const struct lfs_config *cfg, lfs_block_t block) { LFS_FILEBD_TRACE("lfs_filebd_erase(%p, 0x%"PRIx32" (%"PRIu32"))", - (void*)cfg, block, ((lfs_file_t*)cfg->context)->cfg->erase_size); + (void*)cfg, block, ((lfs_filebd_t*)cfg->context)->cfg->erase_size); lfs_filebd_t *bd = cfg->context; // check if erase is valid From d2c3a476277b9f9ebf1291c65653d2c565b66dfd Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Thu, 6 Feb 2025 01:20:29 -0600 Subject: [PATCH 2/2] gha: Added test-yes-trace build/test job to CI To hopefully catch typos like the one found by Noxet in the future. Nothing is actually testing that these trace statements compile otherwise. --- .github/workflows/test.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 73e5aa6d..f3100bee 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -374,6 +374,29 @@ jobs: run: | CFLAGS="$CFLAGS -DLFS_NO_INTRINSICS" make test + # run with all trace options enabled to at least make sure these + # all compile + test-yes-trace: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: install + run: | + # need a few things + sudo apt-get update -qq + sudo apt-get install -qq gcc python3 python3-pip + pip3 install toml + gcc --version + python3 --version + - name: test-yes-trace + run: | + CFLAGS="$CFLAGS \ + -DLFS_YES_TRACE \ + -DLFS_RAMBD_YES_TRACE \ + -DLFS_FILEBD_YES_TRACE \ + -DLFS_RAMBD_YES_TRACE" \ + make test + # run LFS_MULTIVERSION tests test-multiversion: runs-on: ubuntu-latest