~ubuntu-branches/ubuntu/quantal/linux-lowlatency/quantal-proposed

« back to all changes in this revision

Viewing changes to debian/scripts/config-check

  • Committer: Package Import Robot
  • Author(s): Andy Whitcroft, Andy Whitcroft, Ubuntu: 3.5.0-3.3
  • Date: 2012-07-03 09:23:14 UTC
  • Revision ID: package-import@ubuntu.com-20120703092314-wjaqz3coxptokmtl
Tags: 3.5.0-3.3
[ Andy Whitcroft ]

* [Config] drop -pae from d-i configuration.
* rebase to Ubuntu-3.5.0-3.3

[ Ubuntu: 3.5.0-3.3 ]

* [Config] enable CONFIG_MEMTEST=y
  - LP: #1004535
* [Config] config-check: add support for a cut operation
* [Config] enforcer -- switch to cut where appropriate
* Rebase to v3.5-rc5
* [Config] Updateconfigs after rebase to v3.5-rc5
* SAUCE: ocfs2: Fix NULL pointer dereferrence in
  __ocfs2_change_file_space
  - LP: #1006012
* SAUCE: (drop after 3.5) drm/i915: ignore pipe select bit when checking
  for LVDS register initialization
  - LP: #1012800
* rebase to v3.5-rc5
  - LP: #1013183
  - LP: #1017017
  - LP: #884652

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
sub pred_exec {
95
95
        my ($rest) = @_;
96
96
        my $pred;
 
97
        my $cut = 0;
97
98
        my $res;
98
99
        my $sep;
99
100
 
104
105
        # Leading ! implies inversion.
105
106
        if ($pred =~ /^\s*!\s*(.*)$/) {
106
107
                #print " invert<$1>\n";
107
 
                $res = !pred_exec($1);
 
108
                ($cut, $res) = pred_exec($1);
 
109
                $res = !$res;
 
110
 
 
111
        # Leading / implies a CUT operation.
 
112
        } elsif ($pred =~ /^\s*\/\s*(.*)$/) {
 
113
                #print " cut<$1>\n";
 
114
                ($cut, $res) = pred_exec($1);
 
115
                $cut = 1;
108
116
 
109
117
        # Recurse left for complex expressions.
110
118
        } elsif ($pred =~ /^\s*\((.*)\)\s*$/) {
111
119
                #print " left<$1>\n";
112
 
                $res = pred_exec($1);
 
120
                ($cut, $res) = pred_exec($1);
113
121
 
114
122
        # Check for common syntax issues.
115
123
        } elsif ($pred eq '') {
135
143
                if ($rest =~ /^\s*($|\||\&)/) {
136
144
                        die "$P: $pred$rest: malformed binary operator\n";
137
145
                }
138
 
                if (($res && $sep eq '&') || (!$res && $sep eq '|')) {
 
146
                if ($cut == 0 && (($res && $sep eq '&') || (!$res && $sep eq '|'))) {
139
147
                        #print " right<$rest>\n";
140
 
                        $res = pred_exec($rest);
 
148
                        ($cut, $res) = pred_exec($rest);
141
149
                }
142
150
 
143
151
        } else {
144
152
                die "$P: $pred$rest: malformed predicate\n";
145
153
        }
146
 
        #print " return res<$res> sep<$sep>\n";
147
 
        return $res;
 
154
        #warn " return cut<$cut> res<$res> sep<$sep>\n";
 
155
        return ($cut, $res);
148
156
}
149
157
 
150
158
#
154
162
my $test_good = 0;
155
163
sub pred_test {
156
164
        my ($pred, $eres, $eerr) = @_;
157
 
        my ($res, $err, $fail);
 
165
        my ($cut, $res, $err, $fail);
158
166
 
159
167
        $test_total++;
160
168
        if ($test != 0 && $test != $test_total - 1) {
162
170
        }
163
171
 
164
172
        eval {
165
 
                $res = pred_exec($pred);
 
173
                ($cut, $res) = pred_exec($pred);
166
174
        };
167
175
        $err = $@;
168
176
        chomp($err);
345
353
        pred_test('exists ENABLED & exists ENABLED | exists MISSING', 1, undef);
346
354
        pred_test('exists ENABLED & exists ENABLED | exists ENABLED', 1, undef);
347
355
 
 
356
        print "TEST: $test_total: cut tests ...\n";
 
357
        pred_test('(arch MYARCH & exists MISSING) | exists ENABLED', 1, undef);
 
358
        pred_test('(arch MYARCH &/ exists MISSING) | exists ENABLED', 0, undef);
 
359
 
348
360
        $test_total--;
349
361
        print "TEST: $test_good/$test_total succeeded\n";
350
362
 
385
397
 
386
398
        #print "CHECK: <$line>\n";
387
399
        $total++;
388
 
        my $result = pred_exec($line);
 
400
        my (undef, $result) = pred_exec($line);
389
401
        if (!$result) {
390
402
                print "$P: FAIL: $line\n";
391
403
                $exit_val = $fail_exit;