Project

General

Profile

Bug #9376

Test suite --log-to-file's control chars removal does not entirely work

Added by intrigeri over 4 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Test suite
Target version:
Start date:
05/12/2015
Due date:
% Done:

100%

Feature Branch:
test/9376-always-remove-control-chars-from-log
Type of work:
Code
Blueprint:
Starter:
Affected tool:

Description

I still see control chars in the resulting log.

Associated revisions

Revision 271470c7 (diff)
Added by intrigeri about 4 years ago

run_test_suite: remove control chars from log file even when cucumber exits with non-zero.

Previously, "thanks" to 'set -e', remove_control_chars_from was not called
when cucumber exits with non-zero. Let's instead run this cleanup step
via a signal handler.

Will-fix: #9376

Revision 688d8c5b
Added by intrigeri about 4 years ago

Merge branch 'test/9376-always-remove-control-chars-from-log' into stable

Fix-committed: #9376

History

#1 Updated by intrigeri over 4 years ago

  • Assignee changed from intrigeri to kytv
  • QA Check set to Info Needed

Argh, I can't reproduce this anymore! Kill Your TV, can you?

#2 Updated by kytv over 4 years ago

Let's see...

#3 Updated by kytv over 4 years ago

  • Assignee changed from kytv to intrigeri
  • QA Check changed from Info Needed to Dev Needed

I am seeing it in torified_gnupg.feature, at least (seen while working on #9518):

[info] Sikuli vision engine loaded.
Testing ISO image: tails-i386-test_9516-tor-bootstrap-1.4.1-20150619.iso
^[[36m@product^[[0m ^[[36m@check_tor_leaks^[[0m
Feature: Keyserver interaction with GnuPG
  As a Tails user
  when I interact with keyservers using various GnuPG tools
  the configured keyserver must be used
  and all Internet traffic should flow only through Tor.

  Background: ^[[90m                                                              # features/torified_gnupg.feature:8^[[0m
    ^[[32mGiven a computer^[[90m                                                        # features/step_definitions/common_steps.rb:77^[[0m^[[0m
    ^[[32mAnd I start the computer^[[90m                                                # features/step_definitions/common_steps.rb:157^[[0m^[[0m
    ^[[32mAnd the computer boots Tails^[[90m                                            # features/step_definitions/common_steps.rb:235^[[0m^[[0m
    ^[[32mAnd I log in to a new session^[[32m^[[1m^[[0m^[[0m^[[32m^[[90m                                           # features/step_definitions/common_steps.rb:263^[[0m^[[0m
    ^[[32mAnd the Tails desktop is ready^[[90m                                          # features/step_definitions/common_steps.rb:309^[[0m^[[0m
    ^[[32mAnd Tor is ready^[[90m                                                        # features/step_definitions/common_steps.rb:335^[[0m^[[0m
    ^[[32mAnd all notifications have disappeared^[[90m                                  # features/step_definitions/common_steps.rb:407^[[0m^[[0m
    ^[[32mAnd available upgrades have been checked^[[90m                                # features/step_definitions/common_steps.rb:353^[[0m^[[0m
    ^[[32mAnd the "^[[32m^[[1m10CC5BC7^[[0m^[[0m^[[32m" OpenPGP key is not in the live user's public keyring^[[90m # features/step_definitions/torified_gnupg.rb:40^[[0m^[[0m

#4 Updated by intrigeri over 4 years ago

  • Assignee changed from intrigeri to kytv
  • QA Check changed from Dev Needed to Info Needed

kytv wrote:

I am seeing it in torified_gnupg.feature, at least (seen while working on #9518):

I'll need more info than "yes, I can reproduce it", since I still cannot. May you please share the exact command-line you're using, and the host OS version?

#5 Updated by kytv over 4 years ago

I'll provide more information once I can get it. ETA: later tonight.

I reproduced it in Stretch/Sid but I'll try reproducing it in Jessie too, and I'll provide the full command line.

Hmm...does the order of the parameters matter? TBD...

#6 Updated by kytv over 4 years ago

  • Assignee changed from kytv to intrigeri
  • QA Check changed from Info Needed to Dev Needed

Reproduced again, Debian Jessie.

Command-line used:

# ./run_test_suite --debug --log-to-file=pidgin.log --keep-snapshots --view --iso ../isos/tails-i386-test_9516-tor-bootstrap-1.4.1-20150619.iso -- features/pidgin.feature

This resulted in a log file without the control characters stripped out.

[info] Sikuli vision engine loaded.
Testing ISO image: tails-i386-test_9516-tor-bootstrap-1.4.1-20150619.iso
^[[36m@product^[[0m
Feature: Chatting anonymously using Pidgin
  As a Tails user
  when I chat using Pidgin
  I should be able to use OTR
  And I should be able to persist my Pidgin configuration
  And AppArmor should prevent Pidgin from doing dangerous things
  And all Internet traffic should flow only through Tor

  Background: ^[[90m                                                             # features/pidgin.feature:10^[[0m
    ^[[32mGiven a computer^[[90m                                                       # features/step_definitions/common_steps.rb:77^[[0m^[[0m
    ^[[32mWhen I start Tails^[[32m^[[1m from DVD^[[0m^[[0m^[[32m and I login^[[90m                                # features/step_definitions/common_steps.rb:165^[[0m^[[0m
    ^[[32mThen Pidgin has the expected accounts configured with random nicknames^[[90m # features/step_definitions/pidgin.rb:245^[[0m^[[0m
....
....

#7 Updated by kytv over 4 years ago

To be clear: The feature did complete. I did not abort it with CTRL+C

#8 Updated by intrigeri about 4 years ago

  • Target version changed from Tails_1.4.1 to Tails_1.5

#9 Updated by intrigeri about 4 years ago

  • Status changed from Confirmed to In Progress
  • % Done changed from 0 to 10

We're using set -e in run_test_suite, so any failure that causes cucumber to return non-zero will prevent remove_control_chars_from from being run => it should be moved to a signal handler.

#11 Updated by intrigeri about 4 years ago

  • Assignee changed from intrigeri to kytv
  • % Done changed from 10 to 50
  • QA Check changed from Dev Needed to Ready for QA
  • Feature Branch set to test/9376-always-remove-control-chars-from-log

#12 Updated by kytv about 4 years ago

  • Assignee changed from kytv to intrigeri
  • QA Check changed from Ready for QA to Pass

Code looks good. More importantly, it solved the problem. :)

#13 Updated by intrigeri about 4 years ago

  • Status changed from In Progress to Fix committed
  • Assignee deleted (intrigeri)
  • Target version changed from Tails_1.5 to Tails_1.4.1
  • % Done changed from 50 to 100

Thanks for the review + test, merged.

#15 Updated by intrigeri about 4 years ago

  • Status changed from Fix committed to Resolved

Also available in: Atom PDF