Skip to content

Commit

Permalink
workqueue: add test for helper of previous commit.
Browse files Browse the repository at this point in the history
Signed-off-by: Imran Khan <[email protected]>
  • Loading branch information
imran-kn committed Jan 15, 2025
1 parent ab8d798 commit 003bdbb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drgn_tools/workqueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,13 +684,13 @@ class OfflinedDelayedWorksModule(CorelensModule):
"""
Show delayed works from offlined CPUs.
Delayed works (with non zero delay), rely on timer-wheel timers for
their submission. If these timers don't fire the work does not get
their submission. If these timers don't fire, the work does not get
submitted. So delayed works submitted to an offlined CPU, don't get
executed even after specified delay because timer-wheel timers on
offlined CPUs don't get fired in first place.
This corelens module list delayed works on offlined CPUs, so that
one can know if a delayed work was left unexececuted, due to the fact
one can know if a delayed work was left unexecuted, due to the fact
that it was submitted on an offlined CPU.
"""

Expand Down
6 changes: 6 additions & 0 deletions tests/test_workqueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,9 @@ def test_for_each_pending_work_of_pwq(prog: drgn.Program) -> None:

def test_show_all_workqueues(prog: drgn.Program) -> None:
wq.show_all_workqueues(prog)


def test_show_unexpired_delayed_works(
prog: drgn.Program,
) -> None:
wq.show_unexpired_delayed_works(prog)

0 comments on commit 003bdbb

Please sign in to comment.