From e039be5838a6befdb4a378fcdc1fc2e7606d4222 Mon Sep 17 00:00:00 2001 From: Jon Trowbridge Date: Fri, 9 Apr 2004 19:50:29 +0000 Subject: 2004-04-09 Jon Trowbridge * bus/config-parser.c (bus_config_parser_new): Added a 'parent' argument. If non-null, the newly-constructed BusConfigParser will be initialized with the parent's BusLimits instead of the default values. (include_file): When including a config file, pass in the current parser as the parent and then copy the BusLimits from the included BusConfigParser pack to the current parser. (process_test_valid_subdir): Renamed from process_test_subdir. (process_test_equiv_subdir): Added. Walks through a directory, descending into each subdirectory and loading the config files it finds there. If any subdirectory contains two config files that don't produce identical BusConfigParser structs, fail. For now, the BusConfigParser's BusPolicies are not compared. (bus_config_parser_test): Call both process_test_valid_subdir and process_test_equiv_subdir. * bus/config-loader-libxml.c (bus_config_load): Take a parent argument and pass it along to the call to bus_config_parser_new. Also made a few small changes to allow this code to compile. * bus/config-loader-expat.c (bus_config_load): Take a parent argument and pass it along to the call to bus_config_parser_new. * bus/bus.c (bus_context_new): Load the config file with a NULL parent argument. --- test/data/equiv-config-files/basic/basic-1.conf | 25 ++++++++++++++++++++++ test/data/equiv-config-files/basic/basic-2.conf | 5 +++++ .../equiv-config-files/basic/basic.d/basic.conf | 13 +++++++++++ .../equiv-config-files/entities/basic.d/basic.conf | 13 +++++++++++ .../equiv-config-files/entities/entities-1.conf | 14 ++++++++++++ .../equiv-config-files/entities/entities-2.conf | 5 +++++ 6 files changed, 75 insertions(+) create mode 100644 test/data/equiv-config-files/basic/basic-1.conf create mode 100644 test/data/equiv-config-files/basic/basic-2.conf create mode 100644 test/data/equiv-config-files/basic/basic.d/basic.conf create mode 100644 test/data/equiv-config-files/entities/basic.d/basic.conf create mode 100644 test/data/equiv-config-files/entities/entities-1.conf create mode 100644 test/data/equiv-config-files/entities/entities-2.conf (limited to 'test') diff --git a/test/data/equiv-config-files/basic/basic-1.conf b/test/data/equiv-config-files/basic/basic-1.conf new file mode 100644 index 00000000..4500ad70 --- /dev/null +++ b/test/data/equiv-config-files/basic/basic-1.conf @@ -0,0 +1,25 @@ + + + mybususer + unix:path=/foo/bar + tcp:port=1234 + basic.d + /usr/share/foo + nonexistent.conf + + + + + 5000 + 5000 + 300 + 5000 + 6000 + 50 + 80 + 64 + 64 + 256 + + diff --git a/test/data/equiv-config-files/basic/basic-2.conf b/test/data/equiv-config-files/basic/basic-2.conf new file mode 100644 index 00000000..49e707e8 --- /dev/null +++ b/test/data/equiv-config-files/basic/basic-2.conf @@ -0,0 +1,5 @@ + + +basic-1.conf + \ No newline at end of file diff --git a/test/data/equiv-config-files/basic/basic.d/basic.conf b/test/data/equiv-config-files/basic/basic.d/basic.conf new file mode 100644 index 00000000..d109d71d --- /dev/null +++ b/test/data/equiv-config-files/basic/basic.d/basic.conf @@ -0,0 +1,13 @@ + + + mybususer + unix:path=/foo/bar + tcp:port=1234 + basic.d + /usr/share/foo + nonexistent.conf + + + + diff --git a/test/data/equiv-config-files/entities/basic.d/basic.conf b/test/data/equiv-config-files/entities/basic.d/basic.conf new file mode 100644 index 00000000..d109d71d --- /dev/null +++ b/test/data/equiv-config-files/entities/basic.d/basic.conf @@ -0,0 +1,13 @@ + + + mybususer + unix:path=/foo/bar + tcp:port=1234 + basic.d + /usr/share/foo + nonexistent.conf + + + + diff --git a/test/data/equiv-config-files/entities/entities-1.conf b/test/data/equiv-config-files/entities/entities-1.conf new file mode 100644 index 00000000..3d3cea79 --- /dev/null +++ b/test/data/equiv-config-files/entities/entities-1.conf @@ -0,0 +1,14 @@ + + + + mybususer + unix:path=/foo/<bar> + tcp:port=1234 + basic.d + /usr/&share/foo + nonexistent.confn + + + + diff --git a/test/data/equiv-config-files/entities/entities-2.conf b/test/data/equiv-config-files/entities/entities-2.conf new file mode 100644 index 00000000..9ffabeae --- /dev/null +++ b/test/data/equiv-config-files/entities/entities-2.conf @@ -0,0 +1,5 @@ + + +entities-1.conf + \ No newline at end of file -- cgit