-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sys/log/full/selftest: Add unit tests for log fcb2 image hash and num…
…_entries
- Loading branch information
Showing
8 changed files
with
190 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# 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" |
33 changes: 33 additions & 0 deletions
33
sys/log/full/selftest/fcb2_align1_imghash/src/log_test_align1.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* 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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# 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 |
29 changes: 29 additions & 0 deletions
29
sys/log/full/selftest/fcb2_align1_imghash_num_entries/pkg.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# 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" |
33 changes: 33 additions & 0 deletions
33
sys/log/full/selftest/fcb2_align1_imghash_num_entries/src/log_test_align1.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* 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; | ||
} |
27 changes: 27 additions & 0 deletions
27
sys/log/full/selftest/fcb2_align1_imghash_num_entries/syscfg.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# 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 | ||
LOG_FLAGS_TLV_SUPPORT: 1 | ||
LOG_TLV_NUM_ENTRIES: 1 | ||
|
||
# The mbuf append tests allocate lots of mbufs; ensure no exhaustion. | ||
MSYS_1_BLOCK_COUNT: 1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters