Unlock instant, AI-driven research and patent intelligence for your innovation.

A unit test method of linux kernel module

A unit testing and kernel module technology, applied in the field of computer systems and storage, can solve the problem of not applying Linux kernel module unit testing, and achieve the effect of improving the test accuracy

Active Publication Date: 2018-09-28
INSPUR BEIJING ELECTRONICS INFORMATION IND
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Therefore, the unit test method implemented by the unit test framework of user state in the prior art is not suitable for the unit test of the Linux kernel module

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A unit test method of linux kernel module

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0028] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0029] see figure 1 , which shows a flowchart of a method for unit testing a Linux kernel module provided by an embodiment of the present invention, including:

[0030] S11: Compile the tested module and the unit test module, wherein the tested module includes the unit test module.

[0031] Among them, the tested module is the Linux kernel module; and the compilation is to translate the code contained in the tested module and the unit test module into an equi...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a unit test method of a Linux kernel module. The unit test method comprises the following steps: compiling a tested module and a unit test module, wherein the tested module comprises the unit test module; loading the tested module to a kernel space; and testing the tested module by use of the test unit module so as to obtain a test result. Compared with the prior art, the unit test method has the characteristics that the tested module and the unit test module are compiled at the same time, the tested module internally comprises the unit test module, and further the tested module is loaded into the kernel space so as to be subjected to a unit test, so that the unit test method conforms to the characteristic that the Linux kernel module, namely the tested module, operates in the kernel module, and therefore the test accuracy, reliability, coverage rate and the like are effectively improved.

Description

technical field [0001] The invention relates to the technical field of computer systems and storage, and more specifically relates to a unit testing method of a Linux kernel module. Background technique [0002] Unit testing is a key step in the software development process and an important part of code quality and product quality testing. [0003] The unit test method of the Linux kernel module of prior art is to utilize the unit test framework of user mode to finish usually, and Linux kernel module is to run in kernel space, therefore, when utilizing the unit test framework of user mode to carry out unit to Linux kernel module When testing, there are a series of problems such as low test accuracy, reliability and coverage. Therefore, the unit testing method implemented by using the user mode unit testing framework in the prior art is not suitable for the unit testing of Linux kernel modules. [0004] To sum up, how to provide a unit testing method suitable for Linux kern...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F11/36
Inventor 蔡丰龙
Owner INSPUR BEIJING ELECTRONICS INFORMATION IND