[augeas-devel] [Augeas] #332: Make check has failed: Could not load /path/augeas-1.0.0/lenses/hosts.aug

Augeas trac at fedorahosted.org
Fri Feb 22 14:23:43 UTC 2013


#332: Make check has failed: Could not load /path/augeas-1.0.0/lenses/hosts.aug
-------------------------------+---------------------
 Reporter:  aponomarenko       |       Owner:  lutter
     Type:  defect             |      Status:  new
 Priority:  major              |   Milestone:  next
Component:  Augeas             |     Version:  1.0.0
 Keywords:  lenses make check  |  Blocked By:
 Blocking:                     |
-------------------------------+---------------------
 Hello,

 There is an error of ''make check'' command in Augeas 1.0.0:
 {{{
 ...
 PASS: fatest
 PASS: test-xpath
 PASS: test-load
 PASS: test-save
 PASS: test-api
 FAIL: test-run
 }}}

 cat ''tests/test-suite.log'':

 {{{
 ...
 retrieve_nolens                ... PASS
 retrieve_epathx_node_in        ... FAIL (Could not load
 /path/augeas-1.0.0/lenses/hosts.aug)
 retrieve_epathx_path           ... FAIL (Could not load
 /path/augeas-1.0.0/lenses/hosts.aug)
 retrieve_epathx_node_out       ... FAIL (Could not load
 /path/augeas-1.0.0/lenses/hosts.aug)
 retrieve_no_node_in            ... FAIL (Could not load
 /path/augeas-1.0.0/lenses/hosts.aug)
 retrieve_no_tree               ... FAIL (Could not load
 /path/augeas-1.0.0/lenses/hosts.aug)
 retrieve_esyntax               ... FAIL (Could not load
 /path/augeas-1.0.0/lenses/hosts.aug)
 retrieve_null                  ... FAIL (Could not load
 /path/augeas-1.0.0/lenses/hosts.aug)
 }}}

 The problem is that Augeas is trying to search for ''path'' in lowercase,
 but it contains uppercase symbols. Distribution: ROSA Desktop Fresh 2012
 on x86.

 The ''patch'' to fix this problem:
 {{{
 diff -rNau ./tests/test-run.c.orig ./tests/test-run.c
 --- ./tests/test-run.c.orig     2013-02-22 17:13:26.042938124 +0400
 +++ ./tests/test-run.c  2013-02-22 17:58:35.826682428 +0400
 @@ -183,19 +183,23 @@
      }

  static int load_module(struct augeas *aug, struct test *test) {
 -    char *fname;
 +    char *fname, *fpath;
      int r;

      if (test->module == NULL)
          return 0;
 -
 -    if (asprintf(&fname, "%s/%s.aug", lensdir, test->module) == -1)
 -        fail(true, "asprintf test->module");
 +
 +    if (asprintf(&fname, "%s.aug", test->module) == -1)
 +       fail(true, "asprintf test->module");
 +
      for (int i=0; i < strlen(fname); i++)
          fname[i] = tolower(fname[i]);
 +
 +    if (asprintf(&fpath, "%s/%s", lensdir, fname) == -1)
 +        fail(true, "asprintf lensdir");

 -    r = __aug_load_module_file(aug, fname);
 -    fail(r < 0, "Could not load %s", fname);
 +    r = __aug_load_module_file(aug, fpath);
 +    fail(r < 0, "Could not load %s", fpath);

      return 0;
   error:
 }}}

 All tests are passed after applying this patch.

-- 
Ticket URL: <https://fedorahosted.org/augeas/ticket/332>
Augeas <http://augeas.net/>
a configuration API




More information about the augeas-devel mailing list