Upgrading and downgrading test method and device, electronic equipment and medium

By obtaining the hard disk type and determining the corresponding firmware lifting tool for testing, the problem of fragmentation of the firmware lifting test process is solved, and the test process is simplified and efficiency is improved.

CN120492350APending Publication Date: 2025-08-15INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510638095.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The existing firmware lifting and downgrading test process is fragmented, resulting in increased complexity and inefficiency of the test process.

Method used

By obtaining the target hard disk type, determine the corresponding firmware lifting tool, and use this tool to perform lifting and downgrade testing.

Benefits of technology

Simplifies the firmware lifting and downgrading test process and improves testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120492350A_ABST
    Figure CN120492350A_ABST
Patent Text Reader

Abstract

The invention discloses an upgrading and downgrading test method and device, electronic equipment and a medium, and relates to the technical field of computer hardware, and the method comprises the steps: obtaining a hard disk type corresponding to a target hard disk in response to a received upgrading and downgrading test instruction for firmware in the target hard disk; determining a firmware upgrading and downgrading tool corresponding to the target hard disk based on the hard disk type corresponding to the target hard disk; the firmware in the target hard disk is subjected to upgrading and downgrading test by utilizing the upgrading and downgrading tool, so that the technical problem that the firmware upgrading and downgrading test efficiency is low due to the fact that the firmware refreshing process is fragmented and the complexity of the test process is increased in a related firmware upgrading and downgrading test scheme is solved, and the purposes of simplifying the firmware upgrading and downgrading test process and improving the firmware upgrading and downgrading test efficiency are achieved. And the upgrading and downgrading test efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer hardware technology, and in particular to upgrade and downgrade test methods, devices, electronic equipment, and media. Background Art

[0002] In related firmware upgrade and downgrade testing solutions, different manufacturers have developed their own mature hard drive firmware refresh methods. With the continuous advancement of technology, these different refresh methods have become increasingly complex, and the firmware refresh process has become fragmented, increasing the complexity of the testing process and resulting in low efficiency of firmware upgrade and downgrade testing. Summary of the Invention

[0003] The present application provides an upgrade and downgrade test method, device, electronic device and medium to at least solve the problem of fragmentation of firmware upgrade and downgrade test process in related technologies, which increases the complexity of the test process and leads to low efficiency of firmware upgrade and downgrade test.

[0004] This application provides an upgrade and downgrade test method, including:

[0005] In response to receiving an upgrade / downgrade test instruction for the firmware in the target hard disk, obtaining a hard disk type corresponding to the target hard disk;

[0006] Determine the firmware upgrade / downgrade tool corresponding to the target hard disk based on the hard disk type corresponding to the target hard disk;

[0007] Use the upgrade and downgrade tool to test the firmware upgrade in the target hard disk.

[0008] The present application also provides a test device for upgrading and downgrading, comprising:

[0009] an acquiring unit, configured to acquire a hard disk type corresponding to the target hard disk in response to receiving an upgrade / downgrade test instruction for the firmware in the target hard disk;

[0010] a determination unit, configured to determine a firmware upgrade or downgrade tool corresponding to the target hard disk based on the hard disk type corresponding to the target hard disk;

[0011] The test unit is used to perform upgrade and downgrade tests on the firmware in the target hard disk using the upgrade and downgrade tool.

[0012] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned upgrade and downgrade test methods when executing the computer program.

[0013] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned upgrade and downgrade test methods are implemented.

[0014] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned upgrade and downgrade test methods when executed by a processor.

[0015] Through the present application, in response to receiving an upgrade and upgrade test instruction for the firmware in the target hard disk, the hard disk type corresponding to the target hard disk is obtained; based on the hard disk type corresponding to the target hard disk, the firmware upgrade and upgrade tool corresponding to the target hard disk is determined; and the firmware in the target hard disk is upgraded and upgraded using the upgrade and upgrade tool, thereby solving the technical problems of the fragmentation of the firmware upgrade and upgrade test process in the related firmware upgrade and upgrade test schemes, increasing the complexity of the test process, and resulting in low efficiency of the firmware upgrade and upgrade test, and achieving the technical effect of simplifying the firmware upgrade and upgrade test process and improving the efficiency of the upgrade and upgrade test. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0017] Figure 1 A flowchart of an upgrade and downgrade test method provided in an embodiment of the present application;

[0018] Figure 2 A flowchart of a method for determining a firmware upgrade tool provided in an embodiment of the present application;

[0019] Figure 3 A flowchart of a hard disk information comparison method provided in an embodiment of the present application;

[0020] Figure 4 A schematic structural diagram of a upgrading and downgrading testing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0022] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.

[0023] In order to facilitate those skilled in the art to better understand the technical solutions described in the embodiments of the present disclosure, the technical terms in the embodiments of the present disclosure are explained as follows before introducing the embodiments of the present disclosure.

[0024] Firmware (FW): A software program embedded in a hard drive or other hardware device that controls the basic functions and operations of the hardware. For hard drives, firmware manages data reading and writing, error correction, power management, and other functions.

[0025] Hard Disk Drive (HDD): A traditional data storage device based on spinning disks that stores and retrieves digital information using one or more rapidly rotating platters and a moving read / write head. Data is recorded on concentric tracks on the disk surface, and the head reads or writes the data as the disks rotate.

[0026] Solid State Drive (SSD): A modern storage device that uses non-volatile flash memory as a persistent storage medium.

[0027] Non-Volatile Memory Express (NVME): Designed specifically for solid-state drives using the PCIe interface, it aims to maximize the performance potential of SSDs, reduce system overhead used in flash storage and solid-state drives, and provide faster response times and lower latency.

[0028] Serial Attached SCSI (SAS): A point-to-point serial protocol for computer data storage that applies the SCSI command set to high-speed serial communication links and is widely used in enterprise-class servers and storage systems.

[0029] Redundant Array of Independent Disks (RAID): A technology that combines multiple physical hard drives to create one or more logical units. Its primary purpose is to improve performance, increase redundancy, or both.

[0030] Self-Monitoring, Analysis and Reporting Technology (SMART) information: A monitoring system built into most hard drives (including HDDs and SSDs) that detects and reports various indicators that may lead to drive failure, allowing you to predict potential problems and take preventative measures.

[0031] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0032] The following briefly introduces several solutions related to the upgrade and downgrade test methods in related technologies:

[0033] Plan A: The firmware functions of early HDDs described in Plan A are relatively simple, primarily used to manage disk read and write operations and error handling. Key HDD firmware testing focuses on firmware compatibility testing, used to verify the new firmware's compatibility with the hardware and operating system; basic functionality testing, used to assess the drive's read and write performance, seek time, and error handling capabilities after the firmware upgrade; and rollback testing, used to verify that a firmware downgrade can be successfully restored to the previous version. The testing tools used are specialized tools (such as Seagate SeaTools and Western Digital Data Lifeguard) and command-line tools (such as hdparm and smartctl). This testing method is relatively simple, focusing primarily on basic functionality and compatibility.

[0034] Plan B: Plan B shows that the SSD firmware complexity is much higher than that of an HDD, involving functions such as flash memory management, wear leveling, and garbage collection. Key SSD testing focuses include performance testing to verify the SSD's read and write speeds, IOPS, and latency after a firmware upgrade; endurance testing to test the firmware's impact on flash memory lifespan (such as TBW, Total Bytes Written); Trim and garbage collection testing to verify the effectiveness of the Trim command and garbage collection mechanism after a firmware upgrade; data integrity testing to ensure that data is not lost or corrupted during the firmware upgrade; and rollback testing to verify whether a firmware downgrade can be successfully restored to the previous version. Testing tools include SSD-specific tools (such as Samsung Magician and Intel SSD Toolbox) and general-purpose testing tools (such as fio and CrystalDiskMark). Currently, more attention is paid to SSD firmware testing performance optimization and data integrity.

[0035] Plan C: Plan C states that the emergence of the NVMe protocol has significantly improved the performance of SSDs, and firmware testing needs to adapt to higher speeds and lower latency. The testing focuses of firmware that complies with this protocol include protocol compatibility testing, which is used to verify whether the firmware supports the latest features of the NVMe protocol (such as multi-queue and namespace management); low-latency testing, which is used to test the response time of the NVMe hard drive after the firmware upgrade; bandwidth testing, which is used to verify the maximum bandwidth of the NVMe hard drive after the firmware upgrade; temperature and power consumption testing, which is used to test the impact of the firmware on the temperature and power consumption of the hard drive; and data security testing, which is used to ensure that data will not be lost or damaged during the firmware upgrade process. Testing tools that comply with this protocol include protocol-specific tools (such as NVMe CLI, IOMeter) and management tools (such as IntelMAS, Samsung NVMe Driver). At this stage, NVMe firmware testing pays more attention to protocol compatibility and low-latency performance.

[0036] Plan D: Plan D states that the emergence of new storage technologies (such as Intel Optane and QLC NAND) has brought new firmware testing requirements. Its testing focuses include persistent memory testing, which is used to test the firmware's support for low latency and high endurance for persistent memory such as Optane; QLC NAND testing, which is used to verify the firmware's optimization of QLC SSD write performance and lifespan; and new interface testing, which is used for bandwidth and latency testing of PCIe 4.0 / 5.0 interfaces. The testing tools used include dedicated tools (such as the Intel Optane Memory Tool) and customized test scripts and tools. At this stage, firmware testing of new storage technologies focuses more on performance optimization and lifespan management.

[0037] Plan E: Plan E states that as data centers expand in size, manual testing can no longer meet demand, and automated and intelligent testing is becoming a trend. Its testing focuses include an automated testing framework, which is used to automate the firmware upgrade and upgrade testing process through scripts and tools (such as Jenkins and Ansible). Intelligent analytical testing uses machine learning and big data to analyze test results and predict performance changes and potential issues after firmware upgrades. Large-scale testing simulates large-scale storage scenarios in a cloud environment to test the stability and compatibility of firmware upgrades. The testing tools used include automated testing platforms (such as Splunk and ELK Stack) and automated testing tools. Currently, automated and intelligent testing methods have significantly improved test efficiency and coverage.

[0038] Plan F: Plan F addresses increasingly stringent requirements for data security and privacy protection, necessitating that firmware testing encompass both security and compliance. Key testing areas include encryption performance testing, used to verify the performance impact of hardware encryption functions (such as SED, Self-Encrypting Drive) after firmware upgrades; data destruction testing, used to test the security of data destruction (such as Secure Erase) after firmware upgrades; and compliance testing, used to ensure firmware complies with relevant regulations (such as GDPR and HIPAA). Testing tools include security testing tools (such as those recommended by NIST) and vendor-provided security testing tools. Currently, security and compliance testing have become crucial components of firmware upgrade and upgrade testing.

[0039] In the above scenario, the evolution of hard drive firmware upgrade and upgrade testing methods has progressed from traditional HDDs to SSDs, NVMe, and emerging storage technologies. Testing has gradually shifted its focus from basic functionality and compatibility to performance optimization, low latency, durability, security, and compliance. Simultaneously, the widespread adoption of automated and intelligent testing methods has significantly improved testing efficiency. In the future, as storage technology continues to advance, firmware upgrade and upgrade testing methods will continue to evolve towards greater efficiency, comprehensiveness, and intelligence.

[0040] In related firmware upgrade and downgrade testing solutions, different manufacturers have developed their own mature hard drive firmware refresh methods. With the continuous advancement of technology, these different refresh methods have become increasingly complex, and the firmware refresh process has become fragmented, increasing the complexity of the testing process and resulting in low efficiency of firmware upgrade and downgrade testing.

[0041] Through the present application, in response to receiving an upgrade and upgrade test instruction for the firmware in the target hard disk, the hard disk type corresponding to the target hard disk is obtained; based on the hard disk type corresponding to the target hard disk, the firmware upgrade and upgrade tool corresponding to the target hard disk is determined; and the firmware in the target hard disk is upgraded and upgraded using the upgrade and upgrade tool, thereby solving the technical problems of the fragmentation of the firmware upgrade and upgrade test process in the related firmware upgrade and upgrade test schemes, increasing the complexity of the test process, and resulting in low efficiency of the firmware upgrade and upgrade test, and achieving the technical effect of simplifying the firmware upgrade and upgrade test process and improving the efficiency of the upgrade and upgrade test.

[0042] An upgrade and downgrade test method provided by an embodiment of the present disclosure can be executed by an automated testing platform or an automated testing tool. The upgrade and downgrade test method can be applied to scenarios where a large number of storage devices need to be managed and maintained.

[0043] The embodiments of the present application provide an upgrade and downgrade test method, and the method is described in detail in conjunction with the execution process of the upgrade and downgrade test method.

[0044] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0045] Figure 1 A flowchart of an upgrade and downgrade test method provided in an embodiment of the present disclosure.

[0046] like Figure 1 As shown, it includes the following steps:

[0047] Step 101: in response to receiving an upgrade / downgrade test instruction for the firmware in a target hard disk, obtaining a hard disk type corresponding to the target hard disk;

[0048] In some embodiments, the upgrade and downgrade test instructions are used to perform firmware upgrade or downgrade operations on the target hard disk, instructing the system to change the firmware version of a hard disk, either upgrading the existing firmware to a new version or rolling back to an old version, usually to fix known problems, add new features or improve performance.

[0049] In some embodiments, the upgrade and downgrade test instructions may include the type of operation to be performed, information about the target hard disk, and specific requirements for the test. Specifically, the operation type may include upgrade operations and downgrade operations; the information about the target hard disk may be the hard disk model, serial number, and connection method; the specific requirements for the test may include the number of tests, whether to test with load, and how to handle exceptions.

[0050] In some embodiments, once the above instructions are received, it is necessary to determine the specific type of hard disk on which the firmware upgrade and upgrade test is to be performed. Different types of hard disks have different physical structures and working principles, so different types of firmware management and upgrade and upgrade testing methods will also be different.

[0051] In some embodiments, before performing the firmware upgrade and downgrade test, the provided hard disk upgrade and downgrade FW files can be filled in as parameters in a command line mode, or the files can be uploaded to the page when executed in a graphical interface.

[0052] In some embodiments, in a Unix-like system, a variety of command line tools can be used to obtain the SMART information of the hard disk. The SMART information includes the hard disk type. The library provided by the programming language can be used to access the system information to obtain the hard disk type corresponding to the target hard disk. Dedicated hardware detection tools can also be used to obtain the hard disk type corresponding to the target hard disk.

[0053] Step 102: Determine a firmware upgrade or downgrade tool corresponding to the target hard disk based on the hard disk type corresponding to the target hard disk;

[0054] In some embodiments, the hard disk type and connection method corresponding to the target hard disk can be used to determine which tool to use for firmware upgrade or downgrade operations. For example, when the target hard disk is an HDD or SSD type, the firmware upgrade or downgrade tool corresponding to the HDD or SSD can be further determined based on the connection method between the target hard disk and the electronic device. The electronic device can be a computer or server system.

[0055] In some embodiments, since different types of hard disks have different physical structures and working principles, the firmware upgrade and downgrade tools corresponding to the target hard disks are also different.

[0056] In some embodiments, by determining a firmware upgrade or downgrade tool corresponding to a target hard disk based on the hard disk type corresponding to the target hard disk, different types of hard disks and their firmware update requirements can be automatically processed, thereby improving testing efficiency and accuracy.

[0057] Step 103: Perform an upgrade test on the firmware in the target hard disk using an upgrade tool.

[0058] In some embodiments, before performing a firmware upgrade or downgrade operation, it is necessary to first obtain the SMART information of the target hard disk, so as to determine the upgrade or downgrade test result after the upgrade or downgrade test is completed.

[0059] In some embodiments, before performing a firmware upgrade or downgrade operation, it is necessary to ensure that all necessary dependencies are installed and the tool version used is the latest.

[0060] Through the present application, in response to receiving an upgrade and upgrade test instruction for the firmware in the target hard disk, the hard disk type corresponding to the target hard disk is obtained; based on the hard disk type corresponding to the target hard disk, the firmware upgrade and upgrade tool corresponding to the target hard disk is determined; and the firmware in the target hard disk is upgraded and upgraded using the upgrade and upgrade tool, thereby solving the technical problems of the fragmentation of the firmware upgrade and upgrade test process in the related firmware upgrade and upgrade test schemes, increasing the complexity of the test process, and resulting in low efficiency of the firmware upgrade and upgrade test, and achieving the technical effect of simplifying the firmware upgrade and upgrade test process and improving the efficiency of the upgrade and upgrade test.

[0061] In some embodiments, based on the hard disk type corresponding to the target hard disk, determining a firmware upgrade or downgrade tool corresponding to the target hard disk includes:

[0062] In response to the hard disk type corresponding to the target hard disk being a first type, determining a connection mode between the target hard disk and the electronic device, the first type including a mechanical hard disk type and a solid state hard disk type;

[0063] In some embodiments, whether the hard disk type corresponding to the target hard disk is the first type can be determined by reading the SMART information of the hard disk. Specifically, the SMART information can provide detailed information about the hard disk characteristics, including the rotation rate that can distinguish between HDD and SSD.

[0064] In some embodiments, the connection method between the target hard disk and the electronic device refers to the interface or technology used to connect the hard disk to the electronic device. Different connection methods will affect data transmission speed, reliability, and compatibility.

[0065] In some embodiments, the connection method between the hard disk and the electronic device can be further confirmed based on the hard disk type and system configuration.

[0066] Based on the connection mode between the target hard disk and the electronic device, a firmware upgrade tool corresponding to the target hard disk is determined.

[0067] In some embodiments, the connection mode between the target hard disk and the electronic device includes one of direct connection, PCI high-speed adapter board connection, serial connection small computer system interface card connection, and independent disk redundant array card connection.

[0068] In some embodiments, the direct connection in the present application includes a direct connection in the traditional sense and a peripheral component interconnect high-speed adapter board connection (i.e., a PCIE adapter board connection), wherein the direct connection in the traditional sense refers to the hard disk being directly connected to the computer through the interface on the motherboard without the need for an additional expansion card or controller; the peripheral component interconnect high-speed adapter board connection is typically used to add more hard disks when there are not enough built-in hard disk slots, and to implement specific types of interface conversions; the serial connection small computer system interface card connection refers to connecting the hard disk to the computer through a dedicated SAS controller card; the independent disk redundant array card connection uses a RAID controller card to manage a group of hard disks to improve data security and / or performance.

[0069] In some embodiments, as Figure 2 As shown, Figure 2 A flow chart of a method for determining a firmware upgrade and downgrade tool provided in an embodiment of the present application, wherein, if the connection method between the target hard disk and the electronic device is a direct connection, the firmware upgrade and downgrade tool corresponding to the target hard disk is determined to be a direct connection firmware refresh tool, and the refresh here includes upgrade refresh and downgrade refresh. If the connection method between the target hard disk and the electronic device is a Broadcom connection, the firmware upgrade and downgrade tool corresponding to the target hard disk is determined to be the storcli tool. If the connection method between the target hard disk and the electronic device is a PMC card connection, the firmware upgrade and downgrade tool corresponding to the target hard disk is determined to be the arcconf tool, wherein the PMC card is an industrial standard used to define a small, pluggable computer board specification.

[0070] In some embodiments, in addition to this connection method, some HDDs and SSD hard drives produced by niche companies have abnormalities in refresh tools or methods. In this test tool, they are uniformly included in the other of the connection method, and various types of HDD and SSD firmware refresh methods that are constantly emerging can be supplemented.

[0071] In some embodiments, based on the hard disk type corresponding to the target hard disk, determining a firmware upgrade or downgrade tool corresponding to the target hard disk includes:

[0072] In response to the hard disk type corresponding to the target hard disk being the second type, determining an identification type corresponding to the target hard disk, the second type being a hard disk type supporting a non-volatile memory rapid interface protocol;

[0073] In some embodiments, whether the hard disk type corresponding to the target hard disk is the second type can be determined by checking the hard disk specification or confirming through system tools whether the hard disk supports the NVMe protocol.

[0074] In some embodiments, it is also possible to determine whether the hard disk type corresponding to the target hard disk is the second type by reading the SMART information of the hard disk.

[0075] In some embodiments, the identification type corresponding to the target hard disk is used to indicate hard disks produced by different companies.

[0076] Based on the identification type corresponding to the target hard disk, a firmware upgrade or downgrade tool corresponding to the target hard disk is determined.

[0077] In some embodiments, due to the different companies that produce hard disks, the corresponding firmware upgrade and upgrade tools for the target hard disk are also different. The identification type corresponding to the target hard disk can be common (common) and other (other), where the firmware upgrade and upgrade tool corresponding to common is a common refresh tool, such as the nvme-cli tool, and the firmware upgrade and upgrade tool corresponding to other is an extensible refresh tool.

[0078] In some embodiments, the upgrade and downgrade test method further includes:

[0079] In response to receiving the number of upgrade and downgrade tests for the firmware in the target hard disk, obtaining first target hard disk information, the first target hard disk information being used to indicate hard disk information before the firmware upgrade and downgrade test, the first target hard disk information including at least one of firmware version information, serial number information, and node information;

[0080] In some embodiments, the number of upgrade and upgrade tests for the firmware in the target hard disk refers to the preset number of refreshes that need to be performed on the firmware to be upgraded or upgraded, which can verify the stability, performance improvement, or fix of specific problems of the new firmware version; if the firmware update includes major changes or fixes multiple critical problems, more test cycles may be required to fully evaluate its impact.

[0081] In some embodiments, taking into account differences in hardware configuration, operating system version, and other factors, repeated testing is required in multiple environments to ensure compatibility.

[0082] In some embodiments, the hard disk information is the SMART information of the aforementioned hard disk.

[0083] In some embodiments, the firmware version information refers to the firmware version number currently installed on the hard disk; the serial number information refers to the unique serial number of the hard disk, which is used to accurately identify each hard disk; the node information refers to the identifier of the system or server where the hard disk is located, which helps to track and manage test conditions on multiple devices.

[0084] In some embodiments, by determining the appropriate number of upgrade and downgrade tests and accurately obtaining the first target hard disk information, the reliability and stability of the firmware upgrade and downgrade test can be ensured, which facilitates locating the problem, especially when encountering an abnormal situation, it can quickly trace back to the specific version or configuration.

[0085] Obtaining second target hard disk information, where the second target hard disk information is used to indicate hard disk information after each firmware upgrade or downgrade test;

[0086] In some embodiments, the second target hard disk information may be obtained during the firmware upgrade / downgrade test.

[0087] In some embodiments, the hard disk information after each firmware upgrade or downgrade test may be compared with the first target hard disk information to determine whether the result of the firmware upgrade or downgrade test is abnormal.

[0088] A firmware upgrade / downgrade test result of the target hard disk is determined based on the information of the first target hard disk and the second target hard disk.

[0089] In some embodiments, the target hard drive's firmware upgrade and downgrade test results may include whether the update to the expected version was successful, list any significant health status changes, especially those that may indicate potential problems, and provide detailed descriptions of performance changes if performance test data is available.

[0090] In some embodiments, by determining the firmware upgrade and downgrade test results of the target hard disk based on the information of the first target hard disk and the second target hard disk, comparing the SMART attributes before and after the firmware update, monitoring the changes in the health status of the hard disk, and promptly discovering possible problems.

[0091] In some embodiments, determining a firmware upgrade / downgrade test result of the target hard disk based on information about the first target hard disk and the second target hard disk includes:

[0092] Generate a first log based on information of the first target hard disk and the second target hard disk;

[0093] In some embodiments, the first log is used to record key changes, operation results, and system status during the entire firmware upgrade and upgrade test process, to facilitate subsequent analysis, tracing problems, or for quality reporting.

[0094] In response to the first log being an abnormal log, the first log is added to the second log, and a firmware upgrade / downgrade test result of the target hard disk is determined based on the second log.

[0095] In some embodiments, as Figure 3 As shown, Figure 3 This is a flow chart of a hard disk information comparison method provided in an embodiment of the present application. The basis for hard disk firmware comparison is the FW information specified when filling in parameters using the command line or graphical interface before the test. A new log will be generated for each comparison, and the information on the abnormality in the last comparison will be stored separately in a new log (i.e., the second log). If the comparison is correct, it will not be recorded in the second log. The abnormal information includes whether there is an error, warning, reason for failure, etc.

[0096] In some embodiments, a try-except structure may be used to capture exception information and write it to a log.

[0097] In some embodiments, by determining the firmware upgrade and upgrade test results of the target hard disk based on the second log, potential problems can be identified, and a large amount of test data can be effectively managed and analyzed, thereby ensuring system stability and security.

[0098] In some embodiments, in response to receiving an upgrade / downgrade test instruction for the firmware in the target hard disk, before obtaining the hard disk type corresponding to the target hard disk, the upgrade / downgrade test method further includes:

[0099] In response to receiving an upgrade / downgrade test instruction for the firmware in the target hard disk, obtaining an input / output performance test instruction for the target hard disk;

[0100] In some embodiments, the input / output performance test instruction for the target hard disk is used to instruct a stress test on the target hard disk, such as a stress test (Flexible I / O Tester, FIO) instruction for generating various types of I / O loads and measuring their performance.

[0101] In some embodiments, the input / output performance test instructions for the target hard disk can be determined based on parameters such as read / write modes, such as sequential read, sequential write, random read, random write, etc.; block size, queue depth, which refers to the number of concurrent requests; test duration or total amount of data, such as can be controlled by running time seconds or total test data volume.

[0102] Based on the input / output performance test instruction, determining an instruction type corresponding to the input / output performance test instruction, where the instruction type includes a read instruction and a write instruction;

[0103] In some embodiments, based on the FIO test instruction, an FIO selection input / output performance test instruction corresponding to the instruction type is performed, wherein the read instruction can be sequential read, random read, etc., and the write instruction can be sequential write, random write, etc.

[0104] In some embodiments, the instruction type also includes mixed instructions, that is, instructions that include both read and write operations.

[0105] Performs stress testing on the target hard drive based on the command type.

[0106] In some embodiments, by performing a stress test on the target hard disk based on the instruction type, a comprehensive stress test can be performed on the target hard disk based on a specific instruction type, and the hard disk performance can be evaluated based on the test results.

[0107] Through the present application, in response to receiving an upgrade and upgrade test instruction for the firmware in the target hard disk, the hard disk type corresponding to the target hard disk is obtained; based on the hard disk type corresponding to the target hard disk, the firmware upgrade and upgrade tool corresponding to the target hard disk is determined; and the firmware in the target hard disk is upgraded and upgraded using the upgrade and upgrade tool, thereby solving the technical problems of the fragmentation of the firmware upgrade and upgrade test process in the related firmware upgrade and upgrade test schemes, increasing the complexity of the test process, and resulting in low efficiency of the firmware upgrade and upgrade test, and achieving the technical effect of simplifying the firmware upgrade and upgrade test process and improving the efficiency of the upgrade and upgrade test.

[0108] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.

[0109] The embodiment of the present application further provides a upgrading and downgrading testing device 400, Figure 4 A schematic diagram of a structure of a test device for upgrading and downgrading provided by an embodiment of the present disclosure is shown in FIG. Figure 4 As shown, including:

[0110] The acquisition unit 401 is configured to acquire a hard disk type corresponding to the target hard disk in response to receiving an upgrade or downgrade test instruction for the firmware in the target hard disk;

[0111] The determining unit 402 is configured to determine a firmware upgrade tool corresponding to the target hard disk based on the hard disk type corresponding to the target hard disk;

[0112] The testing unit 403 is used to perform an upgrade test on the firmware in the target hard disk using an upgrade tool.

[0113] Furthermore, in a possible implementation of the embodiment of the present disclosure, the determining unit 402 is configured to:

[0114] In response to the hard disk type corresponding to the target hard disk being a first type, determining a connection mode between the target hard disk and the electronic device, the first type including a mechanical hard disk type and a solid state hard disk type;

[0115] Based on the connection mode between the target hard disk and the electronic device, a firmware upgrade tool corresponding to the target hard disk is determined.

[0116] Furthermore, in a possible implementation of the embodiment of the present disclosure, the connection method between the target hard disk and the electronic device includes one of a direct connection, a peripheral component interconnect high-speed adapter board connection, a serial connection small computer system interface card connection, and an independent disk redundant array card connection.

[0117] Furthermore, in a possible implementation of the embodiment of the present disclosure, the determining unit 402 is configured to:

[0118] In response to the hard disk type corresponding to the target hard disk being the second type, determining an identification type corresponding to the target hard disk, the second type being a hard disk type supporting a non-volatile memory rapid interface protocol;

[0119] Based on the identification type corresponding to the target hard disk, a firmware upgrade or downgrade tool corresponding to the target hard disk is determined.

[0120] Furthermore, in a possible implementation of the embodiment of the present disclosure, the upgrade / downgrade test apparatus 400 further includes a test result determination unit, which is configured to:

[0121] In response to receiving the number of upgrade and downgrade tests for the firmware in the target hard disk, obtaining first target hard disk information, the first target hard disk information being used to indicate hard disk information before the firmware upgrade and downgrade test, the first target hard disk information including at least one of firmware version information, serial number information, and node information;

[0122] Obtaining second target hard disk information, where the second target hard disk information is used to indicate hard disk information after each firmware upgrade or downgrade test;

[0123] A firmware upgrade / downgrade test result of the target hard disk is determined based on the information of the first target hard disk and the second target hard disk.

[0124] Furthermore, in a possible implementation of the embodiment of the present disclosure, the upgrade / downgrade test apparatus 400 further includes a test result determination unit, which is configured to:

[0125] Generate a first log based on information of the first target hard disk and the second target hard disk;

[0126] In response to the first log being an abnormal log, the first log is added to the second log, and a firmware upgrade / downgrade test result of the target hard disk is determined based on the second log.

[0127] Furthermore, in a possible implementation of the embodiment of the present disclosure, the upgrade and downgrade test device 400 further includes a pressure testing unit, which is configured to:

[0128] In response to receiving an upgrade / downgrade test instruction for the firmware in the target hard disk, obtaining an input / output performance test instruction for the target hard disk;

[0129] Based on the input / output performance test instruction, determining an instruction type corresponding to the input / output performance test instruction, where the instruction type includes a read instruction and a write instruction;

[0130] Performs stress testing on the target hard drive based on the command type.

[0131] Through the present application, in response to receiving an upgrade and upgrade test instruction for the firmware in the target hard disk, the hard disk type corresponding to the target hard disk is obtained; based on the hard disk type corresponding to the target hard disk, the firmware upgrade and upgrade tool corresponding to the target hard disk is determined; and the firmware in the target hard disk is upgraded and upgraded using the upgrade and upgrade tool, thereby solving the technical problems of the fragmentation of the firmware upgrade and upgrade test process in the related firmware upgrade and upgrade test schemes, increasing the complexity of the test process, and resulting in low efficiency of the firmware upgrade and upgrade test, and achieving the technical effect of simplifying the firmware upgrade and upgrade test process and improving the efficiency of the upgrade and upgrade test.

[0132] For the description of the features in the embodiment corresponding to the upgrade and downgrade test device, please refer to the relevant description of the embodiment corresponding to the upgrade and downgrade test method, and no further details will be given here.

[0133] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned upgrade and downgrade test method embodiments.

[0134] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned upgrade and upgrade test method embodiments when running.

[0135] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0136] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned upgrade and downgrade test method embodiments are implemented.

[0137] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of any of the above-mentioned upgrade and upgrade test method embodiments.

[0138] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0139] The above is a detailed introduction to the upgrade and downgrade test method, device, electronic device and medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims

1. A method for upgrading and downgrading test, characterized in that: include: In response to receiving an upgrade / downgrade test instruction for firmware in a target hard disk, obtaining a hard disk type corresponding to the target hard disk; Determining a firmware upgrade or downgrade tool corresponding to the target hard disk based on the hard disk type corresponding to the target hard disk; The upgrade and downgrade tool is used to perform an upgrade and downgrade test on the firmware in the target hard disk.

2. The upgrade and downgrade test method according to claim 1, characterized in that: The determining, based on the hard disk type corresponding to the target hard disk, a firmware upgrade or downgrade tool corresponding to the target hard disk includes: In response to the hard disk type corresponding to the target hard disk being a first type, determining a connection mode between the target hard disk and the electronic device, the first type including a mechanical hard disk type and a solid state hard disk type; A firmware upgrade or downgrade tool corresponding to the target hard disk is determined based on a connection mode between the target hard disk and the electronic device.

3. The upgrade and downgrade test method according to claim 2, characterized in that: The connection mode between the target hard disk and the electronic device includes one of direct connection, peripheral component interconnect high-speed adapter board connection, serial connection small computer system interface card connection, and independent disk redundant array card connection.

4. The upgrade and downgrade test method according to claim 1, wherein: The determining, based on the hard disk type corresponding to the target hard disk, a firmware upgrade or downgrade tool corresponding to the target hard disk includes: In response to the hard disk type corresponding to the target hard disk being the second type, determining an identification type corresponding to the target hard disk, the second type being a hard disk type supporting a non-volatile memory rapid interface protocol; Based on the identification type corresponding to the target hard disk, a firmware upgrade or downgrade tool corresponding to the target hard disk is determined.

5. The upgrade and downgrade test method according to claim 1, characterized in that: The method further comprises: In response to receiving the number of upgrade and downgrade tests for the firmware in the target hard disk, obtaining first target hard disk information, the first target hard disk information being used to indicate hard disk information before the firmware upgrade and downgrade test, the first target hard disk information including at least one of firmware version information, serial number information, and node information; Acquire second target hard disk information, where the second target hard disk information is used to indicate hard disk information after each firmware upgrade or downgrade test; A firmware upgrade / downgrade test result of the target hard disk is determined based on the information of the first target hard disk and the second target hard disk.

6. The upgrade and downgrade test method according to claim 5, characterized in that: The determining, based on the information of the first target hard disk and the second target hard disk, a firmware upgrade or downgrade test result of the target hard disk includes: Generate a first log based on the information of the first target hard disk and the second target hard disk; In response to the first log being an abnormal log, the first log is added to the second log, and a firmware upgrade / downgrade test result of the target hard disk is determined based on the second log.

7. The upgrade and downgrade test method according to claim 1, characterized in that: In response to receiving the upgrade / downgrade test instruction for the firmware in the target hard disk, before obtaining the hard disk type corresponding to the target hard disk, the method further includes: In response to receiving an upgrade / downgrade test instruction for firmware in a target hard disk, obtaining an input / output performance test instruction for the target hard disk; Based on the input / output performance test instruction, determining an instruction type corresponding to the input / output performance test instruction, the instruction type including a read instruction and a write instruction; Based on the instruction type, a stress test is performed on the target hard disk.

8. A lifting and lowering test device, characterized in that: include: an acquiring unit, configured to acquire a hard disk type corresponding to the target hard disk in response to receiving an upgrade / downgrade test instruction for the firmware in the target hard disk; a determining unit, configured to determine a firmware upgrade or downgrade tool corresponding to the target hard disk based on a hard disk type corresponding to the target hard disk; The testing unit is used to perform an upgrade test on the firmware in the target hard disk using the upgrade tool.

9. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the upgrade and downgrade test method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the upgrade and downgrade test method according to any one of claims 1 to 7 are implemented.