GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Unverified Commit 84329bda authored by boklm's avatar boklm
Browse files

Fix tests indentation

parent 0b106637
......@@ -56,297 +56,297 @@ sub description {
our @tests = (
{
name => 'readelf_RELRO',
fail_type => 'warning',
type => 'command',
descr => 'Check if binaries are RELocation Read-Only',
files => \&tbb_binfiles,
command => [ 'readelf', '-ld' ],
check_output => sub { ( $_[0] =~ m/GNU_RELRO/ )
&& ( $_[0] =~ m/BIND_NOW/ ) },
enable => sub { $OSNAME eq 'linux' },
name => 'readelf_RELRO',
fail_type => 'warning',
type => 'command',
descr => 'Check if binaries are RELocation Read-Only',
files => \&tbb_binfiles,
command => [ 'readelf', '-ld' ],
check_output => sub { ( $_[0] =~ m/GNU_RELRO/ )
&& ( $_[0] =~ m/BIND_NOW/ ) },
enable => sub { $OSNAME eq 'linux' },
},
{
name => 'readelf_stack_canary',
fail_type => 'warning',
type => 'command',
descr => 'Check for stack canary support',
files => \&tbb_binfiles,
command => [ 'readelf', '-s' ],
check_output => sub { $_[0] =~ m/__stack_chk_fail/ },
enable => sub { $OSNAME eq 'linux' },
name => 'readelf_stack_canary',
fail_type => 'warning',
type => 'command',
descr => 'Check for stack canary support',
files => \&tbb_binfiles,
command => [ 'readelf', '-s' ],
check_output => sub { $_[0] =~ m/__stack_chk_fail/ },
enable => sub { $OSNAME eq 'linux' },
},
{
name => 'readelf_NX',
type => 'command',
descr => 'Check for NX support',
files => \&tbb_binfiles,
command => [ 'readelf', '-W', '-l' ],
check_output => sub { ! ($_[0] =~ m/GNU_STACK.+RWE/) },
enable => sub { $OSNAME eq 'linux' },
name => 'readelf_NX',
type => 'command',
descr => 'Check for NX support',
files => \&tbb_binfiles,
command => [ 'readelf', '-W', '-l' ],
check_output => sub { ! ($_[0] =~ m/GNU_STACK.+RWE/) },
enable => sub { $OSNAME eq 'linux' },
},
{
name => 'readelf_PIE',
type => 'command',
descr => 'Check for PIE support',
files => \&tbb_binfiles,
command => [ 'readelf', '-h' ],
check_output => sub { $_[0] =~ m/Type:\s+DYN/ },
enable => sub { $OSNAME eq 'linux' },
name => 'readelf_PIE',
type => 'command',
descr => 'Check for PIE support',
files => \&tbb_binfiles,
command => [ 'readelf', '-h' ],
check_output => sub { $_[0] =~ m/Type:\s+DYN/ },
enable => sub { $OSNAME eq 'linux' },
},
{
name => 'readelf_no_rpath',
fail_type => 'warning',
type => 'command',
descr => 'Check for no rpath',
files => \&tbb_binfiles,
command => [ 'readelf', '-d' ],
check_output => sub { ! ( $_[0] =~ m/RPATH/ ) },
enable => sub { $OSNAME eq 'linux' },
name => 'readelf_no_rpath',
fail_type => 'warning',
type => 'command',
descr => 'Check for no rpath',
files => \&tbb_binfiles,
command => [ 'readelf', '-d' ],
check_output => sub { ! ( $_[0] =~ m/RPATH/ ) },
enable => sub { $OSNAME eq 'linux' },
},
{
name => 'readelf_no_runpath',
type => 'command',
descr => 'Check for no runpath',
files => \&tbb_binfiles,
command => [ 'readelf', '-d' ],
check_output => sub { ! ( $_[0] =~ m/runpath/ ) },
enable => sub { $OSNAME eq 'linux' },
name => 'readelf_no_runpath',
type => 'command',
descr => 'Check for no runpath',
files => \&tbb_binfiles,
command => [ 'readelf', '-d' ],
check_output => sub { ! ( $_[0] =~ m/runpath/ ) },
enable => sub { $OSNAME eq 'linux' },
},
{
name => 'tor_httpproxy',
type => 'tor_bootstrap',
descr => 'Access tor using an http proxy',
httpproxy => 1,
enable => sub { $OSNAME eq 'linux' },
name => 'tor_httpproxy',
type => 'tor_bootstrap',
descr => 'Access tor using an http proxy',
httpproxy => 1,
enable => sub { $OSNAME eq 'linux' },
},
{
name => 'tor_bridge',
type => 'tor_bootstrap',
descr => 'Access tor using a bridge',
enable => sub { $OSNAME eq 'linux' },
name => 'tor_bridge',
type => 'tor_bootstrap',
descr => 'Access tor using a bridge',
enable => sub { $OSNAME eq 'linux' },
},
{
name => 'tor_bridge_httpproxy',
type => 'tor_bootstrap',
descr => 'Access tor using a bridge and an http proxy',
httpproxy => 1,
enable => sub { $OSNAME eq 'linux' },
name => 'tor_bridge_httpproxy',
type => 'tor_bootstrap',
descr => 'Access tor using a bridge and an http proxy',
httpproxy => 1,
enable => sub { $OSNAME eq 'linux' },
},
{
name => 'tor_obfs3',
type => 'tor_bootstrap',
descr => 'Access tor using obfs3',
enable => sub { $OSNAME eq 'linux' },
name => 'tor_obfs3',
type => 'tor_bootstrap',
descr => 'Access tor using obfs3',
enable => sub { $OSNAME eq 'linux' },
},
{
name => 'tor_obfs3_httpproxy',
type => 'tor_bootstrap',
descr => 'Access tor using obfs3 and an http proxy',
httpproxy => 1,
enable => sub { $OSNAME eq 'linux' },
name => 'tor_obfs3_httpproxy',
type => 'tor_bootstrap',
descr => 'Access tor using obfs3 and an http proxy',
httpproxy => 1,
enable => sub { $OSNAME eq 'linux' },
},
{
name => 'tor_obfs4',
type => 'tor_bootstrap',
descr => 'Access tor using obfs4',
enable => sub { $OSNAME eq 'linux' && $_[0]->{version} !~ m/^4.0/ },
name => 'tor_obfs4',
type => 'tor_bootstrap',
descr => 'Access tor using obfs4',
enable => sub { $OSNAME eq 'linux' && $_[0]->{version} !~ m/^4.0/ },
},
{
name => 'tor_obfs4_httpproxy',
type => 'tor_bootstrap',
descr => 'Access tor using obfs4 and an http proxy',
httpproxy => 1,
enable => sub { $OSNAME eq 'linux' && $_[0]->{version} !~ m/^4.0/ },
name => 'tor_obfs4_httpproxy',
type => 'tor_bootstrap',
descr => 'Access tor using obfs4 and an http proxy',
httpproxy => 1,
enable => sub { $OSNAME eq 'linux' && $_[0]->{version} !~ m/^4.0/ },
},
{
name => 'tor_fte',
type => 'tor_bootstrap',
descr => 'Access tor using fteproxy',
enable => sub { $OSNAME eq 'linux' },
name => 'tor_fte',
type => 'tor_bootstrap',
descr => 'Access tor using fteproxy',
enable => sub { $OSNAME eq 'linux' },
},
{
name => 'tor_fte_httpproxy',
type => 'tor_bootstrap',
descr => 'Access tor using fteproxy and an http proxy',
httpproxy => 1,
enable => sub { $OSNAME eq 'linux' },
name => 'tor_fte_httpproxy',
type => 'tor_bootstrap',
descr => 'Access tor using fteproxy and an http proxy',
httpproxy => 1,
enable => sub { $OSNAME eq 'linux' },
},
{
name => 'tor_bootstrap',
type => 'tor_bootstrap',
descr => 'Check that we can bootstrap tor',
fail_type => 'fatal',
name => 'tor_bootstrap',
type => 'tor_bootstrap',
descr => 'Check that we can bootstrap tor',
fail_type => 'fatal',
no_kill => 1,
use_default_config => 1,
no_kill => 1,
},
{
name => 'screenshots',
type => 'mozmill',
descr => 'Take some screenshots',
name => 'screenshots',
type => 'mozmill',
descr => 'Take some screenshots',
},
{
name => 'check',
type => 'selenium',
use_net => 1,
descr => 'Check that http://check.torproject.org/ think we are using tor',
name => 'check',
type => 'selenium',
use_net => 1,
descr => 'Check that http://check.torproject.org/ think we are using tor',
},
{
name => 'https-everywhere',
type => 'mozmill',
use_net => 1,
descr => 'Check that https everywhere is enabled and working',
name => 'https-everywhere',
type => 'mozmill',
use_net => 1,
descr => 'Check that https everywhere is enabled and working',
},
{
name => 'https-everywhere-disabled',
type => 'mozmill',
descr => 'Check that https everywhere is not doing anything when disabled',
use_net => 1,
pre => sub { toggle_https_everywhere($_[0], 0) },
post => sub { toggle_https_everywhere($_[0], 1) },
name => 'https-everywhere-disabled',
type => 'mozmill',
descr => 'Check that https everywhere is not doing anything when disabled',
use_net => 1,
pre => sub { toggle_https_everywhere($_[0], 0) },
post => sub { toggle_https_everywhere($_[0], 1) },
},
{
name => 'settings',
type => 'mozmill',
descr => 'Check that some important settings are correctly set',
name => 'settings',
type => 'mozmill',
descr => 'Check that some important settings are correctly set',
},
{
name => 'acid3',
type => 'mozmill',
descr => 'acid3 tests',
use_net => 1,
name => 'acid3',
type => 'mozmill',
descr => 'acid3 tests',
use_net => 1,
},
{
name => 'slider_settings_1',
mozmill_test => 'slider_settings',
type => 'mozmill',
descr => 'Check that settings are set according to security slider mode',
slider_mode => 1,
pre => \&set_slider_mode,
post => \&reset_slider_mode,
enable => sub { $_[0]->{version} !~ m/^4.0/ },
name => 'slider_settings_1',
mozmill_test => 'slider_settings',
type => 'mozmill',
descr => 'Check that settings are set according to security slider mode',
slider_mode => 1,
pre => \&set_slider_mode,
post => \&reset_slider_mode,
enable => sub { $_[0]->{version} !~ m/^4.0/ },
},
{
name => 'slider_settings_2',
mozmill_test => 'slider_settings',
type => 'mozmill',
descr => 'Check that settings are set according to security slider mode',
slider_mode => 2,
pre => \&set_slider_mode,
post => \&reset_slider_mode,
enable => sub { $_[0]->{version} !~ m/^4.0/ },
name => 'slider_settings_2',
mozmill_test => 'slider_settings',
type => 'mozmill',
descr => 'Check that settings are set according to security slider mode',
slider_mode => 2,
pre => \&set_slider_mode,
post => \&reset_slider_mode,
enable => sub { $_[0]->{version} !~ m/^4.0/ },
},
{
name => 'slider_settings_3',
mozmill_test => 'slider_settings',
type => 'mozmill',
descr => 'Check that settings are set according to security slider mode',
slider_mode => 3,
pre => \&set_slider_mode,
post => \&reset_slider_mode,
enable => sub { $_[0]->{version} !~ m/^4.0/ },
name => 'slider_settings_3',
mozmill_test => 'slider_settings',
type => 'mozmill',
descr => 'Check that settings are set according to security slider mode',
slider_mode => 3,
pre => \&set_slider_mode,
post => \&reset_slider_mode,
enable => sub { $_[0]->{version} !~ m/^4.0/ },
},
{
name => 'slider_settings_4',
mozmill_test => 'slider_settings',
type => 'mozmill',
descr => 'Check that settings are set according to security slider mode',
slider_mode => 4,
pre => \&set_slider_mode,
post => \&reset_slider_mode,
enable => sub { $_[0]->{version} !~ m/^4.0/ },
name => 'slider_settings_4',
mozmill_test => 'slider_settings',
type => 'mozmill',
descr => 'Check that settings are set according to security slider mode',
slider_mode => 4,
pre => \&set_slider_mode,
post => \&reset_slider_mode,
enable => sub { $_[0]->{version} !~ m/^4.0/ },
},
{
name => 'dom-objects-enumeration',
type => 'mozmill',
descr => 'Check the list of DOM Objects exposed in the global namespace',
name => 'dom-objects-enumeration',
type => 'mozmill',
descr => 'Check the list of DOM Objects exposed in the global namespace',
},
{
name => 'navigation-timing',
type => 'mozmill',
descr => 'Check that the Navigation Timing API is really disabled',
use_net => 1,
name => 'navigation-timing',
type => 'mozmill',
descr => 'Check that the Navigation Timing API is really disabled',
use_net => 1,
},
{
name => 'resource-timing',
type => 'mozmill',
descr => 'Check that the Resource Timing API is really disabled',
use_net => 1,
name => 'resource-timing',
type => 'mozmill',
descr => 'Check that the Resource Timing API is really disabled',
use_net => 1,
},
{
name => 'searchengines',
type => 'mozmill',
descr => 'Check that we have the default search engines set',
name => 'searchengines',
type => 'mozmill',
descr => 'Check that we have the default search engines set',
},
{
name => 'noscript',
type => 'mozmill',
descr => 'Check that noscript options are working',
use_net => 1,
prefs => {
name => 'noscript',
type => 'mozmill',
descr => 'Check that noscript options are working',
use_net => 1,
prefs => {
'extensions.torbutton.security_slider' => 2,
},
enable => sub { $_[0]->{version} !~ m/^4.0/ },
enable => sub { $_[0]->{version} !~ m/^4.0/ },
},
{
name => 'fp_screen_dimensions',
type => 'selenium',
descr => 'Check that screen dimensions are spoofed correctly',
name => 'fp_screen_dimensions',
type => 'selenium',
descr => 'Check that screen dimensions are spoofed correctly',
},
{
name => 'fp_screen_coords',
type => 'selenium',
descr => 'Check that screenX, screenY, screenLeft, screenTop, mozInnerScreenX, mozInnerScreenY are 0',
name => 'fp_screen_coords',
type => 'selenium',
descr => 'Check that screenX, screenY, screenLeft, screenTop, mozInnerScreenX, mozInnerScreenY are 0',
},
{
name => 'fp_plugins',
type => 'selenium',
descr => 'Check that plugins are disabled',
name => 'fp_plugins',
type => 'selenium',
descr => 'Check that plugins are disabled',
},
{
name => 'fp_useragent',
type => 'selenium',
descr => 'Check that userAgent is as expected',
name => 'fp_useragent',
type => 'selenium',
descr => 'Check that userAgent is as expected',
}, {
name => 'fp_navigator',
type => 'selenium',
descr => 'Check that navigator properties are as expected',
},
{
name => 'play_videos',
type => 'mozmill',
descr => 'Play some videos',
use_net => 1,
mozmill_test => 'test_page',
remote => 1,
timeout => 50000,
interval => 100,
},
{
name => 'svg-disable',
type => 'mozmill',
descr => 'Check if disabling svg is working',
mozmill_test => 'svg',
svg_enabled => 0,
use_net => 1,
prefs => {
name => 'fp_navigator',
type => 'selenium',
descr => 'Check that navigator properties are as expected',
},
{
name => 'play_videos',
type => 'mozmill',
descr => 'Play some videos',
use_net => 1,
mozmill_test => 'test_page',
remote => 1,
timeout => 50000,
interval => 100,
},
{
name => 'svg-disable',
type => 'mozmill',
descr => 'Check if disabling svg is working',
mozmill_test => 'svg',
svg_enabled => 0,
use_net => 1,
prefs => {
'extensions.torbutton.security_custom' => 'true',
'svg.in-content.enabled' => 'false',
},
enable => sub { $OSNAME eq 'linux' },
enable => sub { $OSNAME eq 'linux' },
},
{
name => 'svg-enable',
type => 'mozmill',
descr => 'Check if enabling svg is working',
mozmill_test => 'svg',
use_net => 1,
svg_enabled => 1,
prefs => {
name => 'svg-enable',
type => 'mozmill',
descr => 'Check if enabling svg is working',
mozmill_test => 'svg',
use_net => 1,
svg_enabled => 1,
prefs => {
'extensions.torbutton.security_custom' => 'true',
'svg.in-content.enabled' => 'true',
},
enable => sub { $OSNAME eq 'linux' },
enable => sub { $OSNAME eq 'linux' },
},
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment