All of lore.kernel.org
 help / color / mirror / Atom feed
* [OSSTEST PATCH 1/3] ms-planner: Ignore freely-shareable resources
@ 2016-10-06 12:14 Ian Jackson
  2016-10-06 12:14 ` [OSSTEST PATCH 2/3] ms-planner: Improve an error message Ian Jackson
  2016-10-06 12:14 ` [OSSTEST PATCH 3/3] sg-report-flight: Avoid some warnings when reporting unexecuted jobs Ian Jackson
  0 siblings, 2 replies; 3+ messages in thread
From: Ian Jackson @ 2016-10-06 12:14 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

Resource shares with no resource_sharing entry are freely shareable
and do not need the planning system.  Indeed, they currently break the
planner.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 ms-planner | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ms-planner b/ms-planner
index bce6e13..8106544 100755
--- a/ms-planner
+++ b/ms-planner
@@ -71,6 +71,12 @@ sub allocations ($$) {
                        ON owntaskid = taskid
 		    WHERE NOT (tasks.type='magic' AND
                                tasks.refkey='allocatable')
+                      AND NOT (resources.restype like 'share-%'
+                           AND NOT EXISTS (
+ SELECT 1 FROM resource_sharing sh
+         WHERE sh.restype = substring(resources.restype from 7)
+           AND sh.resname = resources.resname
+                                          ))
 END
         $resources_q->execute();
 	while (my $row= $resources_q->fetchrow_hashref()) {
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [OSSTEST PATCH 2/3] ms-planner: Improve an error message
  2016-10-06 12:14 [OSSTEST PATCH 1/3] ms-planner: Ignore freely-shareable resources Ian Jackson
@ 2016-10-06 12:14 ` Ian Jackson
  2016-10-06 12:14 ` [OSSTEST PATCH 3/3] sg-report-flight: Avoid some warnings when reporting unexecuted jobs Ian Jackson
  1 sibling, 0 replies; 3+ messages in thread
From: Ian Jackson @ 2016-10-06 12:14 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 ms-planner | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ms-planner b/ms-planner
index 8106544..22f9806 100755
--- a/ms-planner
+++ b/ms-planner
@@ -331,7 +331,7 @@ END
 	my ($reso, $shareix) = ($`, $1);
 
 	my $share= $currentshare{$reso};
-	die Dumper($reskey, $reso, $shareix,
+	die "BAD SHARE ".Dumper($reskey, $reso, $shareix,
 		   $plan->{Allocations}{$reskey}, $currentshare{$reso})
 	    unless !!$share == !!$shareix;
 
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [OSSTEST PATCH 3/3] sg-report-flight: Avoid some warnings when reporting unexecuted jobs
  2016-10-06 12:14 [OSSTEST PATCH 1/3] ms-planner: Ignore freely-shareable resources Ian Jackson
  2016-10-06 12:14 ` [OSSTEST PATCH 2/3] ms-planner: Improve an error message Ian Jackson
@ 2016-10-06 12:14 ` Ian Jackson
  1 sibling, 0 replies; 3+ messages in thread
From: Ian Jackson @ 2016-10-06 12:14 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

If no steps in a job are executed, there can be a failure with a
synthetic step row, containing a stepno of ''.  This causes a perl
warning when compared with <=>:
  Argument "" isn't numeric in numeric comparison (<=>) at ./sg-report-flight line 774.

Fix this by replacing falseish values with 0.

Bug introduced in 0e09a8b00ec6 "sg-report-flight: Report earlier,
earlier step failures".

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 sg-report-flight | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sg-report-flight b/sg-report-flight
index dbb17be..c66525b 100755
--- a/sg-report-flight
+++ b/sg-report-flight
@@ -774,7 +774,7 @@ END
 
     @failures= sort {
 	$a->{DurationEstimate} <=> $b->{DurationEstimate}
-	or $a->{Step}{stepno} <=> $b->{Step}{stepno}
+	or ($a->{Step}{stepno} || 0) <=> ($b->{Step}{stepno} || 0)
 	# stepno is sequential only within each job, so strictly
 	# speaking this is not really a valid comparison: we will
 	# usually be comparing failed steps in different jobs.  But
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-06 12:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-06 12:14 [OSSTEST PATCH 1/3] ms-planner: Ignore freely-shareable resources Ian Jackson
2016-10-06 12:14 ` [OSSTEST PATCH 2/3] ms-planner: Improve an error message Ian Jackson
2016-10-06 12:14 ` [OSSTEST PATCH 3/3] sg-report-flight: Avoid some warnings when reporting unexecuted jobs Ian Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.