diff -ruN b/lib/adt_run_args.py a/lib/adt_run_args.py --- b/lib/adt_run_args.py 2016-02-23 21:56:50.000000000 +0500 +++ a/lib/adt_run_args.py 2016-03-07 03:03:50.501283948 +0500 @@ -282,6 +282,8 @@ g_setup.add_argument('--env', metavar='VAR=value', action='append', default=[], help='Set arbitrary environment variable for builds and test') + g_setup.add_argument('--no-restore-apparmor-click', action='store_true', + help='Don\'t restore apparmor rules after test run') # privileges g_priv = parser.add_argument_group('user/privilege handling options') diff -ruN b/lib/adt_testbed.py a/lib/adt_testbed.py --- b/lib/adt_testbed.py 2016-02-23 21:56:50.000000000 +0500 +++ a/lib/adt_testbed.py 2016-03-07 02:32:59.185262055 +0500 @@ -864,7 +864,7 @@ adtlog.info(' - - - - - - - - - - running shell - - - - - - - - - -') self.command('shell', [cwd or '/'] + self.install_tmp_env) - def run_test(self, tree, test, extra_env=[], shell_on_failure=False, shell=False): + def run_test(self, tree, test, extra_env=[], shell_on_failure=False, shell=False, no_restore_apparmor_click=False): '''Run given test in testbed tree (a Path) is the source tree root. @@ -1083,7 +1083,7 @@ if shell or (shell_on_failure and not test.result): self.run_shell(tree.tb) - if need_click_restore: + if not no_restore_apparmor_click and need_click_restore: self.apparmor_restore_click(test.clicks, test.installed_clicks) else: adtlog.debug('no need to restore click AppArmor profiles') Binary files b/lib/__pycache__/adt_binaries.cpython-34.pyc and a/lib/__pycache__/adt_binaries.cpython-34.pyc differ Binary files b/lib/__pycache__/adtlog.cpython-34.pyc and a/lib/__pycache__/adtlog.cpython-34.pyc differ Binary files b/lib/__pycache__/adt_run_args.cpython-34.pyc and a/lib/__pycache__/adt_run_args.cpython-34.pyc differ Binary files b/lib/__pycache__/adt_testbed.cpython-34.pyc and a/lib/__pycache__/adt_testbed.cpython-34.pyc differ Binary files b/lib/__pycache__/testdesc.cpython-34.pyc and a/lib/__pycache__/testdesc.cpython-34.pyc differ Binary files b/lib/__pycache__/VirtSubproc.cpython-34.pyc and a/lib/__pycache__/VirtSubproc.cpython-34.pyc differ diff -ruN b/runner/adt-run a/runner/adt-run --- b/runner/adt-run 2016-02-23 21:56:50.000000000 +0500 +++ a/runner/adt-run 2016-03-07 03:05:39.213285233 +0500 @@ -148,7 +148,8 @@ binaries.publish() testbed.install_deps(t.depends, 'needs-recommends' in t.restrictions) - testbed.run_test(tree, t, opts.env, opts.shell_fail, opts.shell) + testbed.run_test(tree, t, opts.env, opts.shell_fail, opts.shell, + opts.no_restore_apparmor_click) if not t.result: errorcode |= 4 if 'breaks-testbed' in t.restrictions: