Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix granularity requirement check #5855

Merged
merged 1 commit into from
Aug 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/test/unittest/granularity.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2019-2022, Intel Corporation
# Copyright 2019-2023, Intel Corporation
#

"""Granularity context classes and utilities"""
Expand Down Expand Up @@ -156,9 +156,9 @@ def filter(cls, config, msg, tc):
if req_gran == Non:
return [Non(**kwargs), ]

if req_gran == _CACHELINE_OR_LESS:
if req_gran == [_CACHELINE_OR_LESS]:
tmp_req_gran = [Byte, CacheLine]
elif req_gran == _PAGE_OR_LESS:
elif req_gran == [_PAGE_OR_LESS]:
tmp_req_gran = [Byte, CacheLine, Page]
elif req_gran == [ctx.Any, ]:
tmp_req_gran = ctx.Any.get(conf_defined)
Expand All @@ -169,8 +169,8 @@ def filter(cls, config, msg, tc):

kwargs['tc_dirname'] = tc.tc_dirname

if len(filtered) > 1 and req_gran == _CACHELINE_OR_LESS or \
req_gran == _PAGE_OR_LESS:
if len(filtered) > 1 and req_gran == [_CACHELINE_OR_LESS] or \
req_gran == [_PAGE_OR_LESS]:

def order_by_smallest(elem):
ordered = [Byte, CacheLine, Page]
Expand Down
Loading