This is an automated email from the ASF dual-hosted git repository.

vipulrahane pushed a commit to branch vipul/logging_num_entries_callbacks
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit eb323b9da4b6c9a02432cd668b086aaf3835f24d
Author: Vipul Rahane <[email protected]>
AuthorDate: Mon Feb 10 13:23:15 2025 -0800

    Remove selftests
---
 .../selftest/align1_img_hash_num_entries/pkg.yml   | 30 -------
 .../src/log_test_align1.c                          | 33 --------
 .../align1_img_hash_num_entries/syscfg.yml         | 30 -------
 sys/log/full/selftest/align1_num_entries/pkg.yml   | 30 -------
 .../align1_num_entries/src/log_test_align1.c       | 33 --------
 .../full/selftest/align1_num_entries/syscfg.yml    | 29 -------
 sys/log/full/selftest/align4_num_entries/pkg.yml   | 30 -------
 .../align4_num_entries/src/log_test_align1.c       | 33 --------
 .../align4_num_entries/src/log_test_align4.c       | 41 ----------
 .../full/selftest/align4_num_entries/syscfg.yml    | 29 -------
 sys/log/full/selftest/fcb2_align1_imghash/pkg.yml  | 30 -------
 .../fcb2_align1_imghash/src/log_test_align1.c      | 33 --------
 .../full/selftest/fcb2_align1_imghash/syscfg.yml   | 29 -------
 .../fcb2_align1_imghash_num_entries/pkg.yml        | 30 -------
 .../src/log_test_align1.c                          | 33 --------
 .../fcb2_align1_imghash_num_entries/syscfg.yml     | 30 -------
 .../util/include/log_test_util/log_test_util.h     |  4 -
 sys/log/full/selftest/util/src/log_test_util.c     | 91 +---------------------
 .../src/testcases/log_test_case_cbmem_append.c     | 25 +++---
 .../testcases/log_test_case_cbmem_append_body.c    | 24 ++----
 .../testcases/log_test_case_cbmem_append_mbuf.c    | 28 +++----
 .../log_test_case_cbmem_append_mbuf_body.c         | 24 ++----
 .../src/testcases/log_test_case_cbmem_printf.c     | 23 ++----
 .../util/src/testcases/log_test_case_fcb_append.c  | 27 +++----
 .../src/testcases/log_test_case_fcb_append_body.c  | 26 ++-----
 .../src/testcases/log_test_case_fcb_append_mbuf.c  | 26 +++----
 .../testcases/log_test_case_fcb_append_mbuf_body.c | 24 ++----
 27 files changed, 86 insertions(+), 739 deletions(-)

diff --git a/sys/log/full/selftest/align1_img_hash_num_entries/pkg.yml 
b/sys/log/full/selftest/align1_img_hash_num_entries/pkg.yml
deleted file mode 100644
index 56700bf5f..000000000
--- a/sys/log/full/selftest/align1_img_hash_num_entries/pkg.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-pkg.name: sys/log/full/selftest/align1_img_hash_num_entries
-pkg.type: unittest
-pkg.description: "Log unit tests; flash-alignment=1."
-pkg.author: "Apache Mynewt <[email protected]>"
-pkg.homepage: "http://mynewt.apache.org/";
-pkg.keywords:
-
-pkg.deps:
-    - "@apache-mynewt-core/sys/console/stub"
-    - "@apache-mynewt-core/sys/log/full"
-    - "@apache-mynewt-core/sys/log/full/selftest/util"
-    - "@apache-mynewt-core/test/testutil"
-    - "@apache-mynewt-core/boot/stub"
diff --git 
a/sys/log/full/selftest/align1_img_hash_num_entries/src/log_test_align1.c 
b/sys/log/full/selftest/align1_img_hash_num_entries/src/log_test_align1.c
deleted file mode 100644
index 6fb73ffba..000000000
--- a/sys/log/full/selftest/align1_img_hash_num_entries/src/log_test_align1.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include "os/mynewt.h"
-#include "log_test_util/log_test_util.h"
-
-int
-main(int argc, char **argv)
-{
-    log_test_suite_cbmem_flat();
-    log_test_suite_cbmem_mbuf();
-    log_test_suite_fcb_flat();
-    log_test_suite_fcb_mbuf();
-    log_test_suite_misc();
-
-    return tu_any_failed;
-}
diff --git a/sys/log/full/selftest/align1_img_hash_num_entries/syscfg.yml 
b/sys/log/full/selftest/align1_img_hash_num_entries/syscfg.yml
deleted file mode 100644
index 049ef49ea..000000000
--- a/sys/log/full/selftest/align1_img_hash_num_entries/syscfg.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-syscfg.vals:
-    LOG_FCB: 1
-    MCU_FLASH_MIN_WRITE_SIZE: 1
-
-    # The mbuf append tests allocate lots of mbufs; ensure no exhaustion.
-    MSYS_1_BLOCK_COUNT: 1000
-    LOG_FLAGS_IMAGE_HASH: 1
-    LOG_FLAGS_TRAILER_SUPPORT: 1
-    LOGS_TLV_NUM_ENTRIES: 1
-    IMGMGR_DUMMY_HDR: 1
-    LOG_MGMT: 0
-    IMG_MGMT: 0
diff --git a/sys/log/full/selftest/align1_num_entries/pkg.yml 
b/sys/log/full/selftest/align1_num_entries/pkg.yml
deleted file mode 100644
index 8a0bf7d10..000000000
--- a/sys/log/full/selftest/align1_num_entries/pkg.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-pkg.name: sys/log/full/selftest/align1_num_entries
-pkg.type: unittest
-pkg.description: "Log unit tests; flash-alignment=1."
-pkg.author: "Apache Mynewt <[email protected]>"
-pkg.homepage: "http://mynewt.apache.org/";
-pkg.keywords:
-
-pkg.deps:
-    - "@apache-mynewt-core/sys/console/stub"
-    - "@apache-mynewt-core/sys/log/full"
-    - "@apache-mynewt-core/sys/log/full/selftest/util"
-    - "@apache-mynewt-core/test/testutil"
-    - "@apache-mynewt-core/boot/stub"
diff --git a/sys/log/full/selftest/align1_num_entries/src/log_test_align1.c 
b/sys/log/full/selftest/align1_num_entries/src/log_test_align1.c
deleted file mode 100644
index 6fb73ffba..000000000
--- a/sys/log/full/selftest/align1_num_entries/src/log_test_align1.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include "os/mynewt.h"
-#include "log_test_util/log_test_util.h"
-
-int
-main(int argc, char **argv)
-{
-    log_test_suite_cbmem_flat();
-    log_test_suite_cbmem_mbuf();
-    log_test_suite_fcb_flat();
-    log_test_suite_fcb_mbuf();
-    log_test_suite_misc();
-
-    return tu_any_failed;
-}
diff --git a/sys/log/full/selftest/align1_num_entries/syscfg.yml 
b/sys/log/full/selftest/align1_num_entries/syscfg.yml
deleted file mode 100644
index 7171a4122..000000000
--- a/sys/log/full/selftest/align1_num_entries/syscfg.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-syscfg.vals:
-    LOG_FCB: 1
-    MCU_FLASH_MIN_WRITE_SIZE: 1
-
-    # The mbuf append tests allocate lots of mbufs; ensure no exhaustion.
-    MSYS_1_BLOCK_COUNT: 1000
-    LOG_FLAGS_TRAILER_SUPPORT: 1
-    LOGS_TLV_NUM_ENTRIES: 1
-    IMGMGR_DUMMY_HDR: 1
-    LOG_MGMT: 0
-    IMG_MGMT: 0
diff --git a/sys/log/full/selftest/align4_num_entries/pkg.yml 
b/sys/log/full/selftest/align4_num_entries/pkg.yml
deleted file mode 100644
index 339101d7b..000000000
--- a/sys/log/full/selftest/align4_num_entries/pkg.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-pkg.name: sys/log/full/selftest/align4_num_entries
-pkg.type: unittest
-pkg.description: "Log unit tests; flash-alignment=4."
-pkg.author: "Apache Mynewt <[email protected]>"
-pkg.homepage: "http://mynewt.apache.org/";
-pkg.keywords:
-
-pkg.deps:
-    - "@apache-mynewt-core/sys/console/stub"
-    - "@apache-mynewt-core/sys/log/full"
-    - "@apache-mynewt-core/sys/log/full/selftest/util"
-    - "@apache-mynewt-core/test/testutil"
-    - "@apache-mynewt-core/boot/stub"
diff --git a/sys/log/full/selftest/align4_num_entries/src/log_test_align1.c 
b/sys/log/full/selftest/align4_num_entries/src/log_test_align1.c
deleted file mode 100644
index 6fb73ffba..000000000
--- a/sys/log/full/selftest/align4_num_entries/src/log_test_align1.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include "os/mynewt.h"
-#include "log_test_util/log_test_util.h"
-
-int
-main(int argc, char **argv)
-{
-    log_test_suite_cbmem_flat();
-    log_test_suite_cbmem_mbuf();
-    log_test_suite_fcb_flat();
-    log_test_suite_fcb_mbuf();
-    log_test_suite_misc();
-
-    return tu_any_failed;
-}
diff --git a/sys/log/full/selftest/align4_num_entries/src/log_test_align4.c 
b/sys/log/full/selftest/align4_num_entries/src/log_test_align4.c
deleted file mode 100644
index b1c5a1d23..000000000
--- a/sys/log/full/selftest/align4_num_entries/src/log_test_align4.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include "os/mynewt.h"
-#include "log_test_util/log_test_util.h"
-
-int
-main(int argc, char **argv)
-{
-    log_test_suite_cbmem_flat();
-
-    log_test_suite_cbmem_mbuf();
-    log_test_suite_fcb_flat();
-
-#if 0
-    /* Current fcb mbuf implementation supports only
-     * 1 byte alignment
-     */
-    log_test_suite_fcb_mbuf();
-#endif
-
-    log_test_suite_misc();
-
-    return tu_any_failed;
-}
diff --git a/sys/log/full/selftest/align4_num_entries/syscfg.yml 
b/sys/log/full/selftest/align4_num_entries/syscfg.yml
deleted file mode 100644
index 7171a4122..000000000
--- a/sys/log/full/selftest/align4_num_entries/syscfg.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-syscfg.vals:
-    LOG_FCB: 1
-    MCU_FLASH_MIN_WRITE_SIZE: 1
-
-    # The mbuf append tests allocate lots of mbufs; ensure no exhaustion.
-    MSYS_1_BLOCK_COUNT: 1000
-    LOG_FLAGS_TRAILER_SUPPORT: 1
-    LOGS_TLV_NUM_ENTRIES: 1
-    IMGMGR_DUMMY_HDR: 1
-    LOG_MGMT: 0
-    IMG_MGMT: 0
diff --git a/sys/log/full/selftest/fcb2_align1_imghash/pkg.yml 
b/sys/log/full/selftest/fcb2_align1_imghash/pkg.yml
deleted file mode 100644
index f931c7d49..000000000
--- a/sys/log/full/selftest/fcb2_align1_imghash/pkg.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-pkg.name: sys/log/full/selftest/fcb2_align1_imghash
-pkg.type: unittest
-pkg.description: "Log unit tests; FCB2 flash-alignment=1."
-pkg.author: "Apache Mynewt <[email protected]>"
-pkg.homepage: "http://mynewt.apache.org/";
-pkg.keywords:
-
-pkg.deps:
-    - "@apache-mynewt-core/sys/console/stub"
-    - "@apache-mynewt-core/sys/log/full"
-    - "@apache-mynewt-core/sys/log/full/selftest/util"
-    - "@apache-mynewt-core/test/testutil"
-    - "@apache-mynewt-core/boot/stub"
diff --git a/sys/log/full/selftest/fcb2_align1_imghash/src/log_test_align1.c 
b/sys/log/full/selftest/fcb2_align1_imghash/src/log_test_align1.c
deleted file mode 100644
index 6fb73ffba..000000000
--- a/sys/log/full/selftest/fcb2_align1_imghash/src/log_test_align1.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include "os/mynewt.h"
-#include "log_test_util/log_test_util.h"
-
-int
-main(int argc, char **argv)
-{
-    log_test_suite_cbmem_flat();
-    log_test_suite_cbmem_mbuf();
-    log_test_suite_fcb_flat();
-    log_test_suite_fcb_mbuf();
-    log_test_suite_misc();
-
-    return tu_any_failed;
-}
diff --git a/sys/log/full/selftest/fcb2_align1_imghash/syscfg.yml 
b/sys/log/full/selftest/fcb2_align1_imghash/syscfg.yml
deleted file mode 100644
index fa4b33f97..000000000
--- a/sys/log/full/selftest/fcb2_align1_imghash/syscfg.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-syscfg.vals:
-    LOG_FCB2: 1
-    MCU_FLASH_MIN_WRITE_SIZE: 1
-    LOG_FLAGS_IMAGE_HASH: 1
-
-    # The mbuf append tests allocate lots of mbufs; ensure no exhaustion.
-    MSYS_1_BLOCK_COUNT: 1000
-    LOG_FLAGS_IMAGE_HASH: 1
-    IMGMGR_DUMMY_HDR: 1
-    LOG_MGMT: 0
-    IMG_MGMT: 0
diff --git a/sys/log/full/selftest/fcb2_align1_imghash_num_entries/pkg.yml 
b/sys/log/full/selftest/fcb2_align1_imghash_num_entries/pkg.yml
deleted file mode 100644
index e84f61ad7..000000000
--- a/sys/log/full/selftest/fcb2_align1_imghash_num_entries/pkg.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-pkg.name: sys/log/full/selftest/fcb2_align1_imghash_num_entries
-pkg.type: unittest
-pkg.description: "Log unit tests; FCB2 flash-alignment=1."
-pkg.author: "Apache Mynewt <[email protected]>"
-pkg.homepage: "http://mynewt.apache.org/";
-pkg.keywords:
-
-pkg.deps:
-    - "@apache-mynewt-core/sys/console/stub"
-    - "@apache-mynewt-core/sys/log/full"
-    - "@apache-mynewt-core/sys/log/full/selftest/util"
-    - "@apache-mynewt-core/test/testutil"
-    - "@apache-mynewt-core/boot/stub"
diff --git 
a/sys/log/full/selftest/fcb2_align1_imghash_num_entries/src/log_test_align1.c 
b/sys/log/full/selftest/fcb2_align1_imghash_num_entries/src/log_test_align1.c
deleted file mode 100644
index 6fb73ffba..000000000
--- 
a/sys/log/full/selftest/fcb2_align1_imghash_num_entries/src/log_test_align1.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include "os/mynewt.h"
-#include "log_test_util/log_test_util.h"
-
-int
-main(int argc, char **argv)
-{
-    log_test_suite_cbmem_flat();
-    log_test_suite_cbmem_mbuf();
-    log_test_suite_fcb_flat();
-    log_test_suite_fcb_mbuf();
-    log_test_suite_misc();
-
-    return tu_any_failed;
-}
diff --git a/sys/log/full/selftest/fcb2_align1_imghash_num_entries/syscfg.yml 
b/sys/log/full/selftest/fcb2_align1_imghash_num_entries/syscfg.yml
deleted file mode 100644
index 190b3e9d0..000000000
--- a/sys/log/full/selftest/fcb2_align1_imghash_num_entries/syscfg.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-syscfg.vals:
-    LOG_FCB2: 1
-    MCU_FLASH_MIN_WRITE_SIZE: 1
-
-    # The mbuf append tests allocate lots of mbufs; ensure no exhaustion.
-    MSYS_1_BLOCK_COUNT: 1000
-    LOG_FLAGS_IMAGE_HASH: 1
-    LOG_FLAGS_TRAILER_SUPPORT: 1
-    LOGS_TLV_NUM_ENTRIES: 1
-    IMGMGR_DUMMY_HDR: 1
-    LOG_MGMT: 0
-    IMG_MGMT: 0
diff --git a/sys/log/full/selftest/util/include/log_test_util/log_test_util.h 
b/sys/log/full/selftest/util/include/log_test_util/log_test_util.h
index 4c23c3733..90b77e498 100644
--- a/sys/log/full/selftest/util/include/log_test_util/log_test_util.h
+++ b/sys/log/full/selftest/util/include/log_test_util/log_test_util.h
@@ -41,7 +41,6 @@ extern struct fcb2 log_fcb;
 #endif
 extern struct log my_log;
 extern char *ltu_str_logs[];
-extern uint8_t dummy_log_arr[];
 
 struct os_mbuf *ltu_flat_to_fragged_mbuf(const void *flat, int len,
                                          int frag_sz);
@@ -50,9 +49,6 @@ void ltu_setup_2fcbs(struct fcb_log *fcb_log1, struct log 
*log1,
                      struct fcb_log *fcb_log2, struct log *log2);
 void ltu_setup_cbmem(struct cbmem *cbmem, struct log *log);
 void ltu_verify_contents(struct log *log);
-uint16_t *ltu_get_ltu_off_arr(void);
-uint16_t ltu_init_arr(void);
-int ltu_num_strs(void);
 
 TEST_SUITE_DECL(log_test_suite_cbmem_flat);
 TEST_CASE_DECL(log_test_case_cbmem_append);
diff --git a/sys/log/full/selftest/util/src/log_test_util.c 
b/sys/log/full/selftest/util/src/log_test_util.c
index b8a04cc7d..2447cbb61 100644
--- a/sys/log/full/selftest/util/src/log_test_util.c
+++ b/sys/log/full/selftest/util/src/log_test_util.c
@@ -18,7 +18,6 @@
  */
 
 #include "log_test_util/log_test_util.h"
-#include "log/log.h"
 
 #if MYNEWT_VAL(LOG_FCB)
 static struct flash_area fcb_areas[] = {
@@ -47,37 +46,6 @@ static struct flash_sector_range fcb_range = {
 static int ltu_str_idx = 0;
 static int ltu_str_max_idx = 0;
 
-struct dummy_log {
-    struct log_entry_hdr hdr;
-    struct log_tlv tlv;
-    uint32_t num_entries;
-};
-
-struct dummy_log dummy_log = {
-    .hdr = {
-        .ue_ts = 1,
-        .ue_module = 2,
-        .ue_etype = 3,
-        .ue_flags = 0
-#if MYNEWT_VAL(LOG_FLAGS_IMAGE_HASH)
-                    | LOG_FLAGS_IMG_HASH
-#endif
-#if MYNEWT_VAL(LOG_FLAGS_TRAILER_SUPPORT)
-                    | LOG_FLAGS_TRAILER_SUPPORT
-#endif
-        ,
-        .ue_etype = 0,
-        .ue_imghash = {1, 2, 3, 4},
-        .ue_level = 3,
-        .ue_num_entries = 5
-    },
-    .tlv = {
-        .tag = LOGS_TLV_NUM_ENTRIES,
-        .len = LOG_NUM_ENTRIES_SIZE
-    },
-    .num_entries = 0,
-};
-
 char *ltu_str_logs[] = {
     "testdata",
     "1testdata2",
@@ -86,10 +54,6 @@ char *ltu_str_logs[] = {
     NULL
 };
 
-uint16_t ltu_off_arr[5];
-
-uint8_t dummy_log_arr[2048];
-
 static uint8_t ltu_cbmem_buf[2048];
 
 int
@@ -102,41 +66,6 @@ ltu_num_strs(void)
     return i;
 }
 
-uint16_t *
-ltu_get_ltu_off_arr(void)
-{
-    return ltu_off_arr;
-}
-
-uint16_t
-ltu_init_arr(void)
-{
-    int i;
-    uint16_t offset = 0;
-
-    for (i = 0; i < ltu_num_strs(); i++) {
-        TEST_ASSERT_FATAL(offset <= 2048);
-        ltu_off_arr[i] = offset;
-        memcpy(dummy_log_arr + offset, &dummy_log.hdr, 
LOG_BASE_ENTRY_HDR_SIZE);
-        offset += LOG_BASE_ENTRY_HDR_SIZE;
-#if MYNEWT_VAL(LOG_FLAGS_IMAGE_HASH)
-        memcpy(dummy_log_arr + offset,
-               dummy_log.hdr.ue_imghash, LOG_IMG_HASHLEN);
-        offset += LOG_IMG_HASHLEN;
-#endif
-        memcpy(dummy_log_arr + offset, ltu_str_logs[i], 
strlen(ltu_str_logs[i]));
-        offset += strlen(ltu_str_logs[i]);
-#if MYNEWT_VAL(LOG_FLAGS_TRAILER_SUPPORT) && MYNEWT_VAL(LOGS_TLV_NUM_ENTRIES)
-        memcpy(dummy_log_arr + offset, &dummy_log.tlv, sizeof(struct log_tlv));
-        offset += sizeof(struct log_tlv);
-        memcpy(dummy_log_arr + offset, &dummy_log.num_entries, 
LOG_NUM_ENTRIES_SIZE);
-        offset += LOG_NUM_ENTRIES_SIZE;
-#endif
-    }
-    ltu_off_arr[i] = offset;
-    return offset;
-}
-
 struct os_mbuf *
 ltu_flat_to_fragged_mbuf(const void *flat, int len, int frag_sz)
 {
@@ -261,8 +190,6 @@ ltu_walk_verify(struct log *log, struct log_offset 
*log_offset,
     char data[128];
     int dlen;
     uint16_t hdr_len;
-    uint16_t trailer_len;
-    uint16_t offset = 0;
 
     TEST_ASSERT(ltu_str_idx < ltu_str_max_idx);
 
@@ -270,17 +197,9 @@ ltu_walk_verify(struct log *log, struct log_offset 
*log_offset,
 
     rc = log_read(log, dptr, &ueh, 0, LOG_BASE_ENTRY_HDR_SIZE);
     TEST_ASSERT(rc == LOG_BASE_ENTRY_HDR_SIZE);
-    offset = LOG_BASE_ENTRY_HDR_SIZE;
-
-    if (ueh.ue_flags & LOG_FLAGS_IMG_HASH) {
-        rc = log_read(log, dptr, data, offset, LOG_IMG_HASHLEN);
-        TEST_ASSERT(rc == LOG_IMG_HASHLEN);
-        offset += LOG_IMG_HASHLEN;
-    }
 
     hdr_len = log_hdr_len(&ueh);
-    trailer_len = log_trailer_len(log, &ueh);
-    dlen = len - hdr_len - trailer_len;
+    dlen = len - hdr_len;
     TEST_ASSERT(dlen < sizeof(data));
 
     rc = log_read(log, dptr, data, hdr_len, dlen);
@@ -299,12 +218,6 @@ ltu_walk_verify(struct log *log, struct log_offset 
*log_offset,
     rc = log_read_body(log, dptr, data, 0, dlen);
     TEST_ASSERT(rc == dlen);
 
-#if MYNEWT_VAL(LOG_FLAGS_TRAILER_SUPPORT) && MYNEWT_VAL(LOGS_TLV_NUM_ENTRIES)
-    uint32_t num_entries;;
-    rc = log_read_trailer(log, dptr, LOGS_TLV_NUM_ENTRIES, &num_entries);
-    TEST_ASSERT(rc == 0);
-#endif
-
     TEST_ASSERT(strlen(ltu_str_logs[ltu_str_idx]) == dlen);
     TEST_ASSERT(!memcmp(ltu_str_logs[ltu_str_idx], data, dlen));
 
@@ -350,8 +263,6 @@ ltu_walk_body_verify(struct log *log, struct log_offset 
*log_offset,
 
     TEST_ASSERT(len < sizeof(data));
 
-    len -= log_trailer_len(log, euh);
-
     rc = log_read_body(log, dptr, data, 0, len);
     TEST_ASSERT(rc == len);
 
diff --git 
a/sys/log/full/selftest/util/src/testcases/log_test_case_cbmem_append.c 
b/sys/log/full/selftest/util/src/testcases/log_test_case_cbmem_append.c
index 5f5d9d17a..180f3774f 100644
--- a/sys/log/full/selftest/util/src/testcases/log_test_case_cbmem_append.c
+++ b/sys/log/full/selftest/util/src/testcases/log_test_case_cbmem_append.c
@@ -23,26 +23,23 @@ TEST_CASE_SELF(log_test_case_cbmem_append)
 {
     struct cbmem cbmem;
     struct log log;
-    uint16_t len = 0;
-    uint16_t *off_arr;
+    uint8_t buf[256];
+    char *str;
+    int body_len;
     int i;
     int rc;
-    int num_strs = ltu_num_strs();
-    struct log_entry_hdr *hdr;
 
     ltu_setup_cbmem(&cbmem, &log);
-    len = ltu_init_arr();
-    TEST_ASSERT_FATAL(len != 0);
 
-    off_arr = ltu_get_ltu_off_arr();
-    TEST_ASSERT_FATAL(off_arr != NULL);
+    for (i = 0; ; i++) {
+        str = ltu_str_logs[i];
+        if (!str) {
+            break;
+        }
 
-    for (i = 0; i < num_strs; i++) {
-       hdr = (struct log_entry_hdr *)(dummy_log_arr + off_arr[i]);
-        len = off_arr[i+1] - off_arr[i] - log_hdr_len(hdr) - 
log_trailer_len(&log, hdr);
-        rc = log_append_typed(&log, 2, 3, LOG_ETYPE_STRING,
-                              dummy_log_arr + off_arr[i],
-                              len);
+        body_len = strlen(str);
+        memcpy(buf + LOG_HDR_SIZE, str, body_len);
+        rc = log_append_typed(&log, 0, 0, LOG_ETYPE_STRING, buf, body_len);
         TEST_ASSERT_FATAL(rc == 0);
     }
 
diff --git 
a/sys/log/full/selftest/util/src/testcases/log_test_case_cbmem_append_body.c 
b/sys/log/full/selftest/util/src/testcases/log_test_case_cbmem_append_body.c
index 8948bacad..0a7fb1c11 100644
--- a/sys/log/full/selftest/util/src/testcases/log_test_case_cbmem_append_body.c
+++ b/sys/log/full/selftest/util/src/testcases/log_test_case_cbmem_append_body.c
@@ -23,28 +23,18 @@ TEST_CASE_SELF(log_test_case_cbmem_append_body)
 {
     struct cbmem cbmem;
     struct log log;
-    uint16_t len = 0;
-    uint16_t *off_arr;
+    char *str;
     int i;
-    int rc;
-    struct log_entry_hdr *hdr;
-    int num_strs = ltu_num_strs();
 
     ltu_setup_cbmem(&cbmem, &log);
-    len = ltu_init_arr();
-    TEST_ASSERT_FATAL(len != 0);
 
-    off_arr = ltu_get_ltu_off_arr();
-    TEST_ASSERT_FATAL(off_arr != NULL);
+    for (i = 0; ; i++) {
+        str = ltu_str_logs[i];
+        if (!str) {
+            break;
+        }
 
-    for (i = 0; i < num_strs; i++) {
-        hdr = (struct log_entry_hdr *)(dummy_log_arr + off_arr[i]);
-        len = off_arr[i + 1] - off_arr[i] -
-              log_hdr_len(hdr) - log_trailer_len(&log, hdr);
-        rc = log_append_body(&log, 2, 3, LOG_ETYPE_STRING,
-                             dummy_log_arr + off_arr[i] + log_hdr_len(hdr),
-                             len);
-        TEST_ASSERT_FATAL(rc == 0);
+        log_append_body(&log, 0, 0, LOG_ETYPE_STRING, str, strlen(str));
     }
 
     ltu_verify_contents(&log);
diff --git 
a/sys/log/full/selftest/util/src/testcases/log_test_case_cbmem_append_mbuf.c 
b/sys/log/full/selftest/util/src/testcases/log_test_case_cbmem_append_mbuf.c
index aaeab19d3..3bf305549 100644
--- a/sys/log/full/selftest/util/src/testcases/log_test_case_cbmem_append_mbuf.c
+++ b/sys/log/full/selftest/util/src/testcases/log_test_case_cbmem_append_mbuf.c
@@ -22,28 +22,28 @@
 TEST_CASE_SELF(log_test_case_cbmem_append_mbuf)
 {
     struct cbmem cbmem;
-    struct log log;
     struct os_mbuf *om;
-    uint16_t len = 0;
-    uint16_t *off_arr;
-    int i;
+    struct log log;
+    char *str;
     int rc;
-    int num_strs = ltu_num_strs();
+    int i;
 
     ltu_setup_cbmem(&cbmem, &log);
-    len = ltu_init_arr();
-    TEST_ASSERT_FATAL(len != 0);
 
-    off_arr = ltu_get_ltu_off_arr();
-    TEST_ASSERT_FATAL(off_arr != NULL);
+    for (i = 0; ; i++) {
+        str = ltu_str_logs[i];
+        if (!str) {
+            break;
+        }
 
-    for (i = 0; i < num_strs; i++) {
-        len = off_arr[i+1] - off_arr[i];
         /* Split chain into several mbufs. */
-        om = ltu_flat_to_fragged_mbuf(dummy_log_arr + off_arr[i],
-                                      len, 2);
+        om = ltu_flat_to_fragged_mbuf(str, strlen(str), 2);
+
+        /* Prepend space for the entry header. */
+        om = os_mbuf_prepend(om, LOG_HDR_SIZE);
+        TEST_ASSERT(om != NULL);
 
-        rc = log_append_mbuf_typed(&log, 2, 3, LOG_ETYPE_STRING, om);
+        rc = log_append_mbuf_typed(&log, 0, 0, LOG_ETYPE_STRING, om);
         TEST_ASSERT_FATAL(rc == 0);
     }
 
diff --git 
a/sys/log/full/selftest/util/src/testcases/log_test_case_cbmem_append_mbuf_body.c
 
b/sys/log/full/selftest/util/src/testcases/log_test_case_cbmem_append_mbuf_body.c
index 86775f807..fddb1bbc8 100644
--- 
a/sys/log/full/selftest/util/src/testcases/log_test_case_cbmem_append_mbuf_body.c
+++ 
b/sys/log/full/selftest/util/src/testcases/log_test_case_cbmem_append_mbuf_body.c
@@ -24,30 +24,22 @@ TEST_CASE_SELF(log_test_case_cbmem_append_mbuf_body)
     struct cbmem cbmem;
     struct os_mbuf *om;
     struct log log;
+    char *str;
     int rc;
     int i;
-    uint16_t len;
-    int num_strs = ltu_num_strs();
-    struct log_entry_hdr *hdr;
-    uint16_t *off_arr;
 
     ltu_setup_cbmem(&cbmem, &log);
-    len = ltu_init_arr();
-    TEST_ASSERT_FATAL(len != 0);
 
-    off_arr = ltu_get_ltu_off_arr();
-    TEST_ASSERT_FATAL(off_arr != NULL);
-
-    for (i = 0; i < num_strs; i++) {
-        hdr = (struct log_entry_hdr *)(dummy_log_arr + off_arr[i]);
-        len = off_arr[i + 1] - off_arr[i] -
-              log_hdr_len(hdr);
+    for (i = 0; ; i++) {
+        str = ltu_str_logs[i];
+        if (!str) {
+            break;
+        }
 
         /* Split chain into several mbufs. */
-        om = ltu_flat_to_fragged_mbuf(dummy_log_arr + off_arr[i] + 
log_hdr_len(hdr),
-                                      len, 2);
+        om = ltu_flat_to_fragged_mbuf(str, strlen(str), 2);
 
-        rc = log_append_mbuf_body(&log, 2, 3, LOG_ETYPE_STRING, om);
+        rc = log_append_mbuf_body(&log, 0, 0, LOG_ETYPE_STRING, om);
         TEST_ASSERT_FATAL(rc == 0);
     }
 
diff --git 
a/sys/log/full/selftest/util/src/testcases/log_test_case_cbmem_printf.c 
b/sys/log/full/selftest/util/src/testcases/log_test_case_cbmem_printf.c
index f29bdcdb1..f48b87657 100644
--- a/sys/log/full/selftest/util/src/testcases/log_test_case_cbmem_printf.c
+++ b/sys/log/full/selftest/util/src/testcases/log_test_case_cbmem_printf.c
@@ -23,27 +23,18 @@ TEST_CASE_SELF(log_test_case_cbmem_printf)
 {
     struct cbmem cbmem;
     struct log log;
+    char *str;
     int i;
-    uint16_t len = 0;
-    int num_strs = ltu_num_strs();
-    uint16_t *off_arr;
-    struct log_entry_hdr *hdr;
-    char data[256];
 
     ltu_setup_cbmem(&cbmem, &log);
-    len = ltu_init_arr();
-    TEST_ASSERT_FATAL(len != 0);
 
-    off_arr = ltu_get_ltu_off_arr();
-    TEST_ASSERT_FATAL(off_arr != NULL);
+    for (i = 0; ; i++) {
+        str = ltu_str_logs[i];
+        if (!str) {
+            break;
+        }
 
-    for (i = 0; i < num_strs; i++) {
-       hdr = (struct log_entry_hdr *)(dummy_log_arr + off_arr[i]);
-        len = off_arr[i+1] - off_arr[i] - log_hdr_len(hdr) - 
log_trailer_len(&log, hdr);
-       memcpy(data, dummy_log_arr + off_arr[i] + log_hdr_len(hdr),
-              len);
-       data[len] = '\0';
-        log_printf(&log, 0, 0, data, len);
+        log_printf(&log, 0, 0, str, strlen(str));
     }
 
     ltu_verify_contents(&log);
diff --git 
a/sys/log/full/selftest/util/src/testcases/log_test_case_fcb_append.c 
b/sys/log/full/selftest/util/src/testcases/log_test_case_fcb_append.c
index 3fe8f4e28..808188ce1 100644
--- a/sys/log/full/selftest/util/src/testcases/log_test_case_fcb_append.c
+++ b/sys/log/full/selftest/util/src/testcases/log_test_case_fcb_append.c
@@ -23,27 +23,22 @@ TEST_CASE_SELF(log_test_case_fcb_append)
 {
     struct fcb_log fcb_log;
     struct log log;
-    uint16_t len = 0;
-    uint16_t *off_arr;
+    uint8_t buf[256];
+    char *str;
+    int body_len;
     int i;
-    int rc;
-    int num_strs = ltu_num_strs();
-    struct log_entry_hdr *hdr;
 
     ltu_setup_fcb(&fcb_log, &log);
-    len = ltu_init_arr();
-    TEST_ASSERT_FATAL(len != 0);
 
-    off_arr = ltu_get_ltu_off_arr();
-    TEST_ASSERT_FATAL(off_arr != NULL);
+    for (i = 0; ; i++) {
+        str = ltu_str_logs[i];
+        if (!str) {
+            break;
+        }
 
-    for (i = 0;i < num_strs; i++) {
-       hdr = (struct log_entry_hdr *)(dummy_log_arr + off_arr[i]);
-        len = off_arr[i+1] - off_arr[i] - log_hdr_len(hdr) - 
log_trailer_len(&log, hdr);
-        rc = log_append_typed(&log, 2, 3, LOG_ETYPE_STRING,
-                              dummy_log_arr + off_arr[i],
-                              len);
-        TEST_ASSERT_FATAL(rc == 0);
+        body_len = strlen(str);
+        memcpy(buf + LOG_HDR_SIZE, str, body_len);
+        log_append_typed(&log, 0, 0, LOG_ETYPE_STRING, buf, body_len);
     }
 
     ltu_verify_contents(&log);
diff --git 
a/sys/log/full/selftest/util/src/testcases/log_test_case_fcb_append_body.c 
b/sys/log/full/selftest/util/src/testcases/log_test_case_fcb_append_body.c
index 996ff647e..1d0a86637 100644
--- a/sys/log/full/selftest/util/src/testcases/log_test_case_fcb_append_body.c
+++ b/sys/log/full/selftest/util/src/testcases/log_test_case_fcb_append_body.c
@@ -23,30 +23,18 @@ TEST_CASE_SELF(log_test_case_fcb_append_body)
 {
     struct fcb_log fcb_log;
     struct log log;
-    uint16_t len = 0;
-    uint16_t *off_arr;
+    char *str;
     int i;
-    int rc;
-    struct log_entry_hdr *hdr;
-    int num_strs = ltu_num_strs();
 
     ltu_setup_fcb(&fcb_log, &log);
-    len = ltu_init_arr();
-    TEST_ASSERT_FATAL(len != 0);
 
-    off_arr = ltu_get_ltu_off_arr();
-    TEST_ASSERT_FATAL(off_arr != NULL);
-
-    for (i = 0; i < num_strs; i++) {
-        hdr = (struct log_entry_hdr *)(dummy_log_arr + off_arr[i]);
-        len = off_arr[i + 1] - off_arr[i] -
-              log_hdr_len(hdr) - log_trailer_len(&log, hdr);
-        rc = log_append_body(&log, 2, 3, LOG_ETYPE_STRING,
-                             dummy_log_arr + off_arr[i] + log_hdr_len(hdr),
-                             len);
-        TEST_ASSERT_FATAL(rc == 0);
+    for (i = 0; ; i++) {
+        str = ltu_str_logs[i];
+        if (!str) {
+            break;
+        }
+        log_append_body(&log, 0, 0, LOG_ETYPE_STRING, str, strlen(str));
     }
 
     ltu_verify_contents(&log);
-
 }
diff --git 
a/sys/log/full/selftest/util/src/testcases/log_test_case_fcb_append_mbuf.c 
b/sys/log/full/selftest/util/src/testcases/log_test_case_fcb_append_mbuf.c
index 7a3c2b035..e566c78bd 100644
--- a/sys/log/full/selftest/util/src/testcases/log_test_case_fcb_append_mbuf.c
+++ b/sys/log/full/selftest/util/src/testcases/log_test_case_fcb_append_mbuf.c
@@ -24,28 +24,26 @@ TEST_CASE_SELF(log_test_case_fcb_append_mbuf)
     struct fcb_log fcb_log;
     struct os_mbuf *om;
     struct log log;
+    char *str;
     int rc;
     int i;
-    int num_strs = ltu_num_strs();
-    struct log_entry_hdr *hdr;
-    uint16_t *off_arr;
-    uint16_t len;
 
     ltu_setup_fcb(&fcb_log, &log);
-    len = ltu_init_arr();
-    TEST_ASSERT_FATAL(len != 0);
 
-    off_arr = ltu_get_ltu_off_arr();
-    TEST_ASSERT_FATAL(off_arr != NULL);
+    for (i = 0; ; i++) {
+        str = ltu_str_logs[i];
+        if (!str) {
+            break;
+        }
 
-    for (i = 0; i < num_strs; i++) {
-        hdr = (struct log_entry_hdr *)(dummy_log_arr + off_arr[i]);
-        len = off_arr[i+1] - off_arr[i] - log_trailer_len(&log, hdr);
         /* Split chain into several mbufs. */
-        om = ltu_flat_to_fragged_mbuf(dummy_log_arr + off_arr[i],
-                                      len, 2);
+        om = ltu_flat_to_fragged_mbuf(str, strlen(str), 2);
 
-        rc = log_append_mbuf_typed(&log, 2, 3, LOG_ETYPE_STRING, om);
+        /* Prepend space for the entry header. */
+        om = os_mbuf_prepend(om, LOG_HDR_SIZE);
+        TEST_ASSERT(om != NULL);
+
+        rc = log_append_mbuf_typed(&log, 0, 0, LOG_ETYPE_STRING, om);
         TEST_ASSERT_FATAL(rc == 0);
     }
 
diff --git 
a/sys/log/full/selftest/util/src/testcases/log_test_case_fcb_append_mbuf_body.c 
b/sys/log/full/selftest/util/src/testcases/log_test_case_fcb_append_mbuf_body.c
index bc980835a..25d536479 100644
--- 
a/sys/log/full/selftest/util/src/testcases/log_test_case_fcb_append_mbuf_body.c
+++ 
b/sys/log/full/selftest/util/src/testcases/log_test_case_fcb_append_mbuf_body.c
@@ -24,30 +24,22 @@ TEST_CASE_SELF(log_test_case_fcb_append_mbuf_body)
     struct fcb_log fcb_log;
     struct os_mbuf *om;
     struct log log;
+    char *str;
     int rc;
     int i;
-    int num_strs = ltu_num_strs();
-    struct log_entry_hdr *hdr;
-    uint16_t *off_arr;
-    uint16_t len;
 
     ltu_setup_fcb(&fcb_log, &log);
-    len = ltu_init_arr();
-    TEST_ASSERT_FATAL(len != 0);
 
-    off_arr = ltu_get_ltu_off_arr();
-    TEST_ASSERT_FATAL(off_arr != NULL);
-
-    for (i = 0; i < num_strs; i++) {
-        hdr = (struct log_entry_hdr *)(dummy_log_arr + off_arr[i]);
-        len = off_arr[i + 1] - off_arr[i] -
-              log_hdr_len(hdr) - log_trailer_len(&log, hdr);
+    for (i = 0; ; i++) {
+        str = ltu_str_logs[i];
+        if (!str) {
+            break;
+        }
 
         /* Split chain into several mbufs. */
-        om = ltu_flat_to_fragged_mbuf(dummy_log_arr + off_arr[i] + 
log_hdr_len(hdr),
-                                      len, 2);
+        om = ltu_flat_to_fragged_mbuf(str, strlen(str), 2);
 
-        rc = log_append_mbuf_body(&log, 2, 3, LOG_ETYPE_STRING, om);
+        rc = log_append_mbuf_body(&log, 0, 0, LOG_ETYPE_STRING, om);
         TEST_ASSERT_FATAL(rc == 0);
     }
 


Reply via email to