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

查看:240
本文介绍了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天全站免登陆