From 86d4186086aea0178002d7dcfa6d019cbbb0fa52 Mon Sep 17 00:00:00 2001
From: Emanuele Aina <emanuele.aina@collabora.com>
Date: Tue, 10 Sep 2019 13:00:55 +0200
Subject: [PATCH] Drop the audit.log reset steps

Most tests have been converted to use the system journal to check for audit
events, so there's no need to reset the audit.log anymore.

Resetting it is even harmful today since `auditd` is no longer shipped by
default on images, thus the step fails as the file and the directory that
should contain it do not exist.

Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com>
---
 test-cases/apparmor-bluez-avrcp-volume.yaml | 2 --
 test-cases/apparmor-utils.yaml              | 1 -
 test-cases/telepathy-ring-automated.yaml    | 1 -
 3 files changed, 4 deletions(-)

diff --git a/test-cases/apparmor-bluez-avrcp-volume.yaml b/test-cases/apparmor-bluez-avrcp-volume.yaml
index 1273e1f..ac7a517 100644
--- a/test-cases/apparmor-bluez-avrcp-volume.yaml
+++ b/test-cases/apparmor-bluez-avrcp-volume.yaml
@@ -54,8 +54,6 @@ run:
        otherwise false-negative might occur."
     - "Ensure Pulse Audio is activated:"
     - "$ pactl stat"
-    - "Clean the audit.log file, so no old entries are evaluated:"
-    - "$ echo -n | sudo tee /var/log/audit/audit.log"
     - "Get the bluetooth device address by running hcitool scan and in another
        terminal, execute:"
     - "$ /usr/lib/chaiwala-tests/bluez/test-avrcp.py -i hci0 <device_address>"
diff --git a/test-cases/apparmor-utils.yaml b/test-cases/apparmor-utils.yaml
index ea8e95e..711e276 100644
--- a/test-cases/apparmor-utils.yaml
+++ b/test-cases/apparmor-utils.yaml
@@ -54,7 +54,6 @@ run:
     - "# Enter test directory:"
     - cd apertis-tests
     - "# Run the the following commands:"
-    - echo -n | sudo tee /var/log/audit/audit.log
     - 'common/run-test-in-systemd --name=aa-enforce-test --timeout 90 -- sh /usr/lib/apparmor-utils-tests/aa-enforce-test.sh'
     - 'common/run-test-in-systemd --name=apparmor_parser --timeout 90 -- sh /usr/lib/apparmor-utils-tests/apparmor_parser.sh'
     - sudo journalctl -b -t audit -o cat | /usr/bin/aa_log_extract_tokens.sh ALLOWED DENIED
diff --git a/test-cases/telepathy-ring-automated.yaml b/test-cases/telepathy-ring-automated.yaml
index e694d71..6d70867 100644
--- a/test-cases/telepathy-ring-automated.yaml
+++ b/test-cases/telepathy-ring-automated.yaml
@@ -38,7 +38,6 @@ run:
     - "# Enter test directory:"
     - cd apertis-tests
     - "# Execute the following commands:"
-    - echo -n | sudo tee /var/log/audit/audit.log
     - common/run-test-in-systemd --user=user sdk/telepathy-ring-automated.sh
     - sudo journalctl -b -t audit -o cat | /usr/bin/aa_log_extract_tokens.sh ALLOWED DENIED
 
-- 
GitLab