Skip to content

Unable to run tests due to "unexpected uninitialized" in log #450

@Rx1513

Description

@Rx1513

After adding 3910185, tests started to fail on cases when nonexsistent path is checked.

For example:

cov/gcov-tool/path.sh ............   lcov: WARNING: Use of uninitialized value $tool in -x at /usr/src/RPM/BUILD/lcov-2.4/bin/geninfo line 341.
  geninfo: WARNING: Use of uninitialized value $tool in -x at /usr/src/RPM/BUILD/lcov-2.4/bin/geninfo line 341.
unexpected 'uninitialized' in '/usr/src/RPM/BUILD/lcov-2.4/tests//test.log' for lcov/gcov-tool/path.sh
[fail] (time 5.4s, mem 34.0MB)
    Skipping 236 previous lines (see /usr/src/RPM/BUILD/lcov-2.4/tests//test.log)
    ...
      lines.......: 100.0% (2 of 2 lines)
      functions...: 100.0% (1 of 1 function)
    Message summary:
      no messages were reported
    geninfo: ERROR: cannot access gcov tool 'gcov.nonexistent' at /usr/src/RPM/BUILD/lcov-2.4/bin/geninfo line 342.
    geninfo: ERROR: cannot access gcov tool '/gcov.nonexistent' at /usr/src/RPM/BUILD/lcov-2.4/bin/geninfo line 342.
    geninfo: WARNING: Use of uninitialized value $tool in -x at /usr/src/RPM/BUILD/lcov-2.4/bin/geninfo line 341.
    geninfo: ERROR: cannot access gcov tool './gcov.nonexistent' at /usr/src/RPM/BUILD/lcov-2.4/bin/geninfo line 342.
    Tests passed
  EXITCODE ...: 1
make[3]: *** [../../common.mak:116: check] Error 1

I'm not very familiar with perl, but it's seems that for some reason abs_path returns undefined value for nonexsistent paths which later is used for file check.

Additional 'defined' check for $tool variable seems to fix the problem with this exact test, but I get similar issue with gendiffcov/errs/msgtest.sh test due to:

lcov: WARNING: Use of uninitialized value in exists

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions