[ltt-dev] Test traces for LTTng
Matthew Khouzam
matthew.khouzam at ericsson.com
Tue Dec 21 16:37:46 EST 2010
Hello world,
I am working in some test cases for LTTng/TMF and have several ideas, I
would like to collect some comments from the real world before delving
any further. The code I write in this will be released on the list of
course.
Real world test cases.
The reference trace should have something that creates threads, has
thread exits and renames (can't fiind the posix command for that one yet)
File access is a must.
So is a stream to a device, I will probably make an audio/network stream.
Mallocs/frees
Synthetic tests:
The thread must reach each of these states at least once.
Dead ( after a zombie?)
User Mode (?)
Syscall (printf?)
IRQ (?)
Trap (?)
Wait (Sleep/Wait for mutex?)
Unnamed (Spawn don't name yet?)
Wait fork (Spawn, is there a way to delay this?)
Wait Cpu (?)
Exit (Join?)
Zombie... grrrr... argh...
<Code>
#include<sys/wait.h>
#include<stdlib.h>
#include<unistd.h>
int main(void)
{
pid_t pids[10];
int i;
for (i= 9; i>= 0; --i) {
pids[i] = fork();
if (pids[i] == 0) {
sleep(i+1);
_exit(0);
}
}
for (i= 9; i>= 0; --i)
waitpid(pids[i], NULL, 0);
return 0;
}
</Code>
Soft IRQ (?)
Finally, the test should be as small as possible, preferably under 50k
events on a single core system.
Any suggestions on how to reach all of these states?
Thank you,
Matthew
More information about the lttng-dev
mailing list