~ubuntu-branches/ubuntu/saucy/drizzle/saucy-proposed

« back to all changes in this revision

Viewing changes to tests/randgen/simplify-grammar_template.cfg

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-06-19 10:46:49 UTC
  • mfrom: (1.1.6)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20120619104649-e2l0ggd4oz3um0f4
Tags: upstream-7.1.36-stable
ImportĀ upstreamĀ versionĀ 7.1.36-stable

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
18
use GenTest::Constants;
 
19
use GenTest::Grammar;
 
20
 
 
21
# Configuration file template for  util/simplify-grammar_by_pattern.pl
 
22
#
 
23
# Please
 
24
# - copy this file to for example 1.cfg and
 
25
# - adjust the settings so that they fit to your usage case and
 
26
#   environment
 
27
#
 
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
#      'assert.{0,150}safe_cond_timedwait.{0,150}thr_mutex\.c.{0,50}Item_func_sleep::val_int.{0,3000}SELECT 1,SLEEP\(10\)'
 
51
#    ];
 
52
#   Please be careful when using source file line numbers or addresses
 
53
#   in search patterns
 
54
#   - They increase the selectivity of the search.
 
55
#   - There is a significant risk that they do no more fit if the source
 
56
#     code of the server gets changed.
 
57
# Example 2:
 
58
#   Starting point is a crash of a server which was compiled without debug.
 
59
#    expected_output => [
 
60
#       '0x0000000000413f61',
 
61
#       '0x00000000004429a0',
 
62
#       '0x0000000000453f0f'
 
63
#    ]
 
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
 
67
#    expected_output => [ '' ]
 
68
#
 
69
 
 
70
   expected_output => [
 
71
      ''
 
72
   ],
 
73
 
 
74
# initial_grammar_file
 
75
#---------------------
 
76
# File which should be used as the base for the simplification process.
 
77
 
 
78
   initial_grammar_file => 'conf/runtime/WL5004_sql.yy',
 
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 => {
 
90
         'lock-wait-timeout'  => 1,
 
91
         'innodb-lock-wait-timeout' => 1,
 
92
         'log-output'               => 'file'
 
93
      },
 
94
      reporter => 'Deadlock,Backtrace,Shutdown',
 
95
      redefine  => 'conf/runtime/WL5004_sql_redefine.yy',
 
96
      gendata  => 'conf/runtime/WL5004_data.zz'
 
97
   },
 
98
 
 
99
# grammar_flags
 
100
#--------------
 
101
# Set "grammar_flags" to GRAMMAR_FLAG_COMPACT_RULES so that rules such
 
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.
 
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
 
 
117
    trials => 1,
 
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.
 
125
# The relevant zone within the file is maybe
 
126
# - smaller
 
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
 
129
#   get false positives. Decreasing "search_var_size" might help.
 
130
# - bigger
 
131
#   We might get false negatives. Increasing "search_var_size" might
 
132
#   help but I am unsure if any OS and PERL implementation supports
 
133
#   such a monstrous variable.
 
134
 
 
135
    search_var_size => 3000000,
 
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
 
 
156
# storage_prefix
 
157
#---------------
 
158
# Grammars and logs of the simplification process get stored within a
 
159
# subdirectory of "storage_prefix".
 
160
 
 
161
    storage_prefix => './storage'
 
162
 
 
163
}