Skip to content

Commit

Permalink
Remove before merging
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtechtrefny committed Sep 23, 2024
1 parent bf09674 commit 8f033d9
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
trigger: pull_request
targets:
- fedora-latest
- fedora-latest-stable
branch: main

# CentOS 10 Stream tests for the 'rhel10-branch'
Expand Down
2 changes: 2 additions & 0 deletions blivet/devicelibs/stratis.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ def create_pool(name, devices, encrypted, passphrase, key_file, clevis):
if encrypted and not (passphrase or key_file):
raise StratisError("Passphrase or key file must be specified for encrypted pool")

print("calling pool create with options:\nname=%s, device=%s, encrypted=%s" % (name, devices, encrypted))

raid_opt = GLib.Variant("(bq)", (False, 0))

if encrypted:
Expand Down
4 changes: 4 additions & 0 deletions blivet/devices/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,10 @@ def update_sysfs_path(self):
try:
udev_device = pyudev.Devices.from_device_file(udev.global_udev,
self.path)
if self.path.startswith("/dev/nvme"):
print("udev info for %s" % self.path)
print(dict(udev_device))
os.system("ls -la /dev/sda*")

# from_device_file() does not process exceptions but just propagates
# any errors that are raised.
Expand Down
11 changes: 10 additions & 1 deletion plans/tests.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,20 @@ prepare:
# TF prioritizes Fedora tag repo over all others, in particular our daily COPR
- for f in $(grep -l -r 'testing-farm-tag-repository' /etc/yum.repos.d); do sed -i '/priority/d' "$f" ;done
- sudo dnf -y update
- sudo dnf -y install nvme-cli

- name: ansible
how: ansible
playbook: misc/install-test-dependencies.yml

execute:
how: tmt
script: sudo make test
script:
- sudo nvme id-ctrl -v /dev/nvme0n1
- ls -la /dev/sda*
- udevadm info /dev/nvme0n1
- udevadm info /dev/nvme0n1p1
- sudo python3 tests/run_tests.py storage_tests.devices_test.stratis_test
- ls -la /dev/sda*
- udevadm info /dev/nvme0n1
- udevadm info /dev/nvme0n1p1
2 changes: 1 addition & 1 deletion python-blivet.spec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Source1: http://github.com/storaged-project/blivet/archive/%{realname}-%{realver
%global partedver 1.8.1
%global pypartedver 3.10.4
%global utillinuxver 2.15.1
%global libblockdevver 3.2.0
%global libblockdevver 3.1.0
%global libbytesizever 0.3
%global pyudevver 0.18

Expand Down
5 changes: 5 additions & 0 deletions tests/storage_tests/devices_test/stratis_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,18 @@ def _clean_up(self):
class StratisTestCase(StratisTestCaseBase):

def test_stratis_basic(self):
print("self.vdevs: %s" % self.vdevs)
disk = self.storage.devicetree.get_device_by_path(self.vdevs[0])
self.assertIsNotNone(disk)
self.storage.initialize_disk(disk)

bd = self.storage.new_partition(size=blivet.size.Size("1 GiB"), fmt_type="stratis",
parents=[disk])
self.storage.create_device(bd)
print("bd: %s" % bd)
print("disk: %s" % disk)
os.system("udevadm info /dev/nvme0n1")
os.system("ls -la /dev/sd*")

blivet.partitioning.do_partitioning(self.storage)

Expand Down

0 comments on commit 8f033d9

Please sign in to comment.