Skip to content

Conversation

@bernhardkaindl
Copy link

No description provided.

Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
Copy link
Author

@bernhardkaindl bernhardkaindl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

code-coverage

⚠️ [code-coverage] reported by reviewdog 🐶
Lines 208-209 are not covered

return None


⚠️ [code-coverage] reported by reviewdog 🐶
Line 211 is not covered

def parse_dmv_info(self, fpath):


⚠️ [code-coverage] reported by reviewdog 🐶
Lines 213-216 are not covered

json_formatted = {


⚠️ [code-coverage] reported by reviewdog 🐶
Lines 229-230 are not covered

json_formatted["selected"] = self.variant_selected(


⚠️ [code-coverage] reported by reviewdog 🐶
Line 232 is not covered

json_formatted["active"] = get_active_variant(


⚠️ [code-coverage] reported by reviewdog 🐶
Line 234 is not covered

json_formatted["loaded modules"] = get_loaded_modules(


⚠️ [code-coverage] reported by reviewdog 🐶
Line 236 is not covered

return json_data, json_formatted


⚠️ [code-coverage] reported by reviewdog 🐶
Lines 238-239 are not covered

dmv_list = {} # type: Dict[str, Any]


⚠️ [code-coverage] reported by reviewdog 🐶
Lines 241-243 are not covered

self.dmv_list = {


⚠️ [code-coverage] reported by reviewdog 🐶
Line 248 is not covered

self.errors_list = {


⚠️ [code-coverage] reported by reviewdog 🐶
Lines 254-257 are not covered

variants[k] = v


⚠️ [code-coverage] reported by reviewdog 🐶
Line 259 is not covered

json_formatted = {


⚠️ [code-coverage] reported by reviewdog 🐶
Lines 266-272 are not covered

json_formatted["selected"] = selected


⚠️ [code-coverage] reported by reviewdog 🐶
Lines 274-279 are not covered

json_formatted["active"] = active


⚠️ [code-coverage] reported by reviewdog 🐶
Lines 281-282 are not covered

json_formatted["loaded modules"] = loaded


⚠️ [code-coverage] reported by reviewdog 🐶
Line 284 is not covered

self.dmv_list["drivers"][oldone["info"]] = json_formatted


⚠️ [code-coverage] reported by reviewdog 🐶
Lines 286-290 are not covered

self.dmv_list["drivers"][json_data["name"]] = json_formatted


⚠️ [code-coverage] reported by reviewdog 🐶
Line 292 is not covered

self.merge_jsondata(self.dmv_list["drivers"][json_data["name"]], json_formatted)


⚠️ [code-coverage] reported by reviewdog 🐶
Lines 294-295 are not covered

lspci_out = subprocess.run(["lspci", '-nm'], stdout=subprocess.PIPE,


⚠️ [code-coverage] reported by reviewdog 🐶
Lines 298-300 are not covered

continue


⚠️ [code-coverage] reported by reviewdog 🐶
Lines 302-304 are not covered

continue


⚠️ [code-coverage] reported by reviewdog 🐶
Lines 306-309 are not covered

self.process_dmv_data(json_data, json_formatted)


⚠️ [code-coverage] reported by reviewdog 🐶
Lines 311-312 are not covered

lspci_out = subprocess.run(["lspci", '-nm'], stdout=subprocess.PIPE,


⚠️ [code-coverage] reported by reviewdog 🐶
Lines 315-317 are not covered

self.process_dmv_data(json_data, json_formatted)


⚠️ [code-coverage] reported by reviewdog 🐶
Lines 319-320 are not covered

return self.dmv_list


⚠️ [code-coverage] reported by reviewdog 🐶
Lines 322-327 are not covered

for module_file in module_files:


⚠️ [code-coverage] reported by reviewdog 🐶
Lines 329-334 are not covered

except FileNotFoundError:


⚠️ [code-coverage] reported by reviewdog 🐶
Lines 336-341 are not covered

subprocess.run(


⚠️ [code-coverage] reported by reviewdog 🐶
Lines 347-349 are not covered

uname_r = subprocess.run(["uname", '-r'], stdout=subprocess.PIPE, text=True,


⚠️ [code-coverage] reported by reviewdog 🐶
Lines 351-357 are not covered

return False


⚠️ [code-coverage] reported by reviewdog 🐶
Lines 359-360 are not covered

return self.errors_list


⚠️ [code-coverage] reported by reviewdog 🐶
Lines 362-364 are not covered

self.errors_list["message"] = os.strerror(errcode)

import re
import struct
import subprocess
from typing import Any, Dict
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [code-coverage] reported by reviewdog 🐶
Lines 24-31 are not covered

import subprocess
from typing import Any, Dict

from .compat import open_with_codec_handling
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [code-coverage] reported by reviewdog 🐶
Line 33 is not covered

from .compat import open_with_codec_handling

dmv_proto_ver = 0.1
err_proto_ver = 0.1
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [code-coverage] reported by reviewdog 🐶
Lines 35-36 are not covered

dmv_proto_ver = 0.1
err_proto_ver = 0.1

def get_all_kabi_dirs():
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [code-coverage] reported by reviewdog 🐶
Line 38 is not covered

dirs = []
for kabi_ver in os.listdir(modules_root):
updates_dir = os.path.join(modules_root, kabi_ver, "updates")
dmv_dir = os.path.join(modules_root, kabi_ver, "dmv")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [code-coverage] reported by reviewdog 🐶
Lines 40-44 are not covered

info_file = os.path.join(module_dir, "info.json")
with open(info_file, "r", encoding="ascii") as json_file:
json_data = json.load(json_file)
variant = json_data["variant"]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [code-coverage] reported by reviewdog 🐶
Lines 176-184 are not covered

variant = json_data["variant"]

return variant
return None
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [code-coverage] reported by reviewdog 🐶
Lines 186-187 are not covered

def __init__(self, updates_dir, lspci_out, runtime=False):
self.updates_dir = updates_dir
self.lspci_out = lspci_out
self.runtime = runtime
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [code-coverage] reported by reviewdog 🐶
Lines 189-193 are not covered

self.lspci_out = lspci_out
self.runtime = runtime

def variant_selected(self, modules):
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [code-coverage] reported by reviewdog 🐶
Line 195 is not covered

info_file = os.path.join(module_dir, "info.json")
with open(info_file, "r", encoding="ascii") as json_file:
json_data = json.load(json_file)
variant = json_data["variant"]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [code-coverage] reported by reviewdog 🐶
Lines 198-206 are not covered

@codecov
Copy link

codecov bot commented Aug 18, 2025

Codecov Report

❌ Patch coverage is 0% with 196 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
xcp/dmv.py 0.0% 196 Missing ⚠️

📢 Thoughts on this report? Let us know!

@coveralls
Copy link

coveralls commented Aug 18, 2025

Pull Request Test Coverage Report for Build 17054637565

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 0.0%

Totals Coverage Status
Change from base Build 17054641565: 0.0%
Covered Lines: 0
Relevant Lines: 0

💛 - Coveralls

bernhardkaindl and others added 3 commits August 19, 2025 01:00
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
  move DMV common code to python-libs because RPU plugin calls
  these functions as well

Signed-off-by: Chunjie Zhu <chunjie.zhu@cloud.com>
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
@bernhardkaindl bernhardkaindl force-pushed the Checks-Fix-coverage-upload.fixup-4 branch from bbc199e to 3be08cc Compare August 18, 2025 23:01
@bernhardkaindl bernhardkaindl force-pushed the master branch 11 times, most recently from 8a18101 to 2534106 Compare August 20, 2025 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants