~drizzle-trunk/drizzle/development

0.67.305 by Bernt M. Johnsen
Copyright headres and license added
1
# Copyright (C) 2008 Sun Microsystems, Inc. All rights reserved.  Use
2
# is subject to license terms.
3
#
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; version 2 of the License.
7
#
8
# This program is distributed in the hope that it will be useful, but
9
# WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
# General Public License for more details.
12
#
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
16
# USA
17
0.82.2 by Bernt M. Johnsen
New config
18
use GenTest::Constants;
19
use GenTest::Grammar;
20
0.82.3 by Bernt M. Johnsen
Fixed config template
21
# Configuration file template for  util/simplify-grammar_by_pattern.pl
0.67.121 by Bernt M. Johnsen
Matthias' grammar simplification improvements
22
#
23
# Please
24
# - copy this file to for example 1.cfg and
0.82.2 by Bernt M. Johnsen
New config
25
# - adjust the settings so that they fit to your usage case and
26
#   environment
0.67.121 by Bernt M. Johnsen
Matthias' grammar simplification improvements
27
#
0.82.3 by Bernt M. Johnsen
Fixed config template
28
29
{
30
31
# desired_status_codes
32
#---------------------
33
# List of expected status codes.
34
# Status codes are described in lib/GenTest/Constants.pm
35
# STATUS_ANY_ERROR means that any RQG error would cause the
36
# simplification to continue, e.g. both deadlocks and crashes will be
37
# considered together.
38
#
39
    desired_status_codes => [+STATUS_ANY_ERROR],
40
41
# expected_output
42
#----------------
43
# List of string patterns which all need to occur within the RQG output
44
# after a successful simplification. The search patterns are usually
45
# derived from a backtrace.
46
# Example 1:
47
#   Starting point is a crash of a server which was compiled with debug.
48
#    @expected_output =>
49
#    [
50
#      'mysql_execute_command .* at sql_parse.cc\:4441',
51
#      'mysql_parse .* at sql_parse.cc\:5991',
52
#      'dispatch_command .* at sql_parse.cc\:1074'
53
#    ];
54
#   Please be careful when using source file line numbers in search patterns
55
#   - They increase the selectivity of the search.
56
#   - There is a significant risk that the line numbers do no more fit
57
#     if the source code of the server gets changed.
58
# Example 2:
59
#   Starting point is a crash of a server which was compiled without debug.
0.82.2 by Bernt M. Johnsen
New config
60
#    expected_output => [
0.67.121 by Bernt M. Johnsen
Matthias' grammar simplification improvements
61
#       '0x0000000000413f61',
62
#       '0x00000000004429a0',
63
#       '0x0000000000453f0f'
0.82.2 by Bernt M. Johnsen
New config
64
#    ]
0.82.3 by Bernt M. Johnsen
Fixed config template
65
#    Just some adresses looks ugly but it works quite good.
66
# Example 3:
67
#   If just hunt for some status code ( -> desired_status_codes ) use
68
#    expected_output => [ ]
69
70
   expected_output => [
71
      'mysql_execute_command .* at sql_parse.cc',
72
      'mysql_parse .* at sql_parse.cc',
73
      'dispatch_command .* at sql_parse.cc'
74
   ],
75
76
# initial_grammar_file
77
#---------------------
78
# File which should be used as the base for the simplification process.
79
0.99.3 by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names.
80
   initial_grammar_file => 'conf/runtime/WL5004_sql.yy',
0.82.3 by Bernt M. Johnsen
Fixed config template
81
82
# rqg_options
83
#------------
84
# runall.pl (RQG) options which should be used
85
86
   rqg_options => {
87
      basedir  => '/work2/6.0/mysql-6.0-codebase-bugfixing1/',
88
      threads  => 30,
89
      queries  => 3000,
90
      duration => 60,
91
      mysqld => {
0.82.5 by Matthias Leich
Cleanup in grammar simplification
92
         'table-lock-wait-timeout'  => 1,
93
         'innodb-lock-wait-timeout' => 1,
94
         'log-output'               => 'file'
0.82.3 by Bernt M. Johnsen
Fixed config template
95
      },
0.82.5 by Matthias Leich
Cleanup in grammar simplification
96
      reporter => 'Deadlock,Backtrace,Shutdown',
0.99.3 by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names.
97
      gendata  => 'conf/runtime/WL5004_data.zz'
0.82.3 by Bernt M. Johnsen
Fixed config template
98
   },
99
100
101
# grammar_flags
102
#--------------
103
# Set "grammar_flags" to GRAMMAR_FLAG_COMPACT_RULES so that rules such
0.82.2 by Bernt M. Johnsen
New config
104
# as rule: a | a | a | a | a | a | b are compressed to rule: a | b
105
# before simplification. This will speed up the process as each
106
# instance of "a" will not be removed separately until they are all
107
# gone.
0.82.3 by Bernt M. Johnsen
Fixed config template
108
109
   grammar_flags => +GRAMMAR_FLAG_COMPACT_RULES,
110
111
# trials
112
#-------
113
# This is the number of times the oracle() will run the RQG in order to get to
114
# the desired status code and/or desired strings (expected_output).
115
# If the error is sporadic, several runs may be required to know if the bug
116
# is still present in the simplified grammar or not.
117
# The "seed" value gets incremented per trial.
118
0.67.392 by Philip Stoev
allow grammar simplification to work with mask and mask-level
119
    trials => 1,
0.82.3 by Bernt M. Johnsen
Fixed config template
120
121
# search_var_size
122
#----------------
123
# Number of bytes (counted from the end of the output file) to be used during
124
# search for expected_output We suck the last "search_var_size" Bytes of the file
125
# to be searched into a variable.
126
# A too huge "search_var_size" could cause problems.
0.67.121 by Bernt M. Johnsen
Matthias' grammar simplification improvements
127
# The relevant zone within the file is maybe
128
# - smaller
0.82.2 by Bernt M. Johnsen
New config
129
#   If our search pattern is unfortunately a bit unspecific and if it
130
#   could also occur within irrelevant zones of the file than we might
0.82.3 by Bernt M. Johnsen
Fixed config template
131
#   get false positives. Decreasing "search_var_size" might help.
0.67.121 by Bernt M. Johnsen
Matthias' grammar simplification improvements
132
# - bigger
0.82.3 by Bernt M. Johnsen
Fixed config template
133
#   We might get false negatives. Increasing "search_var_size" might
0.82.2 by Bernt M. Johnsen
New config
134
#   help but I am unsure if any OS and PERL implementation supports
0.82.3 by Bernt M. Johnsen
Fixed config template
135
#   such a monstrous variable.
136
137
    search_var_size => 1000000,
138
139
# initial_seed
140
#-------------
141
# Initial seed value to use. This increases the likelihood that the RQG run
142
# with the initial grammar reaches the desired result.
143
144
    initial_seed => 852,
145
146
# vardir_prefix
147
#---------------
148
# "Server activity" should happen in "vardir" which is a subdirecty of
149
# "vardir_prefix".
150
# Important points are:
151
# - free space within the filesystem
152
# - performance of the filesystem
153
# Simplification gets a significant speed up if we could use a memory
154
# based filesystem.
155
156
    vardir_prefix => '/dev/shm',
157
0.82.5 by Matthias Leich
Cleanup in grammar simplification
158
# storage_prefix
159
#---------------
160
# Grammars and logs of the simplification process get stored within a
161
# subdirectory of "storage_prefix".
0.82.3 by Bernt M. Johnsen
Fixed config template
162
0.82.5 by Matthias Leich
Cleanup in grammar simplification
163
    storage_prefix => './storage'
0.82.3 by Bernt M. Johnsen
Fixed config template
164
0.82.2 by Bernt M. Johnsen
New config
165
}