]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/udev-test.pl
[PATCH] "symlink only" test
[thirdparty/systemd.git] / test / udev-test.pl
CommitLineData
a367f04e
GKH
1#!/usr/bin/perl
2
3# udev-test
4#
5# Provides automated testing of the udev binary.
6# The whole test is self contained in this file, except the matching sysfs tree.
7# Simply extend the @tests array, to add a new test variant.
8#
9# Every test is driven by its own temporary config file.
10# This program prepares the environment, creates the config and calls udev.
11#
12# udev reads the config, looks at the provided sysfs and
13# first creates and then removes the device node.
14# After creation and removal the result is checked against the
15# expected value and the result is printed.
16#
17# happy testing,
18# Kay Sievers <kay.sievers@vrfy.org>, 2003
19
20
21use warnings;
22use strict;
23
f8f00338 24my $PWD = $ENV{PWD};
a367f04e
GKH
25my $sysfs = "sys/";
26my $udev_bin = "../udev";
27my $udev_root = "udev-root/"; # !!! directory will be removed !!!
36043f84 28my $udev_db = ".udev.tdb";
a367f04e 29my $perm = "udev.permissions";
72ffa78d
GKH
30my $main_conf = "udev-test.conf";
31my $conf_tmp = "udev-test.rules";
a367f04e
GKH
32
33
34my @tests = (
35 {
36 desc => "label test of scsi disc",
37 subsys => "block",
38 devpath => "block/sda",
39 expected => "boot_disk" ,
40 conf => <<EOF
16378373 41BUS="scsi", SYSFS{vendor}="IBM-ESXS", NAME="boot_disk%n"
ac28b86d 42KERNEL="ttyUSB0", NAME="visor"
a367f04e
GKH
43EOF
44 },
45 {
46 desc => "label test of scsi partition",
47 subsys => "block",
48 devpath => "block/sda/sda1",
49 expected => "boot_disk1" ,
50 conf => <<EOF
16378373 51BUS="scsi", SYSFS{vendor}="IBM-ESXS", NAME="boot_disk%n"
83be97ba
KS
52EOF
53 },
54 {
55 desc => "label test of pattern match",
56 subsys => "block",
57 devpath => "block/sda/sda1",
58 expected => "boot_disk1" ,
59 conf => <<EOF
16378373
KS
60BUS="scsi", SYSFS{vendor}="?IBM-ESXS", NAME="boot_disk%n-1"
61BUS="scsi", SYSFS{vendor}="IBM-ESXS?", NAME="boot_disk%n-2"
62BUS="scsi", SYSFS{vendor}="IBM-ES??", NAME="boot_disk%n"
63BUS="scsi", SYSFS{vendor}="IBM-ESXSS", NAME="boot_disk%n-3"
358c8c20
GKH
64EOF
65 },
66 {
67 desc => "label test of multiple sysfs files",
68 subsys => "block",
69 devpath => "block/sda/sda1",
70 expected => "boot_disk1" ,
71 conf => <<EOF
16378373
KS
72BUS="scsi", SYSFS{vendor}="IBM-ESXS", SYSFS{model}="ST336605LW !#", NAME="boot_diskX%n"
73BUS="scsi", SYSFS{vendor}="IBM-ESXS", SYSFS{model}="ST336605LW !#", NAME="boot_disk%n"
358c8c20
GKH
74EOF
75 },
76 {
77 desc => "label test of max sysfs files",
78 subsys => "block",
79 devpath => "block/sda/sda1",
80 expected => "boot_disk1" ,
81 conf => <<EOF
16378373
KS
82BUS="scsi", SYSFS{vendor}="IBM-ESXS", SYSFS{model}="ST336605LW !#", SYSFS{scsi_level}="4", SYSFS{rev}="B245", SYSFS{type}="2", SYSFS{queue_depth}="32", NAME="boot_diskXX%n"
83BUS="scsi", SYSFS{vendor}="IBM-ESXS", SYSFS{model}="ST336605LW !#", SYSFS{scsi_level}="4", SYSFS{rev}="B245", SYSFS{type}="0", NAME="boot_disk%n"
0db6d4cc
KS
84EOF
85 },
86 {
9f1da361 87 desc => "catch device by *",
0db6d4cc
KS
88 subsys => "tty",
89 devpath => "class/tty/ttyUSB0",
90 expected => "visor/0" ,
91 conf => <<EOF
ac28b86d 92KERNEL="ttyUSB*", NAME="visor/%n"
2e317184
GKH
93EOF
94 },
95 {
96 desc => "catch device by * - take 2",
97 subsys => "tty",
98 devpath => "class/tty/ttyUSB0",
99 expected => "visor/0" ,
100 conf => <<EOF
101KERNEL="*USB1", NAME="bad"
102KERNEL="*USB0", NAME="visor/%n"
9f1da361
KS
103EOF
104 },
105 {
106 desc => "catch device by ?",
107 subsys => "tty",
108 devpath => "class/tty/ttyUSB0",
109 expected => "visor/0" ,
110 conf => <<EOF
ac28b86d
KS
111KERNEL="ttyUSB??*", NAME="visor/%n-1"
112KERNEL="ttyUSB??", NAME="visor/%n-2"
113KERNEL="ttyUSB?", NAME="visor/%n"
9f1da361
KS
114EOF
115 },
116 {
117 desc => "catch device by character class",
118 subsys => "tty",
119 devpath => "class/tty/ttyUSB0",
120 expected => "visor/0" ,
121 conf => <<EOF
ac28b86d
KS
122KERNEL="ttyUSB[A-Z]*", NAME="visor/%n-1"
123KERNEL="ttyUSB?[0-9]", NAME="visor/%n-2"
124KERNEL="ttyUSB[0-9]*", NAME="visor/%n"
a367f04e
GKH
125EOF
126 },
127 {
128 desc => "replace kernel name",
129 subsys => "tty",
130 devpath => "class/tty/ttyUSB0",
131 expected => "visor" ,
132 conf => <<EOF
ac28b86d 133KERNEL="ttyUSB0", NAME="visor"
281ff00a
GKH
134EOF
135 },
136 {
137 desc => "Handle comment lines in config file (and replace kernel name)",
138 subsys => "tty",
139 devpath => "class/tty/ttyUSB0",
140 expected => "visor" ,
141 conf => <<EOF
142# this is a comment
ac28b86d 143KERNEL="ttyUSB0", NAME="visor"
281ff00a
GKH
144
145EOF
146 },
147 {
148 desc => "Handle comment lines in config file with whitespace (and replace kernel name)",
149 subsys => "tty",
150 devpath => "class/tty/ttyUSB0",
151 expected => "visor" ,
152 conf => <<EOF
153 # this is a comment with whitespace before the comment
ac28b86d 154KERNEL="ttyUSB0", NAME="visor"
281ff00a
GKH
155
156EOF
157 },
158 {
159 desc => "Handle empty lines in config file (and replace kernel name)",
160 subsys => "tty",
161 devpath => "class/tty/ttyUSB0",
162 expected => "visor" ,
163 conf => <<EOF
164
ac28b86d 165KERNEL="ttyUSB0", NAME="visor"
281ff00a 166
5499d319
KS
167EOF
168 },
169 {
170 desc => "subdirectory handling",
171 subsys => "tty",
172 devpath => "class/tty/ttyUSB0",
173 expected => "sub/direct/ory/visor" ,
174 conf => <<EOF
ac28b86d 175KERNEL="ttyUSB0", NAME="sub/direct/ory/visor"
a367f04e
GKH
176EOF
177 },
178 {
179 desc => "place on bus of scsi partition",
180 subsys => "block",
181 devpath => "block/sda/sda3",
182 expected => "first_disk3" ,
183 conf => <<EOF
ac28b86d 184BUS="scsi", PLACE="0:0:0:0", NAME="first_disk%n"
a367f04e
GKH
185EOF
186 },
187 {
188 desc => "test NAME substitution chars",
189 subsys => "block",
190 devpath => "block/sda/sda3",
191 expected => "Major:8:minor:3:kernelnumber:3:bus:0:0:0:0" ,
192 conf => <<EOF
ac28b86d 193BUS="scsi", PLACE="0:0:0:0", NAME="Major:%M:minor:%m:kernelnumber:%n:bus:%b"
63ead27c
KS
194EOF
195 },
196 {
197 desc => "test NAME substitution chars (with length limit)",
198 subsys => "block",
199 devpath => "block/sda/sda3",
200 expected => "M8-m3-n3-b0:0-sIBM" ,
201 conf => <<EOF
202BUS="scsi", PLACE="0:0:0:0", NAME="M%M-m%m-n%n-b%3b-s%3s{vendor}"
59525115
GKH
203EOF
204 },
205 {
206 desc => "old style SYSFS_ attribute",
207 subsys => "block",
208 devpath => "block/sda",
209 expected => "good" ,
210 conf => <<EOF
211BUS="scsi", SYSFS_vendor="IBM-ESXS", NAME="good"
a27cd06c
KS
212EOF
213 },
214 {
215 desc => "sustitution of sysfs value (%s{file})",
216 subsys => "block",
217 devpath => "block/sda",
218 expected => "disk-IBM-ESXS-sda" ,
219 conf => <<EOF
16378373 220BUS="scsi", SYSFS{vendor}="IBM-ESXS", NAME="disk-%s{vendor}-%k"
a27cd06c 221KERNEL="ttyUSB0", NAME="visor"
a367f04e
GKH
222EOF
223 },
224 {
ac28b86d 225 desc => "program result substitution",
a367f04e
GKH
226 subsys => "block",
227 devpath => "block/sda/sda3",
228 expected => "special-device-3" ,
229 conf => <<EOF
ac28b86d
KS
230BUS="scsi", PROGRAM="/bin/echo -n special-device", RESULT="-special-*", NAME="%c-1-%n"
231BUS="scsi", PROGRAM="/bin/echo -n special-device", RESULT="special--*", NAME="%c-2-%n"
232BUS="scsi", PROGRAM="/bin/echo -n special-device", RESULT="special-device-", NAME="%c-3-%n"
233BUS="scsi", PROGRAM="/bin/echo -n special-device", RESULT="special-devic", NAME="%c-4-%n"
234BUS="scsi", PROGRAM="/bin/echo -n special-device", RESULT="special-*", NAME="%c-%n"
f3b04a2e
GKH
235EOF
236 },
237 {
ac28b86d 238 desc => "program result substitution",
f3b04a2e
GKH
239 subsys => "block",
240 devpath => "block/sda/sda3",
241 expected => "test-0:0:0:0" ,
242 conf => <<EOF
ac28b86d 243BUS="scsi", PROGRAM="/bin/echo -n test-%b", RESULT="test-0:0*", NAME="%c"
8ffb636f
KS
244EOF
245 },
246 {
247 desc => "program with escaped format char (tricky: callout returns format char!)",
248 subsys => "block",
249 devpath => "block/sda/sda3",
250 expected => "escape-3" ,
251 conf => <<EOF
252BUS="scsi", PROGRAM="/bin/echo -n escape-%%n", KERNEL="sda3", NAME="%c"
dde05ccb
GKH
253EOF
254 },
255 {
256 desc => "program with lots of arguments",
257 subsys => "block",
258 devpath => "block/sda/sda3",
259 expected => "foo9" ,
260 conf => <<EOF
261BUS="scsi", PROGRAM="/bin/echo -n foo3 foo4 foo5 foo6 foo7 foo8 foo9", KERNEL="sda3", NAME="%c{7}"
35b38379
KS
262EOF
263 },
264 {
265 desc => "program with subshell",
266 subsys => "block",
267 devpath => "block/sda/sda3",
268 expected => "bar9" ,
269 conf => <<EOF
270BUS="scsi", PROGRAM="/bin/sh -c 'echo foo3 foo4 foo5 foo6 foo7 foo8 foo9 | sed s/foo9/bar9/'", KERNEL="sda3", NAME="%c{7}"
271EOF
272 },
273 {
274 desc => "program arguments combined with apostrophes",
275 subsys => "block",
276 devpath => "block/sda/sda3",
277 expected => "foo7" ,
278 conf => <<EOF
279BUS="scsi", PROGRAM="/bin/echo -n 'foo3 foo4' 'foo5 foo6 foo7 foo8'", KERNEL="sda3", NAME="%c{5}"
56c963dc
PM
280EOF
281 },
282 {
283 desc => "characters before the %c{N} substitution",
284 subsys => "block",
285 devpath => "block/sda/sda3",
286 expected => "my-foo9" ,
287 conf => <<EOF
288BUS="scsi", PROGRAM="/bin/echo -n foo3 foo4 foo5 foo6 foo7 foo8 foo9", KERNEL="sda3", NAME="my-%c{7}"
289EOF
290 },
291 {
292 desc => "substitute the second to last argument",
293 subsys => "block",
294 devpath => "block/sda/sda3",
295 expected => "my-foo8" ,
296 conf => <<EOF
297BUS="scsi", PROGRAM="/bin/echo -n foo3 foo4 foo5 foo6 foo7 foo8 foo9", KERNEL="sda3", NAME="my-%c{6}"
b1c5e333
KS
298EOF
299 },
300 {
ac28b86d 301 desc => "program result substitution (numbered part of)",
b1c5e333
KS
302 subsys => "block",
303 devpath => "block/sda/sda3",
304 expected => "link1" ,
305 conf => <<EOF
88f09368 306BUS="scsi", PROGRAM="/bin/echo -n node link1 link2", RESULT="node *", NAME="%c{1}", SYMLINK="%c{2} %c{3}"
558f80ba
KS
307EOF
308 },
309 {
310 desc => "program result substitution (numbered part of+)",
311 subsys => "block",
312 devpath => "block/sda/sda3",
313 expected => "link3" ,
314 conf => <<EOF
315BUS="scsi", PROGRAM="/bin/echo -n node link1 link2 link3 link4", RESULT="node *", NAME="%c{1}", SYMLINK="%c{2+}"
8ff8bbba
GKH
316EOF
317 },
318 {
ac28b86d 319 desc => "invalid program for device with no bus",
8ff8bbba
GKH
320 subsys => "tty",
321 devpath => "class/tty/console",
322 expected => "TTY" ,
323 conf => <<EOF
ac28b86d
KS
324BUS="scsi", PROGRAM="/bin/echo -n foo", RESULT="foo", NAME="foo"
325KERNEL="console", NAME="TTY"
1d936fbc
GKH
326EOF
327 },
328 {
ac28b86d 329 desc => "valid program for device with no bus",
1d936fbc
GKH
330 subsys => "tty",
331 devpath => "class/tty/console",
332 expected => "foo" ,
333 conf => <<EOF
ac28b86d
KS
334PROGRAM="/bin/echo -n foo", RESULT="foo", NAME="foo"
335KERNEL="console", NAME="TTY"
64682333
GKH
336EOF
337 },
338 {
339 desc => "invalid label for device with no bus",
340 subsys => "tty",
341 devpath => "class/tty/console",
342 expected => "TTY" ,
343 conf => <<EOF
16378373 344BUS="foo", SYSFS{dev}="5:1", NAME="foo"
ac28b86d 345KERNEL="console", NAME="TTY"
64682333
GKH
346EOF
347 },
348 {
349 desc => "valid label for device with no bus",
350 subsys => "tty",
351 devpath => "class/tty/console",
352 expected => "foo" ,
353 conf => <<EOF
16378373 354SYSFS{dev}="5:1", NAME="foo"
ac28b86d 355KERNEL="console", NAME="TTY"
772558f4
GKH
356EOF
357 },
358 {
ac28b86d 359 desc => "program and bus type match",
772558f4
GKH
360 subsys => "block",
361 devpath => "block/sda",
362 expected => "scsi-0:0:0:0" ,
363 conf => <<EOF
ac28b86d
KS
364BUS="usb", PROGRAM="/bin/echo -n usb-%b", NAME="%c"
365BUS="scsi", PROGRAM="/bin/echo -n scsi-%b", NAME="%c"
366BUS="foo", PROGRAM="/bin/echo -n foo-%b", NAME="%c"
3d150dfb
KS
367EOF
368 },
369 {
370 desc => "symlink creation (same directory)",
371 subsys => "tty",
372 devpath => "class/tty/ttyUSB0",
373 expected => "visor0" ,
374 conf => <<EOF
ac28b86d 375KERNEL="ttyUSB[0-9]*", NAME="ttyUSB%n", SYMLINK="visor%n"
3d150dfb
KS
376EOF
377 },
378 {
379 desc => "symlink creation (relative link back)",
380 subsys => "block",
381 devpath => "block/sda/sda2",
382 expected => "1/2/a/b/symlink" ,
383 conf => <<EOF
16378373 384BUS="scsi", SYSFS{vendor}="IBM-ESXS", NAME="1/2/node", SYMLINK="1/2/a/b/symlink"
3d150dfb
KS
385EOF
386 },
387 {
388 desc => "symlink creation (relative link forward)",
389 subsys => "block",
390 devpath => "block/sda/sda2",
391 expected => "1/2/symlink" ,
392 conf => <<EOF
16378373 393BUS="scsi", SYSFS{vendor}="IBM-ESXS", NAME="1/2/a/b/node", SYMLINK="1/2/symlink"
3d150dfb
KS
394EOF
395 },
396 {
397 desc => "symlink creation (relative link back and forward)",
398 subsys => "block",
399 devpath => "block/sda/sda2",
400 expected => "1/2/c/d/symlink" ,
401 conf => <<EOF
16378373 402BUS="scsi", SYSFS{vendor}="IBM-ESXS", NAME="1/2/a/b/node", SYMLINK="1/2/c/d/symlink"
4763256c
KS
403EOF
404 },
405 {
406 desc => "multiple symlinks",
407 subsys => "tty",
408 devpath => "class/tty/ttyUSB0",
409 expected => "second-0" ,
410 conf => <<EOF
ac28b86d 411KERNEL="ttyUSB0", NAME="visor", SYMLINK="first-%n second-%n third-%n"
724257d9
GKH
412EOF
413 },
414 {
50e5de03
KS
415 desc => "create all possible partitions",
416 subsys => "block",
417 devpath => "block/sda",
418 expected => "boot_disk15" ,
419 conf => <<EOF
16378373 420BUS="scsi", SYSFS{vendor}="IBM-ESXS", NAME{all_partitions}="boot_disk"
50e5de03
KS
421EOF
422 },
423 {
424 desc => "sysfs parent hierarchy",
724257d9
GKH
425 subsys => "tty",
426 devpath => "class/tty/ttyUSB0",
427 expected => "visor" ,
428 conf => <<EOF
16378373 429SYSFS{idProduct}="2008", NAME="visor"
f0142622
GKH
430EOF
431 },
432 {
433 desc => "name test with ! in the name",
434 subsys => "block",
435 devpath => "block/rd!c0d0",
436 expected => "rd/c0d0" ,
437 conf => <<EOF
438BUS="scsi", NAME="%k"
439KERNEL="ttyUSB0", NAME="visor"
b9fc973b
GKH
440EOF
441 },
442 {
443 desc => "name test with ! in the name, but no matching rule",
444 subsys => "block",
445 devpath => "block/rd!c0d0",
446 expected => "rd/c0d0" ,
447 conf => <<EOF
448KERNEL="ttyUSB0", NAME="visor"
93656247
PM
449EOF
450 },
451 {
452 desc => "ID rule",
453 subsys => "block",
454 devpath => "block/sda",
455 expected => "scsi-0:0:0:0",
456 conf => <<EOF
457BUS="usb", ID="0:0:0:0", NAME="not-scsi"
458BUS="scsi", ID="0:0:0:1", NAME="no-match"
459BUS="scsi", ID=":0", NAME="short-id"
460BUS="scsi", ID="/0:0:0:0", NAME="no-match"
461BUS="scsi", ID="0:0:0:0", NAME="scsi-0:0:0:0"
462EOF
463 },
464 {
465 desc => "ID wildcard all",
466 subsys => "block",
467 devpath => "block/sda",
468 expected => "scsi-0:0:0:0",
469 conf => <<EOF
470BUS="scsi", ID="*:1", NAME="no-match"
471BUS="scsi", ID="*:0:1", NAME="no-match"
472BUS="scsi", ID="*:0:0:1", NAME="no-match"
473BUS="scsi", ID="*", NAME="scsi-0:0:0:0"
474BUS="scsi", ID="0:0:0:0", NAME="bad"
475EOF
476 },
477 {
478 desc => "ID wildcard partial",
479 subsys => "block",
480 devpath => "block/sda",
481 expected => "scsi-0:0:0:0",
482 conf => <<EOF
483BUS="scsi", ID="*:0", NAME="scsi-0:0:0:0"
484BUS="scsi", ID="0:0:0:0", NAME="bad"
485EOF
486 },
487 {
488 desc => "ID wildcard partial 2",
489 subsys => "block",
490 devpath => "block/sda",
491 expected => "scsi-0:0:0:0",
492 conf => <<EOF
493BUS="scsi", ID="*:0:0:0", NAME="scsi-0:0:0:0"
494BUS="scsi", ID="0:0:0:0", NAME="bad"
d5f91372
KS
495EOF
496 },
497 {
498 desc => "ignore SYSFS attribute whitespace",
499 subsys => "block",
500 devpath => "block/sda",
501 expected => "ignored",
502 conf => <<EOF
503BUS="scsi", SYSFS{whitespace_test}="WHITE SPACE", NAME="ignored"
504EOF
505 },
506 {
507 desc => "do not ignore SYSFS attribute whitespace",
508 subsys => "block",
509 devpath => "block/sda",
510 expected => "matched-with-space",
511 conf => <<EOF
512BUS="scsi", SYSFS{whitespace_test}="WHITE SPACE ", NAME="wrong-to-ignore"
513BUS="scsi", SYSFS{whitespace_test}="WHITE SPACE ", NAME="matched-with-space"
0a5417a0
KS
514EOF
515 },
516 {
517 desc => "SYMLINK only rule",
518 subsys => "block",
519 devpath => "block/sda",
520 expected => "symlink-only2",
521 conf => <<EOF
522BUS="scsi", KERNEL="sda", SYMLINK="symlink-only1"
523BUS="scsi", KERNEL="sda", SYMLINK="symlink-only2"
524BUS="scsi", KERNEL="sda", NAME="link", SYMLINK="symlink0"
a367f04e
GKH
525EOF
526 },
527);
528
529# set env
530$ENV{UDEV_TEST} = "yes";
531$ENV{SYSFS_PATH} = $sysfs;
72ffa78d 532$ENV{UDEV_CONFIG_FILE} = $main_conf;
a367f04e
GKH
533
534
535sub udev {
536 my ($action, $subsys, $devpath, $config) = @_;
537
538 $ENV{DEVPATH} = $devpath;
a367f04e
GKH
539
540 # create temporary config
541 open CONF, ">$conf_tmp" || die "unable to create config file: $conf_tmp";
542 print CONF $$config;
543 close CONF;
544
545 $ENV{ACTION} = $action;
546 system("$udev_bin $subsys");
547}
548
e5fbfe0a 549my $error = 0;
72ffa78d 550
2e317184
GKH
551sub run_test {
552 my ($config, $number) = @_;
553
554 print "TEST $number: $config->{desc}\n";
ac28b86d 555 print "device \'$config->{devpath}\' expecting node \'$config->{expected}\'\n";
a367f04e
GKH
556
557 udev("add", $config->{subsys}, $config->{devpath}, \$config->{conf});
558 if (-e "$PWD/$udev_root$config->{expected}") {
559 print "add: ok ";
560 } else {
561 print "add: error\n";
562 system("tree $udev_root");
563 print "\n";
564 $error++;
a367f04e
GKH
565 }
566
567 udev("remove", $config->{subsys}, $config->{devpath}, \$config->{conf});
3d150dfb
KS
568 if ((-e "$PWD/$udev_root$config->{expected}") ||
569 (-l "$PWD/$udev_root$config->{expected}")) {
a367f04e
GKH
570 print "remove: error\n\n";
571 system("tree $udev_root");
572 $error++;
573 } else {
574 print "remove: ok\n\n";
575 }
576}
577
2e317184
GKH
578# prepare
579system("rm -rf $udev_root");
580mkdir($udev_root) || die "unable to create udev_root: $udev_root\n";
581
582# create initial config file
583open CONF, ">$main_conf" || die "unable to create config file: $main_conf";
584print CONF "udev_root=\"$udev_root\"\n";
585print CONF "udev_db=\"$udev_db\"\n";
586print CONF "udev_rules=\"$conf_tmp\"\n";
587print CONF "udev_permissions=\"$perm\"\n";
588close CONF;
589
590my $test_num = 1;
591
592if ($ARGV[0]) {
593 # only run one test
594 $test_num = $ARGV[0];
595 print "udev-test will run test number $test_num only\n";
596
b9fc973b 597 run_test($tests[$test_num-1], $test_num);
2e317184
GKH
598} else {
599 # test all
600 print "\nudev-test will run ".($#tests + 1)." tests:\n\n";
601
602 foreach my $config (@tests) {
603 run_test($config, $test_num);
604 $test_num++;
605
606 }
607}
608
a367f04e
GKH
609print "$error errors occured\n\n";
610
611# cleanup
36043f84 612unlink($udev_db);
a367f04e
GKH
613system("rm -rf $udev_root");
614unlink($conf_tmp);
72ffa78d 615unlink($main_conf);
a367f04e 616