Skip to content

Commit 26d2d54

Browse files
authored
Merge pull request #346 from sdimitro/fix-failures-0
Fix regressions
2 parents 92fc92b + 2a368f2 commit 26d2d54

File tree

8 files changed

+23
-7
lines changed

8 files changed

+23
-7
lines changed

sdb/commands/echo.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ def _init_parser(cls, name: str) -> argparse.ArgumentParser:
3838
return parser
3939

4040
def _call(self, objs: Iterable[drgn.Object]) -> Iterable[drgn.Object]:
41-
for obj in objs:
42-
yield obj
41+
yield from objs
4342

4443
for addr in self.args.addrs:
4544
try:

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())

sdb/commands/tail.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,4 @@ def _call(self, objs: Iterable[drgn.Object]) -> Iterable[drgn.Object]:
4848
queue: Deque[drgn.Object] = deque(maxlen=self.args.count)
4949
for obj in objs:
5050
queue.append(obj)
51-
for obj in queue:
52-
yield obj
51+
yield from queue

sdb/commands/zfs/histograms.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ def print_histogram(hist: drgn.Object,
130130
min_bucket = bucket
131131
if bucket > max_bucket and count > 0:
132132
max_bucket = bucket
133-
if count > max_count:
134-
max_count = count
133+
max_count = max(max_count, count)
135134

136135
HISTOGRAM_WIDTH_MAX = 40
137136
max_count = max(max_count, HISTOGRAM_WIDTH_MAX)

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)