Project

General

Profile

Bug #8697

Bug #8059: Windows Camouflage automated tests sometimes failed due to differently ordered icons in the notification area

Step "I update APT using apt-get" succeeds even if apt-get update failed

Added by intrigeri about 5 years ago. Updated about 5 years ago.

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

100%

Feature Branch:
kytv:test/8697-update-apt-get
Type of work:
Code
Blueprint:
Starter:
Affected tool:

Description

Apparently, on apt-get failure we display STDERR but don't fail the step:

  Scenario: Install packages using apt-get                               # features/apt.feature:25

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for amnesia: W: Failed to fetch http://ftp.us.debian.org/debian/dists/experimental/main/i18n/Translation-en  Hash Sum mismatch

E: Some index files failed to download. They have been ignored, or old ones used instead.
    When I update APT using apt-get                                      # features/step_definitions/apt.rb:15

... and the test passes.

Associated revisions

Revision d376115b
Added by Tails developers about 5 years ago

Merge branch 'test/8697-update-apt-get' into devel

Fix-committed: #8697

History

#2 Updated by kytv about 5 years ago

  • Status changed from Confirmed to In Progress
  • Assignee set to kytv

#3 Updated by kytv about 5 years ago

  • Assignee changed from kytv to anonym
  • QA Check set to Ready for QA
  • Feature Branch set to kytv:test/8697-update-apt-get

#4 Updated by kytv about 5 years ago

Confirmed with a buggy ISO: With this change the test will fail if the apt-get update step fails.

#5 Updated by kytv about 5 years ago

  • Target version changed from Tails_1.4 to Tails_1.3

#6 Updated by intrigeri about 5 years ago

  • Assignee changed from anonym to kytv
  • % Done changed from 0 to 50
  • QA Check changed from Ready for QA to Info Needed

Looks good, but is there any reason to keep the two

    if !cmd.success?
      STDERR.puts cmd.stderr
    end

blocks?

It seems that execute_successfully does it anyway, via assert_vmcommand_success.

#7 Updated by kytv about 5 years ago

  • Assignee changed from kytv to anonym
  • QA Check changed from Info Needed to Ready for QA

intrigeri wrote:

Looks good, but is there any reason to keep the two

[...]

blocks?

It seems that execute_successfully does it anyway, via assert_vmcommand_success.

You're right, there's no need for them; I removed them and ran the test. Due to a transient problem (woohoo!) the test failed.

debian.org/debian/dists/wheezy-backports/non-free/i18n/Translation-en  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)\n\nE: Some index files failed to download. They have been ignored, or old ones used instead.\n"]
    When I update APT using apt-get                                      # features/step_definitions/apt.rb:15
      Command failed: echo asdf | sudo -S apt-get update
      error code: 100
      stderr: 
      We trust you have received the usual lecture from the local System
      Administrator. It usually boils down to these three things:

          #1) Respect the privacy of others.
          #2) Think before you type.
          #3) With great power comes great responsibility.

      [sudo] password for amnesia: [Jan 21 13:04:00] ERROR torsocks[5262]: Unable to resolve. Status reply: 4 (in socks5_recv_resolve_reply() at socks5.c:657)
      [Jan 21 13:04:00] ERROR torsocks[5262]: Unable to resolve. Status reply: 4 (in socks5_recv_resolve_reply() at socks5.c:657)
[....lots of duplicate (other than timestamp) lines snipped....]
      [Jan 21 13:04:50] ERROR torsocks[5262]: Unable to resolve. Status reply: 4 (in socks5_recv_resolve_reply() at socks5.c:657)
      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/wheezy/Release.gpg  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/experimental/Release.gpg  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/unstable/Release.gpg  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/testing/Release.gpg  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/wheezy-backports/Release.gpg  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/wheezy/main/binary-i386/Packages  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/wheezy/contrib/binary-i386/Packages  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/wheezy/non-free/binary-i386/Packages  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/wheezy/contrib/i18n/Translation-en  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/wheezy/main/i18n/Translation-en  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/wheezy/non-free/i18n/Translation-en  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/experimental/main/binary-i386/Packages  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/experimental/main/i18n/Translation-en  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/unstable/main/binary-i386/Packages  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/unstable/contrib/binary-i386/Packages  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/unstable/non-free/binary-i386/Packages  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/unstable/contrib/i18n/Translation-en  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/unstable/main/i18n/Translation-en  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/unstable/non-free/i18n/Translation-en  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/testing/main/binary-i386/Packages  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/testing/contrib/binary-i386/Packages  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/testing/non-free/binary-i386/Packages  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/testing/contrib/i18n/Translation-en  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/testing/main/i18n/Translation-en  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/testing/non-free/i18n/Translation-en  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/wheezy-backports/main/binary-i386/Packages  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/wheezy-backports/contrib/binary-i386/Packages  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/wheezy-backports/non-free/binary-i386/Packages  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/wheezy-backports/contrib/i18n/Translation-en  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/wheezy-backports/main/i18n/Translation-en  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      W: Failed to fetch tor+http://ftp.us.debian.org/debian/dists/wheezy-backports/non-free/i18n/Translation-en  Something wicked happened resolving 'ftp.us.debian.org:http' (-4 - Non-recoverable failure in name resolution)

      E: Some index files failed to download. They have been ignored, or old ones used instead.
       (MiniTest::Assertion)
      ./features/support/helpers/misc_helpers.rb:9:in `assert_vmcommand_success'
      ./features/support/helpers/vm_helper.rb:335:in `execute_successfully'
      ./features/step_definitions/apt.rb:18:in `block (2 levels) in <top (required)>'
      /usr/lib/ruby/1.9.1/timeout.rb:68:in `timeout'
      ./features/step_definitions/apt.rb:17:in `/^I update APT using apt-get$/'
      features/apt.feature:26:in `When I update APT using apt-get'
    Then I should be able to install a package using apt-get             # features/step_definitions/apt.rb:23
    And all Internet traffic has only flowed through Tor 

#8 Updated by Tails about 5 years ago

  • Status changed from In Progress to 11
  • % Done changed from 50 to 100

Applied in changeset commit:1c69c4f7cb18bb98002b9e815acfb163b9189db7.

#9 Updated by anonym about 5 years ago

  • Assignee deleted (anonym)
  • QA Check deleted (Ready for QA)

I took the liberty of pushing a small fixup that removes the now unused variable cmd. Then I tested both the success and failure mode. Merged!

#10 Updated by BitingBird about 5 years ago

  • QA Check set to Pass

#11 Updated by kytv about 5 years ago

anonym wrote:

I took the liberty of pushing a small fixup that removes the now unused variable cmd.

Thank you for that.

Then I tested both the success and failure mode. Merged!

Woohoo

#12 Updated by BitingBird about 5 years ago

  • Status changed from 11 to Resolved

Also available in: Atom PDF