Skip to content

Add in-memory BlockDevice implementation for automated tests #3

Description

@ashishsinghbora

Problem Statement

Many FlashCore storage components currently depend on a real storage device for testing.

This makes tests slower, harder to reproduce, and unsuitable for some CI environments.

Proposed Solution / Enhancement

Implement a MemoryBlockDevice that stores sectors in memory and follows the existing BlockDevice interface.

The implementation should support:

  • Configurable sector size
  • Configurable number of sectors
  • Read operations
  • Write operations
  • Flush
  • Bounds checking

Use this device for automated tests involving:

  • MBR
  • GPT
  • FAT32
  • Partition operations
  • Read/write logic

Architectural Layer Impacted

Block Device Layer / Testing

Alternatives Considered

Using physical USB devices for these tests would make the tests unreliable and unsuitable for normal CI execution.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestphase:storagePhase: Storage and filesystemstestingTesting and test infrastructure

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions