summaryrefslogtreecommitdiffstats
path: root/tests/templates (follow)
Commit message (Collapse)AuthorAgeFilesLines
* mdadm/tests: judge foreign array in test casesXiao Ni2024-06-201-0/+2
| | | | | | | | | It needs to use array name when judging if one array is foreign or not. So calling is_raid_foreign in test cases which need it. Fixes: 41706a915684 ('mdadm/tests: names_template enhance') Signed-off-by: Xiao Ni <xni@redhat.com> Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
* mdadm/tests: names_template enhanceXiao Ni2024-05-241-2/+12
| | | | | | | | | | | | For super1, if the length of hostname is >= 32, it doesn't add hostname in metadata name. Fix this problem by checking the length of hostname. Because other cases may use need to check this, so do the check in do_setup. And this patch adds a check if link /dev/md/name exists. Signed-off-by: Xiao Ni <xni@redhat.com> Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
* super1: remove support for name= in configMariusz Tkaczyk2024-02-091-6/+1
| | | | | | | | | | | | | | | | | | | | | | | Only super1 provides "name=" to config. It is recoreded in metadata so there is no need to duplicate same information. UUID is our main key. It is not used by Incremental and Assemble handles empty name well because other supertypes don't set it in conf. Expectation that the name in config is same as in metadata is bug prone. Config should be the place where use can define customized settings. Remove printing "name=" from mdadm config creation commands. Ignore the name in config file to keep backward compatibility. Remove description from man mdadm.conf. Update 00conftest because "name" is no longer accepted. As the name is ignored, error for mdadm --detail is not printed. Reported-by: Stefan Fleischmann <sfle@kth.se> Fixes: e2eb503bd797 ("mdadm: Follow POSIX Portable Character Set") Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
* mdadm: define ident_set_devname()Mariusz Tkaczyk2023-10-261-0/+7
| | | | | | | | | | | | | | | | | Use dedicated set method for ident->devname. Now, devname validation is done early for modes where device is created (Build, Create and Assemble). The rules, used for devname validation are derived from config file. It could cause regression with execeptional cases where existing device has name which doesn't match criteria for Manage and Grow modes. It is low risk and those modes are not omitted from early devname validation. Use can used main numbered devnode to avoid this problem. Messages exposed to user are changed so it might cause a regression in negative scenarios. Error codes are not changed. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
* tests: create 00confnamesMariusz Tkaczyk2023-10-261-0/+20
| | | | | | | | | | | | The test is an attempt to document current implementation of devnode and name handling for config entries. It is focused on incremental- default way of array assembling on boot. The expectations are aligned to current implementation for native metadata because it is the most complicated scenario- both variables can be set. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
* tests: create names_templateMariusz Tkaczyk2023-10-261-0/+53
Create templates directory and names_template. Move code from 00createnames. This code will be reused for 00confnames in next patch. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> Signed-off-by: Jes Sorensen <jes@trained-monkey.org>