Skip to content

Commit 3b92772

Browse files
committed
Fix regressions
pylint: mainly caused by drgn signature changes mypy: caused by drgn signature and behavior change pytest: commit 92fc92b regression
1 parent 92fc92b commit 3b92772

File tree

5 files changed

+20
-1
lines changed

5 files changed

+20
-1
lines changed

sdb/commands/linux/internal/slub_helpers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ def util(cache: drgn.Object) -> int:
151151

152152
def lookup_cache_by_address(obj: drgn.Object) -> Optional[drgn.Object]:
153153
try:
154+
# The pylint error disabled below is a false positive
155+
# triggered by some updates to drgn's function signatures.
156+
# pylint: disable=no-value-for-parameter
154157
cache = find_containing_slab_cache(obj)
155158
if cache.value_() == 0x0:
156159
return None

sdb/commands/linux/process.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ def _init_parser(cls, name: str) -> argparse.ArgumentParser:
5858

5959
def _call(self, objs: Iterable[drgn.Object]) -> Iterable[drgn.Object]:
6060
for pid in self.args.pid:
61+
# The pylint error disabled below is a false positive
62+
# triggered by some updates to drgn's function signatures.
63+
# pylint: disable=no-value-for-parameter
6164
yield find_pid(sdb.get_prog(), pid)
6265

6366

@@ -90,4 +93,7 @@ def _init_parser(cls, name: str) -> argparse.ArgumentParser:
9093

9194
def _call(self, objs: Iterable[drgn.Object]) -> Iterable[drgn.Object]:
9295
for pid in self.args.pid:
96+
# The pylint error disabled below is a false positive
97+
# triggered by some updates to drgn's function signatures.
98+
# pylint: disable=no-value-for-parameter
9399
yield find_task(sdb.get_prog(), pid)

sdb/commands/linux/stacks.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,9 @@ def pretty_print(self, objs: Iterable[drgn.Object]) -> None:
400400

401401
def no_input(self) -> Iterable[drgn.Object]:
402402
self.validate_context()
403+
# The pylint error disabled below is a false positive
404+
# triggered by some updates to drgn's function signatures.
405+
# pylint: disable=no-value-for-parameter
403406
yield from filter(self.match_stack, for_each_task(sdb.get_prog()))
404407

405408

sdb/commands/linux/threads.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@
3030

3131
def _cmdline(obj: drgn.Object) -> str:
3232
try:
33-
s = " ".join(map(lambda s: s.decode("utf-8"), cmdline(obj)))
33+
ret = cmdline(obj)
34+
if ret is None:
35+
return ""
36+
s = " ".join(map(lambda s: s.decode("utf-8"), ret))
3437

3538
#
3639
# The command line for a given thread can be obnoxiously long,
@@ -97,4 +100,7 @@ def pretty_print(self, objs: Iterable[drgn.Object]) -> None:
97100
table.print_()
98101

99102
def no_input(self) -> Iterable[drgn.Object]:
103+
# The pylint error disabled below is a false positive
104+
# triggered by some updates to drgn's function signatures.
105+
# pylint: disable=no-value-for-parameter
100106
yield from for_each_task(sdb.get_prog())

tests/integration/data/regression_output/dump.202303131823/zfs/zio -r

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,6 +1539,7 @@
15391539
0xffff9ac552bea780 WRITE VDEV_IO_START - -
15401540
0xffff9ac5500d1da0 WRITE VDEV_IO_DONE - -62ms
15411541
0xffff9ac60f5d4f00 WRITE VDEV_IO_START - -78ms
1542+
0xffff9ac552beac70 WRITE DONE - -
15421543
0xffff9ac552bed8e0 WRITE VDEV_IO_START - -
15431544
0xffff9ac5500d4520 WRITE VDEV_IO_DONE - -63ms
15441545
0xffff9ac60f5d4f00 WRITE VDEV_IO_START - -78ms

0 commit comments

Comments
 (0)