dissect.vmfs 3.12.dev1__tar.gz → 3.13.dev1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/PKG-INFO +3 -4
  2. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/dissect/vmfs/c_lvm.pyi +1 -2
  3. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/dissect/vmfs/c_vmfs.pyi +1 -2
  4. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/dissect/vmfs/descriptor.py +20 -8
  5. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/dissect.vmfs.egg-info/PKG-INFO +3 -4
  6. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/pyproject.toml +25 -8
  7. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/test_vmfs.py +20 -2
  8. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tox.ini +8 -10
  9. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/.git-blame-ignore-revs +0 -0
  10. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/.gitattributes +0 -0
  11. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/COPYRIGHT +0 -0
  12. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/LICENSE +0 -0
  13. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/MANIFEST.in +0 -0
  14. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/README.md +0 -0
  15. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/dissect/vmfs/__init__.py +0 -0
  16. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/dissect/vmfs/address.py +0 -0
  17. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/dissect/vmfs/c_lvm.py +0 -0
  18. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/dissect/vmfs/c_vmfs.py +0 -0
  19. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/dissect/vmfs/exception.py +0 -0
  20. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/dissect/vmfs/lvm.py +0 -0
  21. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/dissect/vmfs/resource.py +0 -0
  22. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/dissect/vmfs/util.py +0 -0
  23. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/dissect/vmfs/vmfs.py +0 -0
  24. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/dissect.vmfs.egg-info/SOURCES.txt +0 -0
  25. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/dissect.vmfs.egg-info/dependency_links.txt +0 -0
  26. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/dissect.vmfs.egg-info/requires.txt +0 -0
  27. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/dissect.vmfs.egg-info/top_level.txt +0 -0
  28. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/setup.cfg +0 -0
  29. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/__init__.py +0 -0
  30. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/lvm/huge/lvm5.csv.gz +0 -0
  31. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/lvm/huge/lvm6.csv.gz +0 -0
  32. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/lvm/lvm3.bin.gz +0 -0
  33. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/lvm/lvm4.bin.gz +0 -0
  34. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/lvm/lvm5.bin.gz +0 -0
  35. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/lvm/lvm6.bin.gz +0 -0
  36. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/lvm/span/lvm3-span-0.bin.gz +0 -0
  37. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/lvm/span/lvm3-span-1.bin.gz +0 -0
  38. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/lvm/span/lvm4-span-0.bin.gz +0 -0
  39. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/lvm/span/lvm4-span-1.bin.gz +0 -0
  40. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/lvm/span/lvm5-span-0.bin.gz +0 -0
  41. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/lvm/span/lvm5-span-1.bin.gz +0 -0
  42. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/lvm/span/lvm6-span-0.bin.gz +0 -0
  43. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/lvm/span/lvm6-span-1.bin.gz +0 -0
  44. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/vmfs/span/vmfs5-span-0.bin.gz +0 -0
  45. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/vmfs/span/vmfs5-span-1.bin.gz +0 -0
  46. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/vmfs/span/vmfs6-span-0.bin.gz +0 -0
  47. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/vmfs/span/vmfs6-span-1.bin.gz +0 -0
  48. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/vmfs/vmfs5-no-dense-sbpc.bin.gz +0 -0
  49. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/vmfs/vmfs5-resource-optimized.bin.gz +0 -0
  50. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/vmfs/vmfs5.bin.gz +0 -0
  51. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/vmfs/vmfs5d.bin.gz +0 -0
  52. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/vmfs/vmfs5l.bin.gz +0 -0
  53. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/vmfs/vmfs5ld.bin.gz +0 -0
  54. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/vmfs/vmfs6-resource-optimized.bin.gz +0 -0
  55. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/vmfs/vmfs6.bin.gz +0 -0
  56. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/vmfs/vmfs6d.bin.gz +0 -0
  57. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/vmfs/vmfs6l.bin.gz +0 -0
  58. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/vmfs/vmfs6ld.bin.gz +0 -0
  59. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_data/vmfs.bin.gz +0 -0
  60. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_docs/Makefile +0 -0
  61. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_docs/conf.py +0 -0
  62. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/_docs/index.rst +0 -0
  63. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/conftest.py +0 -0
  64. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/test_exception.py +0 -0
  65. {dissect_vmfs-3.12.dev1 → dissect_vmfs-3.13.dev1}/tests/test_lvm.py +0 -0
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dissect.vmfs
3
- Version: 3.12.dev1
3
+ Version: 3.13.dev1
4
4
  Summary: A Dissect module implementing a parser for the VMFS file system, used by VMware virtualization software
5
5
  Author-email: Dissect Team <dissect@fox-it.com>
6
- License: Affero General Public License v3
6
+ License-Expression: AGPL-3.0-or-later
7
7
  Project-URL: homepage, https://dissect.tools
8
8
  Project-URL: documentation, https://docs.dissect.tools/en/latest/projects/dissect.vmfs
9
9
  Project-URL: repository, https://github.com/fox-it/dissect.vmfs
@@ -11,14 +11,13 @@ Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Environment :: Console
12
12
  Classifier: Intended Audience :: Developers
13
13
  Classifier: Intended Audience :: Information Technology
14
- Classifier: License :: OSI Approved
15
14
  Classifier: Operating System :: OS Independent
16
15
  Classifier: Programming Language :: Python :: 3
17
16
  Classifier: Topic :: Internet :: Log Analysis
18
17
  Classifier: Topic :: Scientific/Engineering :: Information Analysis
19
18
  Classifier: Topic :: Security
20
19
  Classifier: Topic :: Utilities
21
- Requires-Python: ~=3.9
20
+ Requires-Python: >=3.10
22
21
  Description-Content-Type: text/markdown
23
22
  License-File: LICENSE
24
23
  License-File: COPYRIGHT
@@ -1,8 +1,7 @@
1
1
  # Generated by cstruct-stubgen
2
- from typing import BinaryIO, Literal, overload
2
+ from typing import BinaryIO, Literal, TypeAlias, overload
3
3
 
4
4
  import dissect.cstruct as __cs__
5
- from typing_extensions import TypeAlias
6
5
 
7
6
  class _c_lvm(__cs__.cstruct):
8
7
  DISK_BLOCK_SIZE_512B: Literal[512] = ...
@@ -1,8 +1,7 @@
1
1
  # Generated by cstruct-stubgen
2
- from typing import BinaryIO, Literal, overload
2
+ from typing import BinaryIO, Literal, TypeAlias, overload
3
3
 
4
4
  import dissect.cstruct as __cs__
5
- from typing_extensions import TypeAlias
6
5
 
7
6
  class _c_vmfs(__cs__.cstruct):
8
7
  rootDirDescAddr: Literal[4] = ...
@@ -19,7 +19,13 @@ from dissect.vmfs.address import (
19
19
  address_type,
20
20
  )
21
21
  from dissect.vmfs.c_vmfs import FS3_AddrType, FS3_DescriptorType, FS3_ZeroLevelAddrType, FS6_DirBlockType, c_vmfs
22
- from dissect.vmfs.exception import NotAnRDMFileError, NotASymlinkError, VolumeNotAvailableError
22
+ from dissect.vmfs.exception import (
23
+ FileNotFoundError,
24
+ NotADirectoryError,
25
+ NotAnRDMFileError,
26
+ NotASymlinkError,
27
+ VolumeNotAvailableError,
28
+ )
23
29
  from dissect.vmfs.util import vmfs_uuid
24
30
 
25
31
  if TYPE_CHECKING:
@@ -137,8 +143,8 @@ class FileDescriptor:
137
143
  Lock [type {li.type:x} offset {li.addr.offset} v {li.token}, hb offset {li.hbAddr.offset}
138
144
  gen {li.hbGen.gen}, mode {li.mode}, owner {vmfs_uuid(li.owner)} mtime {li.mtime}
139
145
  num {li.numHolders} gblnum {li.gblNumHolders} gblgen {li.gblGen} gblbrk {li.gblBrk}]
140
- Addr <{address_type(self.address)}, {cluster}, {resource}>, gen {fd.generation}, links {fd.numLinks}, type {type_str}, flags {fd.flags:#x}, uid {fd.uid}, gid {fd.gid}, mode {fd.mode:o}
141
- len {fd.length}, nb {fd.numBlocks} tbz {fd.numTBZBlocksLo | fd.numTBZBlocksHi << 32}, cow {fd.numCOWBlocksLo | fd.numCOWBlocksHi << 32}, newSinceEpoch {fd.newSinceEpochLo | fd.newSinceEpochHi << 32}, zla {fd.zla}, bs {fd.blockSize}
146
+ Addr <{address_type(self.address)}, {cluster}, {resource}>, gen {fd.generation}, links {fd.linkCount}, type {type_str}, flags {fd.flags:#x}, uid {fd.uid}, gid {fd.gid}, mode {fd.mode:o}
147
+ len {fd.fileLength}, nb {fd.numBlocks} tbz {fd.numTBZBlocksLo | fd.numTBZBlocksHi << 32}, cow {fd.numCOWBlocksLo | fd.numCOWBlocksHi << 32}, newSinceEpoch {fd.newSinceEpochLo | fd.newSinceEpochHi << 32}, zla {fd.zeroLevelAddrType}, bs {fd.blockSize}
142
148
  affinityFD <{address_type(fd.affinityFD)},{affinity_cluster},{affinity_resource}>, parentFD <{address_type(fd.parentFD)},{parent_cluster},{parent_resource}>, tbzGranularityShift {fd.tbzGranularityShift}, numLFB {fd.numLFB}
143
149
  lastSFBClusterNum {fd.lastSFBClusterNum}, numPreAllocBlocks {fd.numPreAllocBlocks}, numPointerBlocks {fd.numPointerBlocks}
144
150
  """).strip() # noqa: E501
@@ -232,13 +238,19 @@ class FileDescriptor:
232
238
 
233
239
  Access the mode through the :attr:`metadata` attribute to get the raw mode value.
234
240
  """
235
- if stat.S_IFMT(self.metadata.mode) == stat.S_IFDIR:
241
+ if stat.S_IFMT(self.metadata.mode):
242
+ # If the mode already has a type bit set, return it as is
236
243
  return self.metadata.mode
237
244
 
238
- if self.type == FS3_DescriptorType.SYMLINK:
245
+ if self.is_dir():
246
+ return self.metadata.mode | stat.S_IFDIR
247
+
248
+ if self.is_symlink():
239
249
  return self.metadata.mode | stat.S_IFLNK
240
- if self.type == FS3_DescriptorType.RDM:
250
+
251
+ if self.is_rdm():
241
252
  return self.metadata.mode | stat.S_IFBLK
253
+
242
254
  return self.metadata.mode | stat.S_IFREG
243
255
 
244
256
  @property
@@ -272,11 +284,11 @@ class FileDescriptor:
272
284
 
273
285
  def is_dir(self) -> bool:
274
286
  """Return whether this file descriptor is a directory."""
275
- return self.type == FS3_DescriptorType.DIRECTORY
287
+ return self.type == FS3_DescriptorType.DIRECTORY or (self.is_system() and stat.S_ISDIR(self.metadata.mode))
276
288
 
277
289
  def is_file(self) -> bool:
278
290
  """Return whether this file descriptor is a regular file."""
279
- return self.type == FS3_DescriptorType.REGFILE
291
+ return self.type == FS3_DescriptorType.REGFILE or (self.is_system() and not stat.S_ISDIR(self.metadata.mode))
280
292
 
281
293
  def is_symlink(self) -> bool:
282
294
  """Return whether this file descriptor is a symlink."""
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dissect.vmfs
3
- Version: 3.12.dev1
3
+ Version: 3.13.dev1
4
4
  Summary: A Dissect module implementing a parser for the VMFS file system, used by VMware virtualization software
5
5
  Author-email: Dissect Team <dissect@fox-it.com>
6
- License: Affero General Public License v3
6
+ License-Expression: AGPL-3.0-or-later
7
7
  Project-URL: homepage, https://dissect.tools
8
8
  Project-URL: documentation, https://docs.dissect.tools/en/latest/projects/dissect.vmfs
9
9
  Project-URL: repository, https://github.com/fox-it/dissect.vmfs
@@ -11,14 +11,13 @@ Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Environment :: Console
12
12
  Classifier: Intended Audience :: Developers
13
13
  Classifier: Intended Audience :: Information Technology
14
- Classifier: License :: OSI Approved
15
14
  Classifier: Operating System :: OS Independent
16
15
  Classifier: Programming Language :: Python :: 3
17
16
  Classifier: Topic :: Internet :: Log Analysis
18
17
  Classifier: Topic :: Scientific/Engineering :: Information Analysis
19
18
  Classifier: Topic :: Security
20
19
  Classifier: Topic :: Utilities
21
- Requires-Python: ~=3.9
20
+ Requires-Python: >=3.10
22
21
  Description-Content-Type: text/markdown
23
22
  License-File: LICENSE
24
23
  License-File: COPYRIGHT
@@ -1,13 +1,14 @@
1
1
  [build-system]
2
- requires = ["setuptools>=65.5.0", "setuptools_scm[toml]>=6.4.0"]
2
+ requires = ["setuptools>=77.0.0", "setuptools_scm[toml]>=6.4.0"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "dissect.vmfs"
7
7
  description = "A Dissect module implementing a parser for the VMFS file system, used by VMware virtualization software"
8
8
  readme = "README.md"
9
- requires-python = "~=3.9"
10
- license.text = "Affero General Public License v3"
9
+ requires-python = ">=3.10"
10
+ license = "AGPL-3.0-or-later"
11
+ license-files = ["LICENSE", "COPYRIGHT"]
11
12
  authors = [
12
13
  {name = "Dissect Team", email = "dissect@fox-it.com"}
13
14
  ]
@@ -16,7 +17,6 @@ classifiers = [
16
17
  "Environment :: Console",
17
18
  "Intended Audience :: Developers",
18
19
  "Intended Audience :: Information Technology",
19
- "License :: OSI Approved",
20
20
  "Operating System :: OS Independent",
21
21
  "Programming Language :: Python :: 3",
22
22
  "Topic :: Internet :: Log Analysis",
@@ -41,9 +41,29 @@ dev = [
41
41
  "dissect.util>=3.0.dev,<4.0.dev",
42
42
  ]
43
43
 
44
+ [dependency-groups]
45
+ test = [
46
+ "pytest",
47
+ ]
48
+ lint = [
49
+ "ruff==0.13.1",
50
+ "vermin",
51
+ ]
52
+ build = [
53
+ "build",
54
+ ]
55
+ debug = [
56
+ "ipdb",
57
+ ]
58
+ dev = [
59
+ {include-group = "test"},
60
+ {include-group = "lint"},
61
+ {include-group = "debug"},
62
+ ]
63
+
44
64
  [tool.ruff]
45
65
  line-length = 120
46
- required-version = ">=0.12.0"
66
+ required-version = ">=0.13.1"
47
67
 
48
68
  [tool.ruff.format]
49
69
  docstring-code-format = true
@@ -93,9 +113,6 @@ ignore = ["E203", "B904", "UP024", "ANN002", "ANN003", "ANN204", "ANN401", "SIM1
93
113
  known-first-party = ["dissect.vmfs"]
94
114
  known-third-party = ["dissect"]
95
115
 
96
- [tool.setuptools]
97
- license-files = ["LICENSE", "COPYRIGHT"]
98
-
99
116
  [tool.setuptools.packages.find]
100
117
  include = ["dissect.*"]
101
118
 
@@ -2,6 +2,7 @@ from __future__ import annotations
2
2
 
3
3
  import contextlib
4
4
  import gzip
5
+ import stat
5
6
 
6
7
  import pytest
7
8
 
@@ -73,11 +74,20 @@ def test_vmfs_basic(path: str | list[str], type: str, request: pytest.FixtureReq
73
74
  assert FS3_Config.DENSE_SBPC in fs.descriptor.config
74
75
 
75
76
  root_dir = fs.get("/").listdir()
76
- for name in (".vh.sf", ".pb2.sf", ".pbc.sf", ".fbb.sf", ".fdc.sf", ".sbc.sf") + (
77
+ for name in (".vh.sf", ".pb2.sf", ".pbc.sf", ".fbb.sf", ".fdc.sf", ".sbc.sf", ".sdd.sf") + (
77
78
  (".jbc.sf",) if fs.is_vmfs6 else ()
78
79
  ):
79
80
  assert name in root_dir, f"Expected {name} in root directory"
80
- assert root_dir[name].fd.is_system(), f"{name} should be a system file"
81
+
82
+ fd = root_dir[name].fd
83
+ assert fd.is_system(), f"{name} should be a system file"
84
+
85
+ if name == ".sdd.sf":
86
+ assert fd.is_dir(), f"{name} should be a directory"
87
+ assert stat.S_ISDIR(fd.mode), f"{name} should be a directory"
88
+ else:
89
+ assert fd.is_file(), f"{name} should be a regular file"
90
+ assert stat.S_ISREG(fd.mode), f"{name} should be a regular file"
81
91
 
82
92
 
83
93
  @pytest.mark.parametrize(
@@ -93,6 +103,11 @@ def test_vmfs_content(path: str) -> None:
93
103
  vs = lvm.LVM(fh)
94
104
  fs = vmfs.VMFS(vs.volumes[0].open())
95
105
 
106
+ # Test root
107
+ fd = fs.get("/")
108
+ assert fd.is_dir()
109
+ assert stat.S_ISDIR(fd.mode)
110
+
96
111
  # Test a small file
97
112
  fd = fs.get("small")
98
113
  _assert_is_file(fd, 5, FS3_ZeroLevelAddrType.FILE_DESCRIPTOR_RESIDENT)
@@ -111,11 +126,13 @@ def test_vmfs_content(path: str) -> None:
111
126
  # Test a symlink
112
127
  fd = fs.get("symlink")
113
128
  assert fd.is_symlink()
129
+ assert stat.S_ISLNK(fd.mode)
114
130
  assert fd.link == f"/vmfs/volumes/{fs.label}/small"
115
131
 
116
132
  # Test a directory
117
133
  fd = fs.get("directory")
118
134
  assert fd.is_dir()
135
+ assert stat.S_ISDIR(fd.mode)
119
136
  contents = fd.listdir()
120
137
 
121
138
  assert set(contents.keys()) == {f"file{i}" for i in range(1, 101)} | {".", ".."}, (
@@ -213,5 +230,6 @@ def _assert_is_file(fd: vmfs.FileDescriptor, size: int, zla: FS3_ZeroLevelAddrTy
213
230
  assert not fd.is_symlink()
214
231
  assert not fd.is_rdm()
215
232
  assert not fd.is_system()
233
+ assert stat.S_ISREG(fd.mode)
216
234
  assert fd.size == size
217
235
  assert fd.zla == zla
@@ -4,7 +4,7 @@ envlist = lint, py3, pypy3
4
4
  # requires if they are not available on the host system. This requires the
5
5
  # locally installed tox to have a minimum version 3.3.0. This means the names
6
6
  # of the configuration options are still according to the tox 3.x syntax.
7
- minversion = 4.4.3
7
+ minversion = 4.27.0
8
8
  # This version of virtualenv will install setuptools version 68.2.2 and pip
9
9
  # 23.3.1. These versions fully support python projects defined only through a
10
10
  # pyproject.toml file (PEP-517/PEP-518/PEP-621). This pip version also support
@@ -14,9 +14,9 @@ requires = virtualenv>=20.24.6
14
14
  [testenv]
15
15
  extras = dev
16
16
  deps =
17
- pytest
18
17
  pytest-cov
19
18
  coverage
19
+ dependency_groups = test
20
20
  commands =
21
21
  pytest --basetemp="{envtmpdir}" {posargs:--color=yes --cov=dissect --cov-report=term-missing -v tests}
22
22
  coverage report
@@ -24,26 +24,24 @@ commands =
24
24
 
25
25
  [testenv:build]
26
26
  package = skip
27
- deps =
28
- build
27
+ dependency_groups = build
29
28
  commands =
30
29
  pyproject-build
31
30
 
32
31
  [testenv:fix]
33
32
  package = skip
34
- deps =
35
- ruff==0.12.1
33
+ dependency_groups = lint
36
34
  commands =
35
+ ruff check --fix dissect tests
37
36
  ruff format dissect tests
38
37
 
39
38
  [testenv:lint]
40
39
  package = skip
41
- deps =
42
- ruff==0.12.1
43
- vermin
40
+ dependency_groups = lint
44
41
  commands =
45
42
  ruff check dissect tests
46
- vermin -t=3.9- --no-tips --lint dissect tests
43
+ ruff format --check dissect tests
44
+ vermin -t=3.10- --no-tips --lint dissect tests
47
45
 
48
46
  [testenv:docs-build]
49
47
  allowlist_externals = make