d/t/test-initscripts fix false positive in adt 58/2358/1
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>
Fri, 12 Aug 2016 10:49:25 +0000 (12:49 +0200)
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>
Fri, 12 Aug 2016 10:53:18 +0000 (12:53 +0200)
Due to recent upgrades some commands of the reset function can fail
if the service wasn't loaded before.
But in that case no reset has to be done, so make it non fatal by adding
a ||/bin/true

Change-Id: I1da6bf315eefc9a4348c8dbae09d534a8fab9355
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
debian/tests/test-initscripts

index f465d6d..069c57b 100644 (file)
@@ -88,8 +88,8 @@ resetservice() {
     echo 3 > /proc/sys/vm/drop_caches
 
     # stopping and resetting Service
-    systemctl stop dpdk.service
-    systemctl reset-failed dpdk.service
+    systemctl stop dpdk.service || /bin/true
+    systemctl reset-failed dpdk.service || /bin/true
 
     echo "Unmounting all potential hugetlbfs mounts"
     awk '/hugetlbfs/ {print $2}' /proc/mounts | while read hugetlbmount; do