如何测试 Linux 内核? [英] How is the Linux kernel tested ?

查看:24
本文介绍了如何测试 Linux 内核?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Linux 内核开发人员如何在本地和提交代码后测试他们的代码?他们是否使用某种单元测试,构建自动化?测试计划?

How do the Linux kernel developers test their code locally and after they have it committed? Do they use some kind of unit testing, build automation? test plans?

推荐答案

Linux 内核非常重视社区测试.

The linux kernel has a heavy emphasis on community testing.

通常,任何开发人员都会在提交之前测试他们自己的代码,而且他们经常会使用来自 Linus 的内核的开发版本,或者其他不稳定/开发树之一用于与其工作相关的项目.这意味着他们经常同时测试他们的更改和其他人的更改.

Typically any developer will test their own code before submitting, and quite often they will be using a development version of the kernel from Linus, or one of the other unstable/development trees for a project relevant to their work. This means they are often testing both their changes and other people's changes.

正式测试计划的方式往往不多,但在功能合并到上游树之前可能需要额外的测试.

There tend not to be much in the way of formal test plans, but extra testing may be asked for before features are merged into upstream trees.

正如 Dean 指出的那样,还有一些自动化测试,linux 测试项目内核自动测试 (很好的概述).

As Dean pointed out, there's also some automated testing, the linux test project and the kernel autotest (good overview).

开发人员通常还会编写自动化测试来测试他们的更改,但我不确定是否有(经常使用的)机制来集中收集这些临时测试.

Developers will often also write automated tests targetted to test their change, but I'm not sure there's a (often used) mechanism to centrally collect these adhoc tests.

这在很大程度上取决于正在更改内核的哪个区域 - 您对新网络驱动程序进行的测试与替换核心调度算法时所做的测试完全不同.

It depends a lot on which area of the kernel is being changed of course - the testing you'd do for a new network driver is quite different to the testing you'd do when replacing the core scheduling algorithm.

这篇关于如何测试 Linux 内核?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆