test-framework: add null blk

Signed-off-by: Kamil Gierszewski <kamil.gierszewski@huawei.com>
This commit is contained in:
Kamil Gierszewski
2024-09-13 12:00:19 +02:00
committed by Katarzyna Treder
parent 42ebe34da3
commit 1e82bd6d3c
3 changed files with 53 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
#
# Copyright(c) 2019-2021 Intel Corporation
# Copyright(c) 2023 Huawei Technologies Co., Ltd.
# Copyright(c) 2023-2024 Huawei Technologies Co., Ltd.
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -9,8 +9,7 @@ from test_tools.fs_utils import (
readlink,
create_directory,
check_if_symlink_exists,
check_if_directory_exists,
check_if_special_block_exist
check_if_directory_exists
)
from test_utils.filesystem.file import File
@@ -77,12 +76,6 @@ class Symlink(File):
raise FileExistsError("Existing symlink points to a different target.")
elif not create:
raise FileNotFoundError("Requested symlink does not exist.")
is_special_block = check_if_special_block_exist(link_path)
if is_special_block:
if not target or readlink(link_path) == readlink(target):
return cls(link_path)
is_dir = check_if_directory_exists(link_path)
if is_dir:
raise IsADirectoryError(