block-device

Tests Block Device functionality including partitioning, formatting, mounting, writing, reading and umounting.

What It Tests

  • Block Device Presence: Check the device presence

  • Block Device Not mounted: Check the device not mounted at the begginning

  • Block Device Erase: Erase the device successfully

  • Block Device Partition: Create a partition table

  • Block Device Format: Format the partition as ext4

  • Block Device Mount: Mount the parttion

  • Block Device Write: Write data to the file located in the mounted parttion

  • Block Device Read: Read data from the file located in the mounted parttion

  • Block Device Performance: Bonnie++ test

Preconditions

  • Block device must be present

  • System requires root privileges for Bonnie++ commands

  • bonnie++ package should be available

Test Parameters

Parameter

Default

Description

SKIP_INSTALL

"False"

Skip package installation

DEVICE

"/dev/sdXN"

Block device partition

FORMAT_DEVICE

"False"

Format or not

Test Steps

- cd ./automated/linux/block-device
- ./block-device.sh -s "${SKIP_INSTALL}" -d "${DEVICE}" -f "${FORMAT_DEVICE}"

Refer to block-device.yaml for complete test definition and execution details.

Expected Results

  • Block device is present

  • Block device is not mounted at the beginning

  • Block device is can be erased

  • Block device is can be created partition table

  • Block device is can be formatted as ext4

  • Block device is can be mounted

  • Block device is can be written

  • Block device is can be read

References