You Can't Unit Test C, Right?
Benno Rice
http://lca2018.linux.org.au/schedule/presentation/114/
Testing is a wonderful thing. Code with good tests is so much easier to work with and change due to the comfort the tests provide that you haven't broken anything you didn't expect to break.
C can be a tricky language to work in. It compiles to static code. It's incredibly low-level compared to many of the languages people use these days. It also comes with a delightfully bewildering and wide array of ways to very effectively shoot yourself in the foot. On top of that the POSIX API implementations C code often relies on don't lend themselves to easy testing, especially of unhappy paths. Which means that while we should absolutely be testing our C code it should be really hard to unit test, right?
Join me for a quick overview of the ways in which C can be unit tested, including ways to push around the POSIX APIs, and how you too can increase your C code's level of comfort.
This talk was given at Linux.conf.au 2018 (LCA2018) which was held on 22-26 January 2018 in Sydney Australia.
linux.conf.au is a conference about the Linux operating system, and all aspects of the thriving ecosystem of Free and Open Source Software that has grown up around it. Run since 1999, in a different Australian or New Zealand city each year, by a team of local volunteers, LCA invites more than 500 people to learn from the people who shape the future of Open Source. For more information on the conference see https://linux.conf.au/
#linux.conf.au #linux #foss #opensource
Видео You Can't Unit Test C, Right? канала LinuxConfAu 2018 - Sydney, Australia
http://lca2018.linux.org.au/schedule/presentation/114/
Testing is a wonderful thing. Code with good tests is so much easier to work with and change due to the comfort the tests provide that you haven't broken anything you didn't expect to break.
C can be a tricky language to work in. It compiles to static code. It's incredibly low-level compared to many of the languages people use these days. It also comes with a delightfully bewildering and wide array of ways to very effectively shoot yourself in the foot. On top of that the POSIX API implementations C code often relies on don't lend themselves to easy testing, especially of unhappy paths. Which means that while we should absolutely be testing our C code it should be really hard to unit test, right?
Join me for a quick overview of the ways in which C can be unit tested, including ways to push around the POSIX APIs, and how you too can increase your C code's level of comfort.
This talk was given at Linux.conf.au 2018 (LCA2018) which was held on 22-26 January 2018 in Sydney Australia.
linux.conf.au is a conference about the Linux operating system, and all aspects of the thriving ecosystem of Free and Open Source Software that has grown up around it. Run since 1999, in a different Australian or New Zealand city each year, by a team of local volunteers, LCA invites more than 500 people to learn from the people who shape the future of Open Source. For more information on the conference see https://linux.conf.au/
#linux.conf.au #linux #foss #opensource
Видео You Can't Unit Test C, Right? канала LinuxConfAu 2018 - Sydney, Australia
Показать
Комментарии отсутствуют
Информация о видео
23 января 2018 г. 14:04:24
00:23:09
Другие видео канала
Aussie Add-ons: Liberating Australian catch-up TV with Open Sourcemicro-Linux init (PID1) in GolangInkscape for absolute beginnersUnions: The way to hack society's operating systemHardware Miniconf Lightning TalksEmulating 1wire and creating new devices and driversMuon detector hardware for displaying the presence of cosmic raysClockwork Control of your 2 Wheel RobotThe Hackerspace Adelaide robotGetting conned into writing IoTuz/ESP32 drivers and example codeDesign of the LoliBot hardwareMicropython on the LoliBotKeynote: Open Source PharmaPlease Contain Me: Practical LXC on the DesktopGLAM Project WorkshopThe Web Is Dead! Long Live The Web!Don't Look Back in Anger: Wildman Whitehouse and the Great Failure of 1858Lightning talksMass Production: Open-source Testing in ManufacturingConference ClosingThe Serial Device Bus