Skip to contentSkip to conversation

lxc: make error report compatible with ptest

PATCH In review Sinan Kaya 2 participants 4 messages Oct 12, 2018 – Oct 16, 2018

lore
Share & tools
lore

Sinan Kaya

author
#0 lore raw

PATCH 1/1 lxc: make error report compatible with ptest

ptest puts the test status at the beginning of the test. Follow the style.

BEGIN: /usr/lib/lxc/ptest
### Starting LXC ptest ###
SKIPPED: lxc-test-apparmor
FAIL: lxc-test-attach
PASS: lxc-test-automount
FAIL: lxc-test-autostart
PASS: lxc-test-cgpath
PASS: lxc-test-cloneconfig
PASS: lxc-test-clonetest
PASS: lxc-test-concurrent
FAIL: lxc-test-console
PASS: lxc-test-containertests
PASS: lxc-test-createconfig
FAIL: lxc-test-createtest
FAIL: lxc-test-destroytest
PASS: lxc-test-device-add-remove
PASS: lxc-test-get_item
PASS: lxc-test-getkeys
PASS: lxc-test-list
PASS: lxc-test-locktests
PASS: lxc-test-lxcpath
PASS: lxc-test-may-control
PASS: lxc-test-reboot
PASS: lxc-test-saveconfig
SKIPPED: lxc-test-shutdowntest
PASS: lxc-test-snapshot
PASS: lxc-test-startone
PASS: lxc-test-utils

Results:
PASSED = 19
FAILED = 5
SKIPPED = 2
(for details check individual test log in ./logs directory)

### LXC ptest complete ###
END: /usr/lib/lxc/ptest

---
 recipes-containers/lxc/files/run-ptest | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
recipes-containers/lxc/files/run-ptest +3 -3
index e98554497..3f3a75f25 100644
@@ -29,17 +29,17 @@ do
     then
 	$test >logs/$(basename $test).log 2>&1
     else
-	echo "$test SKIPPED"
+	echo "SKIPPED: $(basename $test)"
 	skipped=$((skipped+1))
 	continue
     fi
 
     if [ $? -eq 0 ]
     then
-	echo "$test PASS"
+	echo "PASS: $(basename $test)"
 	passed=$((passed+1))
     else
-	echo "$test FAIL"
+	echo "FAIL: $(basename $test)"
 	failed=$((failed+1))
     fi
 done
Signature · 1 line
2.19.0
#1 lore raw

This is something that should go into master, not the -stable branches.

We could do a backport if really required, but it does need to merge to master first.

I assume it does also apply to master, but I'd like to hear your confirmation.

Bruce

Quoted 80 lines · Sinan Kaya

ptest puts the test status at the beginning of the test. Follow the style.

BEGIN: /usr/lib/lxc/ptest
### Starting LXC ptest ###
SKIPPED: lxc-test-apparmor
FAIL: lxc-test-attach
PASS: lxc-test-automount
FAIL: lxc-test-autostart
PASS: lxc-test-cgpath
PASS: lxc-test-cloneconfig
PASS: lxc-test-clonetest
PASS: lxc-test-concurrent
FAIL: lxc-test-console
PASS: lxc-test-containertests
PASS: lxc-test-createconfig
FAIL: lxc-test-createtest
FAIL: lxc-test-destroytest
PASS: lxc-test-device-add-remove
PASS: lxc-test-get_item
PASS: lxc-test-getkeys
PASS: lxc-test-list
PASS: lxc-test-locktests
PASS: lxc-test-lxcpath
PASS: lxc-test-may-control
PASS: lxc-test-reboot
PASS: lxc-test-saveconfig
SKIPPED: lxc-test-shutdowntest
PASS: lxc-test-snapshot
PASS: lxc-test-startone
PASS: lxc-test-utils

Results:
PASSED = 19
FAILED = 5
SKIPPED = 2
(for details check individual test log in ./logs directory)

### LXC ptest complete ###
END: /usr/lib/lxc/ptest

---
 recipes-containers/lxc/files/run-ptest | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
recipes-containers/lxc/files/run-ptest +3 -4
index e98554497..3f3a75f25 100644
@@ -29,17 +29,17 @@ do
     then
        $test >logs/$(basename $test).log 2>&1
     else
-       echo "$test SKIPPED"
+       echo "SKIPPED: $(basename $test)"
        skipped=$((skipped+1))
        continue
     fi
 
     if [ $? -eq 0 ]
     then
-       echo "$test PASS"
+       echo "PASS: $(basename $test)"
        passed=$((passed+1))
     else
-       echo "$test FAIL"
+       echo "FAIL: $(basename $test)"
        failed=$((failed+1))
     fi
 done
--

2.19.0

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
author
#2 lore raw
Quoted 7 lines · Bruce Ashfield

This is something that should go into master, not the -stable branches.

We could do a backport if really required, but it does need to merge to master first.

I assume it does also apply to master, but I'd like to hear your confirmation.

Yes, it applies to both. I tested it.

Quoted 1 line

Bruce

#3 lore raw

Thanks. This is now in master and sumo.

Bruce

Quoted 14 lines · Sinan Kaya
Quoted 7 lines · Bruce Ashfield

This is something that should go into master, not the -stable branches.

We could do a backport if really required, but it does need to merge to master first.

I assume it does also apply to master, but I'd like to hear your confirmation.

Yes, it applies to both. I tested it.

Quoted 1 line

Bruce

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"