I am trying to use GCOV to test a Device Driver eg: Ethernet Driver wrote in C language. This driver is in Userspace and has a lot of Kernelspace calls. Using a Linux Ubuntu machine Ubuntu 20.04.3 LTS (GNU/Linux 5.4.0-96-generic x86_64)
On compiling Driver code - Object file ( .o file is generated for each c file) and combined (.ko file). main() starts from startup code in my understanding. After loading the (*.ko ) file ethernet device needs to be tested functionally and a later coverage report shall be used.
I have a limited knowledge of Linux. Articles that I have come across are executing programs in Userspace only.
Question1:
I am not sure what are the steps to do so. Please suggest.
Appreciate your help in Advance.