From 6ba7755e52cdce58c54d16a9f147c4e001bfcec9 Mon Sep 17 00:00:00 2001 From: Sylvain Pineau Date: Tue, 20 Jan 2015 10:08:05 +0100 Subject: cherry-pick fix for https://bugs.launchpad.net/plainbox-provider-checkbox/+bug/1410501 --- jobs/suspend.txt.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jobs/suspend.txt.in b/jobs/suspend.txt.in index f58a9dac..55fe9574 100644 --- a/jobs/suspend.txt.in +++ b/jobs/suspend.txt.in @@ -798,14 +798,14 @@ requires: command: cat <<'EOF' | run_templates -s 'udev_resource | filter_templates -w "category=WIRELESS" | awk "/path: / { print \$2 }" | xargs -n 1 sh -c "for i in \`ls /sys\$0/net 2>/dev/null\`; do echo \$0 \$i; done"' plugin: shell - id: suspend/iperf_before_suspend_wifi_auto_$2 + id: suspend/iperf_after_suspend_wifi_auto_$2 depends: suspend/suspend_advanced requires: device.path == "$1" user: root environ: TEST_TARGET_FTP TEST_TARGET_IPERF TEST_USER TEST_PASS command: network test -i $2 -t iperf _description: - This test executes iperf connection performance/stability against all the ethernet devices found on the system before suspend. + This test executes iperf connection performance/stability against all the ethernet devices found on the system after suspend. EOF _description: This is an automated test to gather some info on the current state of your network devices. If no devices are found, the test will exit with an error. -- cgit v1.2.3 From ab1e4c212886fe6d109d9b7ae4a6d46f8a321ca9 Mon Sep 17 00:00:00 2001 From: Zygmunt Krynicki Date: Mon, 26 Jan 2015 16:05:53 +0100 Subject: providers:checkbox: run {poweroff,reboot} in the foreground This patch changes the pm_test script to run either poweroff(8) or reboot(8) commands in the foreground and then wait indefinitely until something kills the pm_test process. This prevents LP: #1413132 from occurring by letting plainbox wait until the script finishes (which it never does). This is a stop-gap measure until noreturn flag is implemented and understood by plainbox and all appropriate jobs are patched to use it. Fixes: https://bugs.launchpad.net/plainbox-provider-checkbox/+bug/1413134 Signed-off-by: Zygmunt Krynicki --- bin/pm_test | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/pm_test b/bin/pm_test index e4b8fc04..00753550 100755 --- a/bin/pm_test +++ b/bin/pm_test @@ -7,6 +7,7 @@ import re import shutil import subprocess import sys +import signal from argparse import ArgumentParser, SUPPRESS from calendar import timegm @@ -143,7 +144,11 @@ class PowerManagementOperation(object): logging.info('Executing new {0!r} operation...' .format(self.args.pm_operation)) logging.debug('Executing: {0!r}...'.format(command_str)) - subprocess.Popen(command_str, shell=True) + # The PM operation is performed asynchronously so let's just wait + # indefinitely until it happens and someone comes along to kill us. + # This addresses LP: #1413134 + subprocess.check_call(command_str, shell=True) + signal.pause() def summary(self): """ -- cgit v1.2.3 From 8174ab59393047191172878fd64c282fbb9cdc0e Mon Sep 17 00:00:00 2001 From: Zygmunt Krynicki Date: Mon, 26 Jan 2015 16:06:07 +0100 Subject: providers:checkbox: use python3 for auto-running pm_test This patch corrects auto-start machinery to use python3, not python2 to run the pm_test script. The pm_test script sets up automatic execution of itself to cyclic testing. The way it handles that is by creating an autostart file and by letting the current user run python as root. That was all correct when the script was originally written in python2.x, now with python3 it causes the script to fail. Fixes: https://bugs.launchpad.net/plainbox-provider-checkbox/+bug/1413222 Signed-off-by: Zygmunt Krynicki --- bin/pm_test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/pm_test b/bin/pm_test index 00753550..827758fa 100755 --- a/bin/pm_test +++ b/bin/pm_test @@ -574,7 +574,7 @@ class SudoersConfigurator(object): """ logging.debug('Enabling user to execute test as root...') command = ("sed -i -e '$a{mark}\\n" - "{user} ALL=NOPASSWD: /usr/bin/python' " + "{user} ALL=NOPASSWD: /usr/bin/python3' " "{filename}".format(mark=self.MARK, user=self.user, script=os.path.realpath(__file__), @@ -602,7 +602,7 @@ class AutoStartFile(object): [Desktop Entry] Name={pm_operation} test Comment=Verify {pm_operation} works properly -Exec=sudo /usr/bin/python {script} -r {repetitions} -w {wakeup} --hardware-delay {hardware_delay} --pm-delay {pm_delay} --min-pm-time {min_pm_time} --max-pm-time {max_pm_time} --append --total {total} --start {start} --pm-timestamp {pm_timestamp} {silent} --log-level={log_level} --log-dir={log_dir} {pm_operation} +Exec=sudo /usr/bin/python3 {script} -r {repetitions} -w {wakeup} --hardware-delay {hardware_delay} --pm-delay {pm_delay} --min-pm-time {min_pm_time} --max-pm-time {max_pm_time} --append --total {total} --start {start} --pm-timestamp {pm_timestamp} {silent} --log-level={log_level} --log-dir={log_dir} {pm_operation} Type=Application X-GNOME-Autostart-enabled=true Hidden=false -- cgit v1.2.3 From e6d2c1089845cd0e3e32993994af511672e85915 Mon Sep 17 00:00:00 2001 From: Rod Smith Date: Mon, 26 Jan 2015 16:06:20 +0100 Subject: Changed ethernet/info_automated test definition to not rely on Network Manager --- jobs/ethernet.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/ethernet.txt.in b/jobs/ethernet.txt.in index 4d47afdd..1e676a71 100644 --- a/jobs/ethernet.txt.in +++ b/jobs/ethernet.txt.in @@ -11,7 +11,7 @@ _description: Test to detect the available network controllers plugin: shell id: ethernet/info_automated requires: - package.name == 'network-manager' + executable.name == 'ip' device.category == 'NETWORK' command: udev_resource | filter_templates -w "category=NETWORK"| awk "/path: / { print \$2 }"| xargs -n 1 sh -c "for i in \`ls /sys\$0/net 2>/dev/null\`; do network_info \$i; done" estimated_duration: 30.0 -- cgit v1.2.3 From 3c507cb9d5f6f4b6271fed6d166560734b898bf0 Mon Sep 17 00:00:00 2001 From: Roxanne Fan Date: Mon, 26 Jan 2015 16:06:34 +0100 Subject: fix poweroff_30_log dependency --- jobs/stress.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/stress.txt.in b/jobs/stress.txt.in index 0eb374ae..98f96d1e 100644 --- a/jobs/stress.txt.in +++ b/jobs/stress.txt.in @@ -213,7 +213,7 @@ _description: plugin: attachment id: stress/poweroff_30_log -depends: stress/poweroff +depends: stress/poweroff_30 command: tar cvfz $PLAINBOX_SESSION_SHARE/stress_poweroff_30.tgz $PLAINBOX_SESSION_SHARE/*poweroff.30.log && cat $PLAINBOX_SESSION_SHARE/stress_poweroff_30.tgz plugin: shell -- cgit v1.2.3 From 4703eed7fde9fe0c840e8442625be3cf2f01ecdd Mon Sep 17 00:00:00 2001 From: Sylvain Pineau Date: Mon, 26 Jan 2015 16:25:29 +0100 Subject: providers/plainbox-provider-checkbox: increment version to 0.19.dev --- manage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manage.py b/manage.py index 2432aa67..60dfedca 100755 --- a/manage.py +++ b/manage.py @@ -4,7 +4,7 @@ from plainbox.provider_manager import N_ setup( name='2013.com.canonical.certification:checkbox', - version="0.18", + version="0.19", description=N_("Checkbox provider"), gettext_domain='plainbox-provider-checkbox', strict=False, deprecated=False, -- cgit v1.2.3