aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorDaniel Latypov <dlatypov@google.com>2021-12-14 11:26:11 -0800
committerShuah Khan <skhan@linuxfoundation.org>2021-12-15 11:50:41 -0700
commitdb1679813f9f86b05bbbc6f05f4cdbe481d59352 (patch)
tree0dba43fdeedd80fa6815f7409cf8453e4d786819 /drivers/gpu/drm/amd/amdgpu/amdgpu.h
parent7fa7ffcf9babaea2f0a81681b4ef460ee4b93278 (diff)
kunit: tool: use dataclass instead of collections.namedtuple
namedtuple is a terse way of defining a collection of fields. However, it does not allow us to annotate the type of these fields. It also doesn't let us have any sort of inheritance between types. Since commit df4b0807ca1a ("kunit: tool: Assert the version requirement"), kunit.py has asserted that it's running on python >=3.7. So in that case use a 3.7 feature, dataclasses, to replace these. Changes in detail: * Make KunitExecRequest contain all the fields needed for exec_tests * Use inheritance to dedupe fields * also allows us to e.g. pass a KUnitRequest in as a KUnitParseRequest * this has changed around the order of some fields * Use named arguments when constructing all request objects in kunit.py * This is to prevent accidentally mixing up fields, etc. Signed-off-by: Daniel Latypov <dlatypov@google.com> Reviewed-by: Brendan Higgins <brendanhiggins@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
0 files changed, 0 insertions, 0 deletions