diff options
author | Safey A.Halim <safey.allah@gmail.com> | 2010-08-31 13:54:32 +0000 |
---|---|---|
committer | Safey A.Halim <safey.allah@gmail.com> | 2010-08-31 13:54:32 +0000 |
commit | 630cb3becfc26fa786ac9567305a928771225445 (patch) | |
tree | 4e475bd23398743fb54a40a4f2816f8973c30ddc /src/monkey/test_gnunet_monkey.c | |
parent | 40d0c1ce4ca68910f4bdb9666cd5bc651d160a0c (diff) | |
download | gnunet-630cb3becfc26fa786ac9567305a928771225445.tar.gz gnunet-630cb3becfc26fa786ac9567305a928771225445.zip |
Monkey sends e-mails reporting bugs detected using gdbmi
C.jj grammar for C
Diffstat (limited to 'src/monkey/test_gnunet_monkey.c')
-rw-r--r-- | src/monkey/test_gnunet_monkey.c | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/src/monkey/test_gnunet_monkey.c b/src/monkey/test_gnunet_monkey.c new file mode 100644 index 000000000..9fa56f508 --- /dev/null +++ b/src/monkey/test_gnunet_monkey.c | |||
@@ -0,0 +1,67 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet. | ||
3 | (C) 2009 Christian Grothoff (and other contributing authors) | ||
4 | |||
5 | GNUnet is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published | ||
7 | by the Free Software Foundation; either version 3, or (at your | ||
8 | option) any later version. | ||
9 | |||
10 | GNUnet is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with GNUnet; see the file COPYING. If not, write to the | ||
17 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
18 | Boston, MA 02111-1307, USA. | ||
19 | */ | ||
20 | |||
21 | /** | ||
22 | * @file monkey/test_gnunet_monkey.c | ||
23 | * @brief Testcase for Monkey | ||
24 | * @author Safey Abdel Halim | ||
25 | */ | ||
26 | |||
27 | /** | ||
28 | * Test case for Monkey Automatic Debugger. | ||
29 | * It launches Monkey to run binaries having | ||
30 | * known bugs (e.g. Null Pointer Exception) | ||
31 | * Monkey should be able to detect the problem and send an e-mail | ||
32 | * containing the problem description. | ||
33 | */ | ||
34 | |||
35 | |||
36 | #include "platform.h" | ||
37 | #include "gnunet_common.h" | ||
38 | #include "gnunet_util_lib.h" | ||
39 | #include "gnunet_program_lib.h" | ||
40 | |||
41 | |||
42 | static int | ||
43 | check () | ||
44 | { | ||
45 | GNUNET_OS_start_process (NULL, NULL, "gnunet-monkey", | ||
46 | "gnunet-monkey", | ||
47 | "./bug_null_pointer_exception", NULL); | ||
48 | return 0; | ||
49 | } | ||
50 | |||
51 | |||
52 | int | ||
53 | main (int argc, char *argv[]) | ||
54 | { | ||
55 | int ret; | ||
56 | |||
57 | GNUNET_log_setup ("test-gnunet-monkey", | ||
58 | #if VERBOSE | ||
59 | "DEBUG", | ||
60 | #else | ||
61 | "WARNING", | ||
62 | #endif | ||
63 | NULL); | ||
64 | ret = check (); | ||
65 | return ret; | ||
66 | } | ||
67 | /* end of test_gnunet_monkey.c */ \ No newline at end of file | ||