Enable initial set of Fedora CI tests
The goal of the Fedora CI is to run "basic functionality" and "integration" tests. Avocado's gdbtest.py does both, as it exercises the Avocado test and utils APIs, and also communicates with GDB, thus ensuring some integration validation with those packages. Reference: https://fedoraproject.org/wiki/CI Signed-off-by: Cleber Rosa <crosa@redhat.com>
This commit is contained in:
parent
84b857f387
commit
db1d9447e6
5 changed files with 488 additions and 1 deletions
47
tests/gdbtest.py.data/return99.c
Normal file
47
tests/gdbtest.py.data/return99.c
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void empty()
|
||||
{
|
||||
}
|
||||
|
||||
void write_stdout()
|
||||
{
|
||||
fprintf(stdout, "testing output to stdout\n");
|
||||
}
|
||||
|
||||
void write_stderr()
|
||||
{
|
||||
fprintf(stderr, "testing output to stderr\n");
|
||||
}
|
||||
|
||||
int forkme()
|
||||
{
|
||||
int pid;
|
||||
|
||||
pid = fork();
|
||||
if (pid != 0)
|
||||
pid = fork();
|
||||
if (pid != 0)
|
||||
pid = fork();
|
||||
|
||||
return pid;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int exit_status = 99;
|
||||
|
||||
if (argc > 1)
|
||||
exit_status = atoi(argv[1]);
|
||||
|
||||
empty();
|
||||
write_stdout();
|
||||
write_stderr();
|
||||
|
||||
if (forkme()) {
|
||||
fprintf(stdout, "return %i\n", exit_status);
|
||||
}
|
||||
|
||||
return exit_status;
|
||||
}
|
||||
9
tests/gdbtest.py.data/segfault.c
Normal file
9
tests/gdbtest.py.data/segfault.c
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
int *p = NULL;
|
||||
*p = 0xdead;
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue