Project

General

Profile

action #52247

autoinst-log.txt opened with wrong path

Added by apachelogger about 2 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Concrete Bugs
Target version:
Start date:
2019-05-28
Due date:
% Done:

0%

Estimated time:
Difficulty:

Description

austoinst-log.txt is currently opened as though it was in . but really it is in ./testresults/

basetest.pm contains

open(my $AUTOINSTLOG, "<", "autoinst-log.txt") || die('Could not open autoinst-log.txt for reading');

which is meant to open the log file created in bmwqemu.pm

        $logger = Mojo::Log->new(level => 'debug', path => catfile(result_dir, 'autoinst-log.txt'));

but as far as I can tell there is no chdir into result_dir anywhere, so the CWD at the time of the open() is still the same CWD as it was when the logger was initialized, and that is one directory above autoinst-log.txt. Printing getcwd just before the open call confirms as much.

Current master now always trip over the incorrect open call and die.


Related issues

Related to openQA Project - action #52235: isotovideo -d brokenResolved2019-05-28

History

#1 Updated by coolo about 2 years ago

  • Category set to Concrete Bugs
  • Target version set to Current Sprint

Well, the regular case is not calling the Mojo::Log statement - the worker runs isotovideo -d and channels the output itself to ./autoinst.log.txt - so the open is correct.

So you only notice the problem if calling isotovideo yourself without -d, so the Mojo::Log statement needs to remove the catfile, easy fix

#2 Updated by szarate about 2 years ago

#3 Updated by dheidler about 2 years ago

  • Status changed from New to In Progress
  • Assignee set to dheidler

#4 Updated by dheidler about 2 years ago

  • Status changed from In Progress to Feedback

PR https://github.com/os-autoinst/os-autoinst/pull/1159 takes care of this issue as well now.

#5 Updated by okurz about 2 years ago

There was some fallout. See #52235#note-10 for details about the "fix" by partial revert. We can continue in reopened #45011

#6 Updated by okurz about 2 years ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF