Method for testing Linux kernel-grade unit

A unit test, kernel-level technology, applied in the field of Linux kernel-level unit test, can solve the problems of unit test framework and unit test method without Linux kernel space

Inactive Publication Date: 2010-01-27
SAMSUNG ELECTRONICS CHINA R&D CENT +1
View PDF3 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] Currently there is no unit testing framework ...

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
  • Method for testing Linux kernel-grade unit
  • Method for testing Linux kernel-grade unit
  • Method for testing Linux kernel-grade unit

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0015] Embodiments of the present invention will be described in detail below. First, several concepts used in the embodiments of the present invention are clarified.

[0016] Module under test

[0017] The module under test is a kernel module for a certain purpose written by us, and it needs to be unit tested. In the exemplary embodiment of the present invention, it is assumed that the module under test is mod.

[0018] function under test

[0019] The function under test in the module under test. In an exemplary embodiment of the present invention it is assumed that there is a function foo_bar under test of a unit foo.

[0020] unit test module

[0021] The unit test module is an independent kernel module that uses the unit test module to perform unit tests on the units in the module under test. Kut_mod is assumed in the exemplary embodiment of the present invention.

[0022] unit test function

[0023] The unit test function is included in the unit test module and is...

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 provides a method for testing a Linux kernel-grade unit, which comprises the following steps of: compiling a tested module and loading the compiled tested module into a kernel space; building a kernel-grade unit testing frame; building a unit testing module; compiling the kernel-grade unit testing frame and the unit testing module together and loading the compiled module into the kernel space; and outputting a unit testing result.

Description

technical field [0001] The invention relates to a unit test method, more specifically, to a Linux kernel-level unit test method. Background technique [0002] Unit testing is recognized as a critical step in the software development process. Unit testing simplifies error detection, improving software quality while reducing development time and cost. [0003] Generally speaking, a unit test is used to judge the behavior of a specific function under a specific condition (or scenario). For example, you might put a large value into an ordered list, and then make sure that the value appears at the end of the list. Or, you might remove characters from a string that match a certain pattern, and then verify that the string really doesn't contain those characters anymore. [0004] A variety of unit testing frameworks already exist, but they are all used for application unit testing in user space. For example, a method and device for automatically generating unit test cases is dis...

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
IPC IPC(8): G06F11/36
Inventor 邱龙斌纪晨谭姝王石理素霞王仪科
Owner SAMSUNG ELECTRONICS CHINA R&D CENT
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products