Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sd card not tested (BugFix) #1451

Merged
merged 12 commits into from
Sep 12, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

from io import StringIO
from unittest import TestCase
from unittest.mock import patch, MagicMock
from textwrap import dedent

from pkg_resources import resource_filename
Expand Down Expand Up @@ -45,6 +46,7 @@ def get_lsblk(self, name):
return None


@patch("checkbox_support.parsers.udevadm.check_output", MagicMock())
class TestUdevadmParser(TestCase, UdevadmDataMixIn):

def parse(self, name, with_lsblk=True, with_partitions=False):
Expand Down Expand Up @@ -1125,6 +1127,11 @@ def test_CRYPTO_FDE_UC20(self):
self.assertEqual(len(devices), 93)
self.assertEqual(self.count(devices, "PARTITION"), 1)

def test_XILINX_KR260(self):
devices = self.parse("XILINX_KR260", with_partitions=True)
self.assertEqual(self.count(devices, "DISK"), 18)
self.assertEqual(self.count(devices, "CARDREADER"), 1)

def test_two_dms_one_with_ubutnu_save(self):
"""
This test checks that udevadm parser properly handles the case
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
KNAME="loop0" TYPE="loop" MOUNTPOINT="/snap/core20/2186"
KNAME="loop1" TYPE="loop" MOUNTPOINT="/snap/core20/2321"
KNAME="loop2" TYPE="loop" MOUNTPOINT="/snap/lxd/27038"
KNAME="loop3" TYPE="loop" MOUNTPOINT="/snap/lxd/29353"
KNAME="loop4" TYPE="loop" MOUNTPOINT="/snap/snapd/20674"
KNAME="loop5" TYPE="loop" MOUNTPOINT="/snap/snapd/21761"
KNAME="sda" TYPE="disk" MOUNTPOINT=""
KNAME="sda1" TYPE="part" MOUNTPOINT="/boot/firmware"
KNAME="sda2" TYPE="part" MOUNTPOINT="/"
KNAME="sdb" TYPE="disk" MOUNTPOINT=""
KNAME="sdb1" TYPE="part" MOUNTPOINT=""
KNAME="mtdblock0" TYPE="disk" MOUNTPOINT=""
KNAME="mtdblock1" TYPE="disk" MOUNTPOINT=""
KNAME="mtdblock2" TYPE="disk" MOUNTPOINT=""
KNAME="mtdblock3" TYPE="disk" MOUNTPOINT=""
KNAME="mtdblock4" TYPE="disk" MOUNTPOINT=""
KNAME="mtdblock5" TYPE="disk" MOUNTPOINT=""
KNAME="mtdblock6" TYPE="disk" MOUNTPOINT=""
KNAME="mtdblock7" TYPE="disk" MOUNTPOINT=""
KNAME="mtdblock8" TYPE="disk" MOUNTPOINT=""
KNAME="mtdblock9" TYPE="disk" MOUNTPOINT=""
KNAME="mtdblock10" TYPE="disk" MOUNTPOINT=""
KNAME="mtdblock11" TYPE="disk" MOUNTPOINT=""
KNAME="mtdblock12" TYPE="disk" MOUNTPOINT=""
KNAME="mtdblock13" TYPE="disk" MOUNTPOINT=""
KNAME="mtdblock14" TYPE="disk" MOUNTPOINT=""
KNAME="mtdblock15" TYPE="disk" MOUNTPOINT=""
KNAME="mtdblock16" TYPE="disk" MOUNTPOINT=""
Loading
Loading