mirror of
https://github.com/systemd/systemd.git
synced 2025-03-01 08:58:29 +03:00
[PATCH] test-suite: remove UDEV_TEST, it's not needed anymore
This commit is contained in:
parent
93ca11e4be
commit
65005a7f81
@ -3,7 +3,6 @@
|
||||
RULES=label_test.rules
|
||||
CONFIG=label_test.conf
|
||||
|
||||
export UDEV_TEST=yes
|
||||
export SYSFS_PATH=$PWD/sys/
|
||||
export UDEV_CONFIG_FILE=$PWD/$CONFIG
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
RULES=label_test.rules
|
||||
CONFIG=label_test.conf
|
||||
|
||||
export UDEV_TEST=yes
|
||||
export SYSFS_PATH=$PWD/sys/
|
||||
export UDEV_CONFIG_FILE=$PWD/$CONFIG
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
RULES=replace_test.rules
|
||||
CONFIG=replace_test.conf
|
||||
|
||||
export UDEV_TEST=yes
|
||||
export SYSFS_PATH=$PWD/sys/
|
||||
export UDEV_CONFIG_FILE=$PWD/$CONFIG
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -13,16 +13,15 @@ use strict;
|
||||
|
||||
my $PWD = $ENV{PWD};
|
||||
my $sysfs = "sys/";
|
||||
my $udev_bin = "../udev";
|
||||
my $udevstart_bin = "../udevstart";
|
||||
my $udev_root = "udev-root/"; # !!! directory will be removed !!!
|
||||
my $udev_db = ".udevdb";
|
||||
my $main_conf = "udev-test.conf";
|
||||
my $conf_tmp = "udev-test.rules";
|
||||
my $udev_conf = "udev-test.conf";
|
||||
my $udev_rules = "udev-test.rules";
|
||||
|
||||
# set env
|
||||
$ENV{UDEV_TEST} = "yes";
|
||||
$ENV{SYSFS_PATH} = $sysfs;
|
||||
$ENV{UDEV_CONFIG_FILE} = $main_conf;
|
||||
$ENV{UDEV_CONFIG_FILE} = $udev_conf;
|
||||
$ENV{UDEV_NO_DEVD} = "yes";
|
||||
$ENV{UDEV_NO_HOTPLUGD} = "yes";
|
||||
|
||||
@ -36,23 +35,29 @@ if (!($<==0)) {
|
||||
system("rm -rf $udev_root");
|
||||
mkdir($udev_root) || die "unable to create udev_root: $udev_root\n";
|
||||
|
||||
# create initial config file
|
||||
open CONF, ">$main_conf" || die "unable to create config file: $main_conf";
|
||||
# create config file
|
||||
open CONF, ">$udev_conf" || die "unable to create config file: $udev_conf";
|
||||
print CONF "udev_root=\"$udev_root\"\n";
|
||||
print CONF "udev_db=\"$udev_db\"\n";
|
||||
print CONF "udev_rules=\"$conf_tmp\"\n";
|
||||
print CONF "udev_rules=\"$udev_rules\"\n";
|
||||
close CONF;
|
||||
|
||||
system("$udev_bin udevstart");
|
||||
my $block = int( `find $udev_root -type b -print | wc -l`);
|
||||
my $char = int( `find $udev_root -type c -print | wc -l`);
|
||||
# create rules file
|
||||
open RULES, ">$udev_rules" || die "unable to create rules file: $udev_rules";
|
||||
print RULES "\n";
|
||||
close RULES;
|
||||
|
||||
system("$udevstart_bin");
|
||||
my $block = int(`find $udev_root -type b -print | wc -l`);
|
||||
my $char = int(`find $udev_root -type c -print | wc -l`);
|
||||
|
||||
print "block devices: $block/10\n";
|
||||
print "char devices: $char/91\n";
|
||||
print "\n";
|
||||
|
||||
# cleanup
|
||||
system("rm -rf $udev_db");
|
||||
system("rm -rf $udev_root");
|
||||
unlink($conf_tmp);
|
||||
unlink($main_conf);
|
||||
unlink($udev_rules);
|
||||
unlink($udev_conf);
|
||||
|
||||
|
@ -219,24 +219,14 @@ static int parse_config_file(void)
|
||||
|
||||
void udev_init_config(void)
|
||||
{
|
||||
const char *config;
|
||||
|
||||
init_variables();
|
||||
sysfs_get_mnt_path(sysfs_path, sizeof(sysfs_path));
|
||||
|
||||
/* see if we should try to override any of the default values */
|
||||
if (getenv("UDEV_TEST") != NULL) {
|
||||
char *temp;
|
||||
|
||||
temp = getenv("SYSFS_PATH");
|
||||
if (temp != NULL) {
|
||||
strlcpy(sysfs_path, temp, sizeof(sysfs_path));
|
||||
no_trailing_slash(sysfs_path);
|
||||
}
|
||||
|
||||
temp = getenv("UDEV_CONFIG_FILE");
|
||||
if (temp != NULL)
|
||||
strlcpy(udev_config_filename, temp, sizeof(udev_config_filename));
|
||||
}
|
||||
config = getenv("UDEV_CONFIG_FILE");
|
||||
if (config != NULL)
|
||||
strlcpy(udev_config_filename, config, sizeof(udev_config_filename));
|
||||
|
||||
parse_config_file();
|
||||
dbg("sysfs_path='%s'", sysfs_path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user