~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.
0.67.547 by Matthias Leich
Minor corrections:
48
#    expected_output =>
0.82.3 by Bernt M. Johnsen
Fixed config template
49
#    [
0.67.547 by Matthias Leich
Minor corrections:
50
#      'assert.{0,150}safe_cond_timedwait.{0,150}thr_mutex\.c.{0,50}Item_func_sleep::val_int.{0,3000}SELECT 1,SLEEP\(10\)'
0.82.3 by Bernt M. Johnsen
Fixed config template
51
#    ];
0.67.547 by Matthias Leich
Minor corrections:
52
#   Please be careful when using source file line numbers or addresses
53
#   in search patterns
0.82.3 by Bernt M. Johnsen
Fixed config template
54
#   - They increase the selectivity of the search.
0.67.547 by Matthias Leich
Minor corrections:
55
#   - There is a significant risk that they do no more fit if the source
56
#     code of the server gets changed.
0.82.3 by Bernt M. Johnsen
Fixed config template
57
# Example 2:
58
#   Starting point is a crash of a server which was compiled without debug.
0.82.2 by Bernt M. Johnsen
New config
59
#    expected_output => [
0.67.121 by Bernt M. Johnsen
Matthias' grammar simplification improvements
60
#       '0x0000000000413f61',
61
#       '0x00000000004429a0',
62
#       '0x0000000000453f0f'
0.82.2 by Bernt M. Johnsen
New config
63
#    ]
0.82.3 by Bernt M. Johnsen
Fixed config template
64
#    Just some adresses looks ugly but it works quite good.
65
# Example 3:
66
#   If just hunt for some status code ( -> desired_status_codes ) use
0.67.547 by Matthias Leich
Minor corrections:
67
#    expected_output => [ '' ]
68
#
0.82.3 by Bernt M. Johnsen
Fixed config template
69
70
   expected_output => [
0.67.547 by Matthias Leich
Minor corrections:
71
      ''
0.82.3 by Bernt M. Johnsen
Fixed config template
72
   ],
73
74
# initial_grammar_file
75
#---------------------
76
# File which should be used as the base for the simplification process.
77
0.99.3 by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names.
78
   initial_grammar_file => 'conf/runtime/WL5004_sql.yy',
0.82.3 by Bernt M. Johnsen
Fixed config template
79
80
# rqg_options
81
#------------
82
# runall.pl (RQG) options which should be used
83
84
   rqg_options => {
85
      basedir  => '/work2/6.0/mysql-6.0-codebase-bugfixing1/',
86
      threads  => 30,
87
      queries  => 3000,
88
      duration => 60,
89
      mysqld => {
0.67.547 by Matthias Leich
Minor corrections:
90
         'lock-wait-timeout'  => 1,
0.82.5 by Matthias Leich
Cleanup in grammar simplification
91
         'innodb-lock-wait-timeout' => 1,
92
         'log-output'               => 'file'
0.82.3 by Bernt M. Johnsen
Fixed config template
93
      },
0.82.5 by Matthias Leich
Cleanup in grammar simplification
94
      reporter => 'Deadlock,Backtrace,Shutdown',
0.67.547 by Matthias Leich
Minor corrections:
95
      redefine  => 'conf/runtime/WL5004_sql_redefine.yy',
0.99.3 by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names.
96
      gendata  => 'conf/runtime/WL5004_data.zz'
0.82.3 by Bernt M. Johnsen
Fixed config template
97
   },
98
99
# grammar_flags
100
#--------------
101
# Set "grammar_flags" to GRAMMAR_FLAG_COMPACT_RULES so that rules such
0.82.2 by Bernt M. Johnsen
New config
102
# as rule: a | a | a | a | a | a | b are compressed to rule: a | b
103
# before simplification. This will speed up the process as each
104
# instance of "a" will not be removed separately until they are all
105
# gone.
0.82.3 by Bernt M. Johnsen
Fixed config template
106
107
   grammar_flags => +GRAMMAR_FLAG_COMPACT_RULES,
108
109
# trials
110
#-------
111
# This is the number of times the oracle() will run the RQG in order to get to
112
# the desired status code and/or desired strings (expected_output).
113
# If the error is sporadic, several runs may be required to know if the bug
114
# is still present in the simplified grammar or not.
115
# The "seed" value gets incremented per trial.
116
0.67.392 by Philip Stoev
allow grammar simplification to work with mask and mask-level
117
    trials => 1,
0.82.3 by Bernt M. Johnsen
Fixed config template
118
119
# search_var_size
120
#----------------
121
# Number of bytes (counted from the end of the output file) to be used during
122
# search for expected_output We suck the last "search_var_size" Bytes of the file
123
# to be searched into a variable.
124
# A too huge "search_var_size" could cause problems.
0.67.121 by Bernt M. Johnsen
Matthias' grammar simplification improvements
125
# The relevant zone within the file is maybe
126
# - smaller
0.82.2 by Bernt M. Johnsen
New config
127
#   If our search pattern is unfortunately a bit unspecific and if it
128
#   could also occur within irrelevant zones of the file than we might
0.82.3 by Bernt M. Johnsen
Fixed config template
129
#   get false positives. Decreasing "search_var_size" might help.
0.67.121 by Bernt M. Johnsen
Matthias' grammar simplification improvements
130
# - bigger
0.82.3 by Bernt M. Johnsen
Fixed config template
131
#   We might get false negatives. Increasing "search_var_size" might
0.82.2 by Bernt M. Johnsen
New config
132
#   help but I am unsure if any OS and PERL implementation supports
0.82.3 by Bernt M. Johnsen
Fixed config template
133
#   such a monstrous variable.
134
0.67.547 by Matthias Leich
Minor corrections:
135
    search_var_size => 3000000,
0.82.3 by Bernt M. Johnsen
Fixed config template
136
137
# initial_seed
138
#-------------
139
# Initial seed value to use. This increases the likelihood that the RQG run
140
# with the initial grammar reaches the desired result.
141
142
    initial_seed => 852,
143
144
# vardir_prefix
145
#---------------
146
# "Server activity" should happen in "vardir" which is a subdirecty of
147
# "vardir_prefix".
148
# Important points are:
149
# - free space within the filesystem
150
# - performance of the filesystem
151
# Simplification gets a significant speed up if we could use a memory
152
# based filesystem.
153
154
    vardir_prefix => '/dev/shm',
155
0.82.5 by Matthias Leich
Cleanup in grammar simplification
156
# storage_prefix
157
#---------------
158
# Grammars and logs of the simplification process get stored within a
159
# subdirectory of "storage_prefix".
0.82.3 by Bernt M. Johnsen
Fixed config template
160
0.82.5 by Matthias Leich
Cleanup in grammar simplification
161
    storage_prefix => './storage'
0.82.3 by Bernt M. Johnsen
Fixed config template
162
0.82.2 by Bernt M. Johnsen
New config
163
}