File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed
Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # SPDX-License-Identifier: GPL-3.0+
3+ # Copyright (C) 2025 Yi Zhang <yi.zhang@redhat.com>
4+ #
5+ # Test nvme format NVMe disk with supported LBA format
6+ #
7+
8+ . tests/nvme/rc
9+
10+ DESCRIPTION=" Test nvme format NVMe disk with supported LBA format"
11+ QUICK=1
12+
13+ requires () {
14+ _nvme_requires
15+ _have_program jq
16+ }
17+
18+ test_device () {
19+ echo " Running ${TEST_NAME} "
20+
21+ local flbas nlbaf lbaf
22+
23+ flbas=$( nvme id-ns --output-format=json " $TEST_DEV " | jq ' .flbas' )
24+ nlbaf=$( nvme id-ns --output-format=json " $TEST_DEV " | jq ' .nlbaf' )
25+
26+ for lbaf in $( seq 0 " $nlbaf " ) ; do
27+ nvme format --lbaf=" $lbaf " --force " $TEST_DEV " >> " ${FULL} "
28+ done
29+
30+ # Restore to the original lbaf
31+ nvme format --lbaf=" $flbas " --force " $TEST_DEV " >> " ${FULL} "
32+
33+ udevadm settle
34+
35+ echo " Test complete"
36+ }
Original file line number Diff line number Diff line change 1+ Running nvme/065
2+ Test complete
You can’t perform that action at this time.
0 commit comments