File: test_symbol.py

package info (click to toggle)
drgn 0.0.31-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 5,956 kB
  • sloc: ansic: 49,446; python: 45,054; awk: 423; makefile: 339; sh: 114
file content (13 lines) | stat: -rw-r--r-- 481 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
# Copyright (c) 2021, Oracle and/or its affiliates.
# SPDX-License-Identifier: LGPL-2.1-or-later

from drgn import SymbolBinding, SymbolKind
from tests.linux_kernel import LinuxKernelTestCase


class TestSymbol(LinuxKernelTestCase):
    def test_global_symbol(self):
        symbol = self.prog.symbol("jiffies")
        self.assertEqual(symbol.name, "jiffies")
        self.assertEqual(symbol.binding, SymbolBinding.GLOBAL)
        self.assertEqual(symbol.kind, SymbolKind.OBJECT)