Merge remote-tracking branch 'flapflap/de-network_configuration'
[tails-test.git] / wiki / src / contribute / release_process / test.mdwn
blobe75bf7cc902dbe9b8d8fbebe768c0bcf8049ac1b
1 [[!meta title="Manual test suite"]]
3 [[!toc levels=1]]
5 Some [[test results]] that might be useful to keep are saved.
7 <div class="caution">
8 Read this document from the branch used to prepare the release.
9 </div>
11 # Changes
13 Keeping an eye on the changes between released versions is one of the
14 many safeguards against releasing crap.
16 ## Source
19 Compare the to-be-released source code with previous version's one e.g.:
21 Boot the candidate ISO and find the commit it was build from with the
22 `tails-version` command.
24 Then, from the source tree, see the diff:
26         git diff --find-renames <old tag>..<ISO commit>
28 e.g. `git diff 0.17..06fa1ab80d55c9f29274b7459bd198edb1a8d53d`
30 ## Result
32 Compare the list of bundled packages and versions with the one shipped last
33 time. `.packages` are usually attached to the email announcing the ISO is ready.
35         /usr/bin/diff -u \
36             wiki/src/torrents/files/tails-i386-0.16.packages \
37             tails-i386-0.17.packages \
38             | wdiff --diff-input  --terminal
40 Check the output for:
42 - new packages that may cause harm or make the images unnecessarily
43   big
44 - packages that could be erroneously removed
45 - new versions of software we might not have audited yet (including:
46   does the combination of our configuration with software X version
47   Y+1 achieve the same wished results as with software X version Y?)
49 ## Image size
51 Check the image size has not changed much since the last release.
53 In a directory with many Tails ISO images:
55     find -iname "tails*.iso" -exec ls -lh '{}' \; | sort -rhk 5
57 # Automated test suite
59 Our long term goal is to eliminate the manual test suite (except the
60 parts which require real hardware) and have the automated test suite
61 run all our tests. It's design, and how to write new tests, are
62 documented on a [[dedicated page|test/automated_tests]].
64 ## Running the automated test suite
66 See [[test/setup]] and [[test/usage]].
68 ## Automated test suite migration progress
70 The manual test suite below either contains tests that cannot be
71 automated, has no automated test implemented yet, or has a test
72 implemented, but it either hasn't been reviewed, had a confirmed pass
73 by someone other than the test author, or has issues. The latter is
74 tracked by tickets prefixed with `todo/test_suite:`.
76 # Tor Browser
78 ## Security and fingerprinting
80 * Run the [tests the TBB folks
81   use](https://trac.torproject.org/projects/tor/wiki/doc/build/BuildSignoff#TestPagestoUse).
82 * Compare the fingerprint of Tails and the latest TBB using at least
83   <https://panopticlick.eff.org/>
84   - The exposed User-Agent should match the latest TBB's one.
85   - Update the [[fingerprint section|support/known_issues#fingerprint]] of the
86     known issues page if needed.
87 * WebRTC should be disabled:
88   - In `about:config` check that `media.peerconnection.enabled` is set to
89     `false`.
90   - <http://mozilla.github.io/webrtc-landing/>, especially the `getUserMedia`
91     test. It's expected that the audio test works if you agree to share a
92     microphone with the remote website; anything else should fail.
93   - <http://net.ipcalf.com/> should display
94     `ifconfig | grep inet | grep -v inet6 | cut -d" " -f2 | tail -n1`
95 * One should be able to switch identities from the web browser.
96 * Running `getTorBrowserUserAgent` should produce the User-Agent set by the
97   installed version of Torbutton, and used in the Tor Browser.
99 ## Functionality
101 * Browsing (by IP) a HTTP or HTTPS server on the LAN should be possible.
102 * Browsing (by IP) a FTP server on the LAN should be possible.
104 # Pidgin
106 (automate: [[!tails_ticket 7820]])
108 * Check that you can initiate an OTR conversation.
109 * Check that XMPP is working with a new test profile.
110   For example using Riseup:
111   - Username: username
112   - Domain: riseup.net
113   - Connect server: 4cjw6cwpeaeppfqz.onion
114   - Then try to create and connect to a new room:
115     - Room: testing
116     - Server: conference.riseup.net
117     - Handle: username
118 * Check that Pidgin doesn't leak too much information when replying to
119   CTCP requests:
120   * Start Tails, launch Pidgin, and join #tails.
121   * Also join #tails from a client that supports CTCP commands
122     properly, e.g. Konversation.
123   * Try to send `/ctcp <Tails_account_nick> COMMAND` from the other client to Pidgin:
124     - You should get no answer apart for the PING and VERSION commands
125       ([[!tails_ticket 5823]]).
126     - List of `/ctcp` commands, see [this page](http://www.wikkedwire.com/irccommands):
127       - PING
128       - VERSION
129       - FINGER
130       - USERINFO
131       - CLIENTINFO
132       - TIME
134 # Tor
136 (automate: [[!tails_ticket 7821]])
138 * The version of Tor should be the latest stable one, which is the highest version number
139   before alpha releases on <http://deb.torproject.org/torproject.org/pool/main/t/tor/>.
140 * Check that the firewall-level Tor enforcement is effective:
141   - check output of `iptables -L -n -v`
142   - check output of `iptables -t nat -L -n -v`
143   - try connecting to the Internet after unsetting `$http_proxy` and
144     `$HTTP_PROXY` using a piece of software that does not obey the
145     GNOME proxy settings, *and* is not explicitly torified in Tails:
146     
147                 unset http_proxy ; unset HTTP_PROXY
148                 wget --no-proxy http://monip.org/
149     
150     ... should only give you "Connection refused" error message.
151 * Check that IPv6 traffic is blocked:
152   - check output of `ip6tables -L -n`
153   - at a place with working IPv6: try connecting to a known-working
154     IPv6-enabled server on its IPv6 address over TCP and icmp6.
155 * After DHCP has been set up, `/etc/resolv.conf` must read `nameserver 127.0.0.1`.
156 * Before DHCP has been set up, `/etc/resolv.conf` must read `nameserver 127.0.0.1`.
157 * [[doc/first_steps/startup_options/bridge_mode]] should work:
158   1. Set up an administrator password.
159   1. Enable network configuration in Tails Greeter.
160   1. Configure a few bridges in Tor Launcher:
161      
162                 bridge 198.252.153.59:9001
163                 obfs2 198.252.153.59:16492
164                 obfs3 198.252.153.59:16493
165      
166   1. Use the Internet.
167   1. Check that the only outgoing direct network connections go to the
168      configured bridges:
169      
170                 sudo watch "netstat -taupen | grep ESTABLISHED"
172 * Verify that all destinations reached from an intensive Tails session
173   are tor routers or
174   authorities:
175   1. Boot Tails without the network in.
176   1. Set up an administration password.
177   1. Start dumping your whole session's network activity with `sudo
178      tcpdump -n -i any -w dump` (or better, do the dump on another machine,
179      or on the host OS if Tails is running in a VM).
180   1. Plug the network.
181   1. Wait for Tor to be functional.
182   1. Save `/var/lib/tor/cached-microdesc-consensus` out of the VM (it's needed
183      to analyze the network dump later on).
184   1. Do *a lot* of network stuff (why not run do this while doing all
185      the other tests **but** I2P and the unsafe browser, which would
186      show many false positives?)
187   1. Then check all destinations, e.g. by using tshark and the script below:
189          # set DUMP to the output of tcpdump above
190          DUMP=dump
191          # set CONSENSUS to Tor's consensus from the Tails session
192          CONSENSUS=cached-microdesc-consensus
193          NODES=$(mktemp)
194          awk '/^r / { print $6 }' ${CONSENSUS} > ${NODES}
195          # Note that these default directory authorities may change! To be
196          # sure, check in Tor's source, src/or/config.c:~900
197          DIR_AUTHS="
198          128.31.0.39
199          86.59.21.38
200          194.109.206.212
201          82.94.251.203
202          76.73.17.194
203          212.112.245.170
204          193.23.244.244
205          208.83.223.34
206          171.25.193.9
207          154.35.32.5
208          "
209          tshark -r ${DUMP} -T fields -e ip.dst | sort | uniq | \
210          while read x; do
211              ip_expr=$(echo ${x} | sed -e "s@\.@\\\.@g")
212              if echo ${DIR_AUTHS} | grep -qe "${ip_expr}"; then
213                  continue
214              fi
215              if ! grep -qe "^${ip_expr}$" ${NODES}; then
216                  echo "${x} is bad"
217              fi
218          done
219          rm ${NODES}
221      Note that this script will produce some false positives, like your
222      gateway, broadcasts, etc.
224 ## Stream isolation
226 See our [[stream isolation design
227 page|contribute/design/stream_isolation]] for details such as port
228 numbers, that are not duplicated here to avoid desynchronization.
230 Assumptions for the following tests: first, Tor stream isolation
231 features properly do their work; second, our `torrc` sets the right
232 `SocksPort` options to implement what we want.
234 **Note**: the following commands would advantageously be replaced with
235 the appropriate tcpdump or tshark filters.
237 * Make sure Claws Mail use its dedicated `SocksPort` when connecting
238   to IMAP / POP3 / SMTP servers:
240       sudo watch -n 0.1 'netstat -taupen | grep claws'
242 * Make sure these use the `SocksPort` dedicated for Tails-specific applications:
243   - htpdate — as root, run:
245         service htpdate stop \
246            && rm -f /var/run/htpdate/{done,success} \
247            && service htpdate start
249     ... with the following command running in another terminal:
251         sudo watch -n 0.1 'netstat -taupen | grep curl'
253   - security check — run `tails-security-check` with the following
254     command running in another terminal:
256         sudo watch -n 0.1 'netstat -taupen | grep perl'
258   - incremental upgrades — run `tails-upgrade-frontend-wrapper` with
259     the following command running in another terminal:
261         sudo watch -n 0.1 'netstat -taupen | grep perl'
263 * Make sure the Tor Browser uses its dedicated `SocksPort`: quit the Tor Browser
264   then start it with the following command running in another
265   terminal:
267       sudo watch -n 0.1 'netstat -taupen | grep firefox'
269 * Make sure other applications use the default system-wide
270   `SocksPort`:
271   - Polipo — run:
273         wget https://tails.boum.org/
275     ... with the following command running in another terminal:
277         sudo watch -n 0.1 'netstat -taupen | grep polipo'
279   - Gobby 0.5 — start Gobby 0.5 from the *Applications* menu and
280     connect to a server (for example `gobby.debian.org`), with the following command running in
281     another terminal:
283         sudo watch -n 0.1 'netstat -taupen | grep gobby'
285   - SSH — run (no need to authenticate the server or to login):
287         ssh lizard.tails.boum.org
289     ... with the following command running in another terminal:
291         sudo watch -n 0.1 'netstat -taupen | grep -E "connect-proxy|ssh"'
293   - whois — run:
295         whois example.com
297     ... with the following command running in another terminal:
299         sudo watch -n 0.1 'netstat -taupen | grep whois'
301 * Make sure a random application run using `torify` and `torsocks`
302   uses the default system-wide `SocksPort`. Run:
304       torify /usr/bin/gobby-0.5
306     ... and connect to a server (for example `gobby.debian.org`), with the following command running
307     in another terminal:
309         sudo watch -n 0.1 'netstat -taupen | grep gobby'
311     Then do the same test for:
313       torsocks /usr/bin/gobby-0.5
315 # Use of untrusted partitions
317 (automate: [[!tails_ticket 7822]])
319 * Is any local hard-disk swap partition used as swap?
320   boot on a (possibly virtual) machine that has a cleartext swap
321   partition not managed by LVM. To verify that a local GTP partition is swap,
322   check its type code with `sgdisk -p`, Linux swap is code 8200.
324   This swap partition must not be used by Tails. Run `cat /proc/swaps`.
326 * Is a persistence volume on a local hard-disk partition used?
327   (Hint: setup a libvirt USB disk with GPT and a partition labeled
328   `TailsData`, set the `removable` flag on it, check that
329   tails-greeter proposes to enable persistence. Then remove the
330   `removable` flag, and check that tails-greeter does not propose to
331   enable persistence anymore.)
333 # Claws
335 * Check mail over IMAP using:
336   - a "clearnet" IMAP server.
337   - a hidden service IMAP server (e.g. Riseup, zsolxunfmbfuq7wf.onion
338     with SSL).
339 * Send an email using:
340   - a "clearnet" SMTP server.
341   - a hidden service SMTP server (see above).
342 * Check that the profile works and is torified:
343   1. Send an email using Claws and a non-anonymizing SMTP relay (a
344      SMTP relay that writes the IP address of the client it is
345      relaying email for in the Received header).
346   1. Then check that email's headers once received, especially the
347      `Received:` one.
348 * Also check that the EHLO/HELO SMTP message is not leaking anything
349   at the application level:
350   1. Start Claws using the panel icon.
351   2. Disable SSL/TLS for SMTP in Claws (so take precautions for not
352      leaking your password in plaintext by either changing it
353      temporarily or using a disposable account).
354   3. Run `sudo tcpdump -n -i lo -w dump` to capture the packets before
355      Tor encrypts it, then close tcpdump
356   4. Check the dump for the HELO/EHLO message and
357      verify that it only contains `localhost`: `tcpdump -A -r dump`
358   5. Check the `Received:` and `Message-Id` fields in the received
359      message: it must not leak the hostname, nor the local IP.
361 # WhisperBack
363 * I should be able to send a bug report with WhisperBack.
364 * When we receive this bug report on the tails-bugs mailing-list,
365   Schleuder tells us that it was sent encrypted.
367 # Time
369 (automate: [[!tails_ticket 5836]])
371 1. Boot Tails without a network cable connected.
372    (e.g. `virsh domif-setlink tails-dev 52:54:00:05:17:62 down`.)
373 2. Set an administration password.
374 3. set the time to an obviously wrong one:
376            date --set="Mon, 01 Mar 2000 15:45:34 - 0800"
378 4. Connect the network cable.
379    (e.g. `virsh domif-setlink tails-dev 52:54:00:05:17:62 up`)
381 => the date should be corrected and Tor/Vidalia should start
382 correctly.
384 # Erase memory on shutdown
386 - `memlockd` must be running
387 - `udev-watchdog` must monitor the right device when booted off USB (automate: [[!tails_ticket 5560]])
388 - `udev-watchdog` must monitor the right device when booted off DVD (automate: [[!tails_ticket 5560]])
389 - After booting from DVD, remove Tails boot medium and check that the
390   memory erasure process is started (`Loading new kernel`, at least).
391   (automate: [[!tails_ticket 5472]])
392 - After booting from USB, remove Tails boot medium and check that the
393   memory erasure process is started (`Loading new kernel`, at least).
395 # Root access control
397 * Check you can login as root with `su` neither with the `amnesia` password nor
398   with the `live` one.
399 * Check that the `$TAILS_USER_PASSWORD` variable, if still existing in the system
400   environment after the boot has finished, does not contain the clear text
401   password.
403 # Virtualization support
405 * Test that Tails starts and the browser launches in VirtualBox.
407 # I2P
409 Make sure that I2P is up-to-date, at least if the
410 [changelogs](https://geti2p.net/en/blog/) mention that
411 security critical bugs were fixed.
413 Start I2P by appending `i2p` to the kernel command line.
415 * Check that I2P starts when a network interface is up:
416   - Within 30 seconds you should get the "I2P router console is ready"
417     pop-up
418   - Start the I2P Browser via "Applications -> Internet -> I2P Browser":
419     * You get the "Starting I2P Browser..." pop-up.
420     * The router console (<http://127.0.0.1:7657>) opens successfully
421       upon success.
422     * On exiting I2P Browser, check that its chroot gets properly torn
423       down on exit (there should be nothing mounted inside
424       `/var/lib/i2p-browser`).
425   - After a few minutes you should get the "I2P is ready" pop-up
426   - Go to <http://127.0.0.1:7657/i2ptunnelmgr> in the I2P Browser:
427     * You should get "Network: Hidden" in the "General" section.
428     * The numbers in the "Peers" section of the sidebar should be
429       non-zero.
430     * Check that you can reach some eepsites within Iceweasel, like
431       <http://i2p-projekt.i2p> and <http://forum.i2p>.
432   - Check that you can connect to the I2P IRC server through Pidgin
433     and the preconfigured IRC account on 127.0.0.1.
434 * Check I2P failure modes:
435   - Router console failure:
436     * Boot without network so I2P doesn't start automatically.
437     * Block the router console port: `nc -l -p 7657 -t 127.0.0.1`
438     * Plug the network
439     * You should get the "I2P failed to start" pop-up, and I2P should
440       not be running (check with `service i2p status`)
441   - Bootstrap failure:
442     * Detach the network immediately after getting the "I2P router
443       console is ready" pop-up
444     * Wait for up to six minutes
445     * You should get the "I2P is not ready" pop-up
446     * The I2P router console should still be accessible on
447       <http://127.0.0.1:7657>
449 # Git
451 * clone a repository over `git://`
453   git clone git://git.tails.boum.org/htp
455 * clone a repository over `https://`
457   git clone https://git-tails.immerda.ch/htp
459 * clone a repository over SSH
461 # SSH
463 * Connecting over SSH to a server on the Internet should work (and
464   appear in Vidalia's connections list).
465 * Connecting (by IP) over SSH to a server on the LAN should work.
466 * Connecting to a sftp server on the Internet using GNOME's "Connect
467   to a server" should work.
469 # APT
471      grep -r deb.tails.boum.org /etc/apt/sources.list*
473 * Make sure the Tails repository suite in matching the release tag (for example
474   the release version number) is in APT sources.
475 * Make sure the Tails repository unversioned suites (e.g. `testing`,
476   `stable` and `devel`) are *not* in APT sources.
478 <a id="incremental-upgrades"></a>
480 # Incremental upgrades
482 * List the versions from which an upgrade paths to this one is described.
483   In the `stable` or `testing` branch:
485       git grep -l "  version: '\?0.23'\?" wiki/src/upgrade/
487 * For each description file, open it and verify if it allows incremental upgrade
488   or only full upgrade.
490 * For each previous version from which an upgrade paths is described, install it
491   and try to upgrade:
492   * For every incremental upgrade path: make sure the resulting updated
493     system "works fine" (boots and pretends to be the correct version).
494   * For upgrade paths that only propose a full upgrade: make sure the
495     user is told to do a manual upgrade.
497   If:
498   
499   * the update-description files have been published on the
500     *alpha* channel already (see <https://tails.boum.org/upgrade/v1/Tails/>)
501   * and the IUK has been published already (see
502     <https://archive.torproject.org/amnesia.boum.org/tails/alpha/>
503     and <https://archive.torproject.org/amnesia.boum.org/tails/stable/>):
505   then:
506   
507         echo 'TAILS_CHANNEL="alpha"' | sudo tee --append /etc/os-release && \
508         tails-upgrade-frontend-wrapper
510   Else, use a local test setup:
512   * A web server on the LAN.
513   * A copy of `wiki/src/upgrade` from the `stable` or `testing` branch,
514     for example in `/var/www/tails/upgrade/v1/Tails/0.14~rc2/i386/stable/updates.yml`
515   * A copy of the `iuk` directory of our HTTP mirrors,
516     for example in `/var/www/tails/stable/iuk/Tails_i386_0.14-rc2_to_0.14.iuk`.
518     To synchronize your local copy:
520         torsocks rsync -rt --progress --delete rsync.torproject.org::amnesia-archive/tails/stable/iuk/ /var/www/tails/stable/iuk/
522   * Patch `/etc/hosts` in Tails to point to your web server:
524         echo "192.168.1.4    dl.amnesia.boum.org" | sudo tee --append /etc/hosts
526   * Patch sudo configuration to allow passing arbitrary arguments to
527     `tails-upgrade-frontend`:
529         sudo sed -i \
530             -e 's,/usr/bin/tails-upgrade-frontend ""$,/usr/bin/tails-upgrade-frontend,' \
531             /etc/sudoers.d/zzz_upgrade
533   * Call the upgrader must be called, from inside the system to upgrade,
534     with every needed option to use the local web server rather than the
535     online one, for example:
537         DISABLE_PROXY=1 SSL_NO_VERIFY=1 \
538         tails-upgrade-frontend-wrapper --override-baseurl \
539         http://192.168.1.4/tails
541 # Windows Camouflage
543 Enable Windows camouflage via the Tails Greeter checkbox and:
545 * Tails OpenPGP Applet's context menu should look readable
546 * The Tor Browser should use a Internet Explorer theme
547 * The Unsafe Browser has no scary red theme
549 # Unsafe Web Browser
551 (automate: [[!tails_ticket 7823]])
553 * On start, if no DNS server was configured in NetworkManager
554   (e.g. if there's no network connection), there must be an error.
555 * Once started, check that:
556   - the Tor Browser instance runs as the `clearnet` user.
557   - it has no proxy configured.
558   - no extensions are installed.
559   - there are no bookmarks except the default Firefox ones.
560 * On exit, check that:
561   - make sure that its chroot gets properly teared down on exit (there
562     should be nothing mounted inside `/var/lib/unsafe-browser`).
564 # Real (non-VM) hardware
566 `[can't-automate]`
568 * Boot on bare-metal on USB.
569 * Boot on bare-metal on DVD.
570 * Measure boot time (from syslinux menu the GNOME dektop ready - quickly press
571   enter in the greeter), then on some reference bare metal hardware, and
572   compare with previous version. The new one should not be significantly
573   slower to start.
575 # Documentation
577 * The "Tails documentation" desktop launcher should open the
578   [[getting started]] page (automate: [[!tails_ticket 8788]]):
579   - in English
580   - in one language to which the website is translated
581   - in one language to which the website is not translated (=> English)
582 * Browse around in the documentation shipped in the image. Internal
583   links should be fine.
585 # Internationalization
587 Boot and check basic functionality is working for every supported
588 language. You *really* have to reboot between each language.
590 * The chosen keyboard layout must be applied.
591 * The virtual keyboard must work and be auto-configured to use the same keyboard
592   layout as the X session.
593 * The Startpage search engine must be localized for the languages we ship a
594   search plugin for:
596       find /usr/local/lib/tor-browser/distribution/searchplugins/locale -iname startpage-*.xml
598 * The Wikipedia search engine must be localized for all languages.
600 ## Spellchecking
602 * Check that every supported language is listed in the list of languages for
603   spell checking.
604   - Visit <https://translate.google.com/>.
605   - Right-click and choose "Check spelling".
606   - Right-click and check the list of available languages.
607 * For a few languages, check the spell checking:
608   - Type something in the textarea.
609   - Right-click and select a language.
610   - Verify that the spelling suggestion are from that language.
611 * Once [[!tails_ticket 5962]] is fixed, the browser spelling dictionary must be
612   localized (for languages that are supported by our branding extension).
614 # Misc
616 * Check that Tails Greeter's "more options" screen displays properly
617   on a display with 600 px height, preferably in a language that's
618   more verbose than English (e.g. French).
619 * Check that all seems well during init (mostly that all services
620   start without errors), and that `/var/log/syslog` seems OK.
621 * MAT should be able to clean a PDF file, such as:
622   <http://examples.itextpdf.com/results/part3/chapter12/pdf_metadata.pdf>
623 * The Tails signing key shipped should be up-to-date (that is, neither it nor
624   one its subkeys must have expired, or be about to expire any time soon).
625   - `gpg --list-keys --with-colons 1202821CBE2CD9C1`
626 * The "Report an error" desktop launcher should open the [[support]]
627   page, both in English and in one language to which the website is
628   translated (automate: [[!tails_ticket 6904]]).
629 * One should be able to refresh the GnuPG keyring in Seahorse (with
630   the workaround documented in comment 4 on [[!tails_ticket 7051]],
631   until that ticket is fixed for real).