1
0
Fork 0

Merging upstream version 2.1~rc0 (Closes: #1015722).

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-16 12:16:19 +01:00
parent 9489161ac8
commit 316e846c86
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
504 changed files with 6751 additions and 2957 deletions

View file

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Copyright (c) 2015-2016 Western Digital Corporation or its affiliates.
#
# This program is free software; you can redistribute it and/or
@ -28,7 +30,6 @@ NVMe Compare Command Testcase:-
"""
from nose.tools import assert_equal, assert_not_equal
from nvme_test_io import TestNVMeIO
@ -44,9 +45,9 @@ class TestNVMeCompareCmd(TestNVMeIO):
- test_log_dir : directory for logs, temp files.
"""
def __init__(self):
def setUp(self):
""" Pre Section for TestNVMeCompareCmd """
TestNVMeIO.__init__(self)
super().setUp()
self.data_size = 1024
self.start_block = 1023
self.setup_log_dir(self.__class__.__name__)
@ -55,9 +56,9 @@ class TestNVMeCompareCmd(TestNVMeIO):
self.create_data_file(self.write_file, self.data_size, "15")
self.create_data_file(self.compare_file, self.data_size, "25")
def __del__(self):
def tearDown(self):
""" Post Section for TestNVMeCompareCmd """
TestNVMeIO.__del__(self)
super().tearDown()
def nvme_compare(self, cmp_file):
""" Wrapper for nvme compare command.
@ -74,6 +75,6 @@ class TestNVMeCompareCmd(TestNVMeIO):
def test_nvme_compare(self):
""" Testcase main """
assert_equal(self.nvme_write(), 0)
assert_not_equal(self.nvme_compare(self.compare_file), 0)
assert_equal(self.nvme_compare(self.write_file), 0)
self.assertEqual(self.nvme_write(), 0)
self.assertNotEqual(self.nvme_compare(self.compare_file), 0)
self.assertEqual(self.nvme_compare(self.write_file), 0)