Skip to content

Storage related test improvements and small fixes #11986

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Dec 4, 2019

Conversation

SeppoTakalo
Copy link
Contributor

Description

Summary of change

Small changes in this PR:

  • BufferedBlockDevice: Sync all the buffers on deinit()
  • Don't allow over-read on BufferedBlockDevice
  • HeapBlockDevice: Don't assert on const functions
  • Remove unceressary NULL check from BufferedBlockDevice::size()
  • SlicingBlockDevice should assert, if size does not look valid <-- IS THIS API CHANGE?
  • Extend SlicingBlockDevice test coverage
  • Greenteatests: Validate KVStore content when WRITE_ONCE flag is set.
  • Remove flaky error_inject_test
  • Fix Greentea handler typecasting

Documentation


Pull request type

[] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[X] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[X] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers

@VeijoPesonen

Release Notes

Summary of changes

SlicingBlockDevice does not anymore accept both parameters as zero, or size as zero. SlicingBlockDevice(block, 0,0) used to create a block device that took up the whole block device. There is no sense on doing so, and if used like this, it has most probably been a programming error. Therefore the constructor now does MBED_ASSERT() if both parameters, start and stop point to same value. Effectively this prevents creating a slice that has size of zero, or take the full block device.

Impact of changes

You cannot anymore create a SlicingBlockDevice that has size of zero, or take the full size of underlying block device.

Migration actions required

No migration required for code that uses SlicingBlockDevice as it is intended.

Copy link
Contributor

@VeijoPesonen VeijoPesonen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@ciarmcom ciarmcom requested review from VeijoPesonen and a team November 29, 2019 12:00
@ciarmcom
Copy link
Member

@SeppoTakalo, thank you for your changes.
@VeijoPesonen @ARMmbed/mbed-os-storage @ARMmbed/mbed-os-maintainers please review.

Copy link
Contributor

@VeijoPesonen VeijoPesonen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@mbed-ci
Copy link

mbed-ci commented Nov 29, 2019

Test run: FAILED

Summary: 1 of 11 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 2, 2019

Failures look related, please review

@SeppoTakalo SeppoTakalo force-pushed the feature_storage_test_improvements branch from 885ca50 to 0fe159f Compare December 3, 2019 12:51
@SeppoTakalo
Copy link
Contributor Author

Issue was that bcaf37d causes test to ASSERT if SlicingBlockDevice size is not valid.
This was fixed on kvstore_phase_1 test on abbb248 but not on "Phase_2"

Added a commit that fixes kvstore_phase_2 test as well.

@SeppoTakalo
Copy link
Contributor Author

Started a CI.

@0xc0170 0xc0170 added the release-version: 6.0.0-alpha-1 First pre-release version of 6.0.0 label Dec 3, 2019
@mbed-ci
Copy link

mbed-ci commented Dec 3, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 2
Build artifacts

@SeppoTakalo
Copy link
Contributor Author

@0xc0170 This is ready.

@0xc0170 0xc0170 merged commit 6f18801 into master Dec 4, 2019
@SeppoTakalo SeppoTakalo deleted the feature_storage_test_improvements branch December 4, 2019 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-version: 6.0.0-alpha-1 First pre-release version of 6.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants