GSoC: Questions about test
Dmitry V. Levin
ldv at altlinux.org
Sat Mar 12 22:28:43 UTC 2022
On Sun, Mar 13, 2022 at 01:16:51AM +0800, As Ss wrote:
> I noticed some files have little code coverage and I tried to add
> tests for them. But some of them are not system call function like
> upeek in src/upeek.c. Is there any way to make the test cover these
> functions such as upeek and mmap_cache_enable?
Some code is used only on some architectures, e.g. upeek.c provides upeek
function that's used only on alpha, bfin, microblaze, and xtensa
architectures. On other architectures upeek function is not linked into
Some tests require operating system support.
When operating system doesn't provide it, these tests are skipped.
For example, ioctl_kvm_run tests trigger mmap_cache.c code, but
if the kernel doesn't provide kvm support, all ioctl_kvm_run tests
are skipped, and the code seems to be not covered.
> And I find that sysctl is not yet covered. From the man page, sysctl
> was removed in linux 5.5. Is it worthwhile to add a test for it?
No, I wouldn't bother with testing sysctl decoder.
In fact, I'd rather remove the sysctl decoder some day.
More information about the Strace-devel