mirror of
https://github.com/systemd/systemd
synced 2024-09-06 00:41:36 +00:00
test-64-udev-storage: partition disk inside testcase - testcase_long_sysfs_path
This commit is contained in:
parent
d398a2e004
commit
8d82e39046
|
@ -475,18 +475,6 @@ testcase_long_sysfs_path() {
|
||||||
)
|
)
|
||||||
|
|
||||||
dd if=/dev/zero of="$testdisk" bs=1M count=64
|
dd if=/dev/zero of="$testdisk" bs=1M count=64
|
||||||
lodev="$(losetup --show -f -P "$testdisk")"
|
|
||||||
sfdisk "${lodev:?}" <<EOF
|
|
||||||
label: gpt
|
|
||||||
|
|
||||||
name="test_swap", size=32M
|
|
||||||
uuid="deadbeef-dead-dead-beef-000000000000", name="test_part", size=5M
|
|
||||||
EOF
|
|
||||||
udevadm settle
|
|
||||||
mkswap -U "deadbeef-dead-dead-beef-111111111111" -L "swap_vol" "${lodev}p1"
|
|
||||||
mkfs.ext4 -U "deadbeef-dead-dead-beef-222222222222" -L "data_vol" "${lodev}p2"
|
|
||||||
losetup -d "$lodev"
|
|
||||||
|
|
||||||
# Create 25 additional PCI bridges, each one connected to the previous one
|
# Create 25 additional PCI bridges, each one connected to the previous one
|
||||||
# (basically a really long extension cable), and attach a virtio drive to
|
# (basically a really long extension cable), and attach a virtio drive to
|
||||||
# the last one. This should force udev into attempting to create a device
|
# the last one. This should force udev into attempting to create a device
|
||||||
|
|
|
@ -1117,6 +1117,9 @@ install_fs_tools() {
|
||||||
# we use mkfs in system-repart tests
|
# we use mkfs in system-repart tests
|
||||||
image_install /sbin/mkfs.ext4
|
image_install /sbin/mkfs.ext4
|
||||||
image_install /sbin/mkfs.vfat
|
image_install /sbin/mkfs.vfat
|
||||||
|
|
||||||
|
# we use mkswap in udev-storage tests
|
||||||
|
image_install /sbin/mkswap
|
||||||
}
|
}
|
||||||
|
|
||||||
install_modules() {
|
install_modules() {
|
||||||
|
|
|
@ -950,6 +950,16 @@ testcase_long_sysfs_path() {
|
||||||
stat /sys/block/vda
|
stat /sys/block/vda
|
||||||
readlink -f /sys/block/vda/dev
|
readlink -f /sys/block/vda/dev
|
||||||
|
|
||||||
|
dev="/dev/vda"
|
||||||
|
sfdisk "${dev:?}" <<EOF
|
||||||
|
label: gpt
|
||||||
|
|
||||||
|
name="test_swap", size=32M
|
||||||
|
uuid="deadbeef-dead-dead-beef-000000000000", name="test_part", size=5M
|
||||||
|
EOF
|
||||||
|
udevadm settle
|
||||||
|
mkswap -U "deadbeef-dead-dead-beef-111111111111" -L "swap_vol" "${dev}1"
|
||||||
|
mkfs.ext4 -U "deadbeef-dead-dead-beef-222222222222" -L "data_vol" "${dev}2"
|
||||||
udevadm wait --settle --timeout=30 "${expected_symlinks[@]}"
|
udevadm wait --settle --timeout=30 "${expected_symlinks[@]}"
|
||||||
|
|
||||||
# Try to mount the data partition manually (using its label)
|
# Try to mount the data partition manually (using its label)
|
||||||
|
|
Loading…
Reference in a new issue