Linux kernel test brief introuction
2015-12-03 09:05
537 查看
Generally, there are many ways in which you can test the Linux kernel, but we will concentrate on the following four approaches:
1.Using a test version of the kernel for normal work.
2.Running special test suites, like LTP, on the new kernel.
3.Doing unusual things with the new kernel installed.
4.Measuring the system performance with the new kernel installed.
Of course, all of them can be used within one combined test procedure, so they can be regarded as different phases of the testing process.
(1) Boot the kernel with the init=/bin/bash command line argument, which makes it start only one bash process. From there you can check if the filesystems are mounted and unmounted properly and you can test some more complex kernel functions, like the suspend to disk or to RAM, in the minimal configuration.
(2) Next, it is advisable to start the system in runlevel 2.
network and x serve. Check if the network interfaces work and try to run x server manually to make sure that it does not crash.
(3) Finally, you can boot the system into the runlevel 5(fully function) or level 3(fully function without x).
some test tools for linux. http://ltp.sourceforge.net/tooltable.php
Example, unplugging adn replugging USB devices.
stability-change kernel (compare apples to apples).
where to find the message ?
eg:
(1) console
(2) /sys/kernel/debug/memleak(if the kernel memory leak detector is used.)
You can check whether or not the kernel was tainted (means that the source of possible problems may be unrelated to the kernel code) when the problem occurred by looking at the corresponding error message.
If can you see something similar to the following line:
(the word Tainted is crucial here), the kernel was tainted
Distribution kernels are meant to be supported by their distributors rather by the kernel developers, so the problems in these kernels should be reported to the distributors in the first place (usually, the distributor will contact the kernel developers anyway if that is necessary)
references:
https://linux.cn/article-3684-1.html
http://elinux.org/Test_Systems
http://kernelnewbies.org/Linux_Kernel_Tester%27s_Guide_Chapter2
1.Using a test version of the kernel for normal work.
2.Running special test suites, like LTP, on the new kernel.
3.Doing unusual things with the new kernel installed.
4.Measuring the system performance with the new kernel installed.
Of course, all of them can be used within one combined test procedure, so they can be regarded as different phases of the testing process.
2.1 Phase One
The first phase of kernel testing is simple: we try to boot the kernel and use it for normal work.(1) Boot the kernel with the init=/bin/bash command line argument, which makes it start only one bash process. From there you can check if the filesystems are mounted and unmounted properly and you can test some more complex kernel functions, like the suspend to disk or to RAM, in the minimal configuration.
(2) Next, it is advisable to start the system in runlevel 2.
network and x serve. Check if the network interfaces work and try to run x server manually to make sure that it does not crash.
(3) Finally, you can boot the system into the runlevel 5(fully function) or level 3(fully function without x).
2.2 Phase Two(Auto test)
tool: autotest (http://test.kernel.org/autotest/)some test tools for linux. http://ltp.sourceforge.net/tooltable.php
2.3 Phase Three
Do stupid things that nobody sane will do during the normal work.Example, unplugging adn replugging USB devices.
2.4 Measuring performance
time-try to build some benchmark.stability-change kernel (compare apples to apples).
2.5 What exactly are we looking for?
you can find some examples of messages that are related to kernel problems. Usually, such messages appear on the system console, but sometimes (eg. when the problem is not sufficiently serious to make the kernel crash immediately) you can also see them in the logs.where to find the message ?
eg:
(1) console
(2) /sys/kernel/debug/memleak(if the kernel memory leak detector is used.)
2.6 Binary drivers and distribution kernels
sometimes you have no choice (eg. new AMD/ATI graphics adapters are not supported by any Open Source driver known to us).You can check whether or not the kernel was tainted (means that the source of possible problems may be unrelated to the kernel code) when the problem occurred by looking at the corresponding error message.
If can you see something similar to the following line:
EIP: 0060:[<c046c7c3>] Tainted: P VLI
(the word Tainted is crucial here), the kernel was tainted
Distribution kernels are meant to be supported by their distributors rather by the kernel developers, so the problems in these kernels should be reported to the distributors in the first place (usually, the distributor will contact the kernel developers anyway if that is necessary)
references:
https://linux.cn/article-3684-1.html
http://elinux.org/Test_Systems
http://kernelnewbies.org/Linux_Kernel_Tester%27s_Guide_Chapter2
相关文章推荐
- Linux socket 初步
- linux lsof详解
- linux 文件权限
- Linux 执行数学运算
- 10 篇对初学者和专家都有用的 Linux 命令教程
- Linux 与 Windows 对UNICODE 的处理方式
- Ubuntu12.04下QQ完美走起啊!走起啊!有木有啊!
- 解決Linux下Android开发真机调试设备不被识别问题
- 运维入门
- 运维提升
- Linux 自检和 SystemTap
- 神器SystemTap
- Ubuntu Linux使用体验
- c语言实现hashmap(转载)
- Linux 信号signal处理机制
- linux下mysql添加用户
- Scientific Linux 5.5 图形安装教程
- 基于 Linux 集群环境上 GPFS 的问题诊断
- 谁是桌面王者?Win PK Linux三大镇山之宝