diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:55:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:55:34 +0000 |
commit | 7f1d6c8fec531fa1762d6d65576aecbee837982c (patch) | |
tree | b37177c380fa30d0336aad7cac9c72035523206a /tests/00createnames | |
parent | Initial commit. (diff) | |
download | mdadm-7f1d6c8fec531fa1762d6d65576aecbee837982c.tar.xz mdadm-7f1d6c8fec531fa1762d6d65576aecbee837982c.zip |
Adding upstream version 4.3.upstream/4.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/00createnames | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/00createnames b/tests/00createnames new file mode 100644 index 0000000..a95e7d2 --- /dev/null +++ b/tests/00createnames @@ -0,0 +1,44 @@ +set -x -e +. tests/templates/names_template + +# Test how <devname> and --name= are handled for create mode. + +# The most trivial case. +names_create "/dev/md/name" +names_verify "/dev/md127" "name" "name" +mdadm -S "/dev/md127" + +names_create "name" +names_verify "/dev/md127" "name" "name" +mdadm -S "/dev/md127" + +# Use 'mdX' as name. +names_create "/dev/md/md0" +names_verify "/dev/md127" "md0" "md0" +mdadm -S "/dev/md127" + +names_create "md0" +names_verify "/dev/md127" "md0" "md0" +mdadm -S "/dev/md127" + +# <devnode> is used to create MD_DEVNAME but, name is used to create MD_NAME. +names_create "/dev/md/devnode" "name" +names_verify "/dev/md127" "devnode" "name" +mdadm -S "/dev/md127" + +names_create "devnode" "name" +names_verify "/dev/md127" "devnode" "name" +mdadm -S "/dev/md127" + +# Devnode points to /dev/ directory. MD_DEVNAME doesn't exist. +names_create "/dev/md0" +names_verify "/dev/md0" "empty" "0" +mdadm -S "/dev/md0" + +# Devnode points to /dev/ directory and name is set. +names_create "/dev/md0" "name" +names_verify "/dev/md0" "empty" "name" +mdadm -S "/dev/md0" + +# Devnode is a special ignore keyword. Should be rejected. +names_create "<ignore>" "name", "true" |