Skip to contentSkip to conversation

Reduce rumpuserxen tests, and loose ends

PATCH New Ian Jackson 1 participant 12 messages Jun 30, 2014

lore
Share & tools
lore
#0 lore raw

v2 cover Reduce rumpuserxen tests, and loose ends

I haven't transposed Ian C's ack into the actual patches, but here is a summary:

a 01/11 adhoc-revtuple-generator: Avoid an undefined variable warning a 02/11 adhoc-revtuple-generator: Do not always reclone
a 03/11 submodulefixup: Tell git cache [fetch=try]
a 04/11 standalone: Honour OSSTEST_CONFIG
+ 05/11 standalone: Use DAILY_BRANCH_POSTMAKE_HOOK
a 06/11 standalone-config-example: Provide a setting of Repos a 07/11 mg-list-all-branches: New script.
* 08/11 standalone-generate-dump-flight-runvars: New utility a 09/11 make-flight: Break out do_rumpkernel_tests
a 10/11 make-flight: Test rump kernels only when needed
+ 11/11 executive-postgresql-schema: Schema dump

Key:
+ new in v2
* modified apropos of comments

#1 lore raw

PATCH v2 1/11 adhoc-revtuple-generator: Avoid an undefined variable warning

---
 adhoc-revtuple-generator |    1 +
 1 file changed, 1 insertion(+)
adhoc-revtuple-generator +1 -0
index 4a2ec63..dbe4773 100755
@@ -129,6 +129,7 @@ END
 	    m/^(\w+)\s(.*)$/ or die "$cmd: $_ ?";
 	    push @{ $r{$1} }, $2;
 	}
+	$r{Parents} ||= [ ];
 	die "$treename -" unless @{ $r{commit} } == 1;
 	die "$treename -" unless @{ $r{committer} } == 1;
 	die "$treename -" unless $r{committer}[0] =~ m/ (\d+)(?: [-+]\d{4})$/;
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH v2 2/11 adhoc-revtuple-generator: Do not always reclone

In reply to Ian Jackson

Instead, try setting the `origin' remote's URL and fetching. If that fails it may be that the local repo is corrupted, so then we try recloning.

---
 adhoc-revtuple-generator |   14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
adhoc-revtuple-generator +11 -3
index dbe4773..f94f189 100755
@@ -99,9 +99,17 @@ sub git_generator ($) {
     my $treename= $tree->{Treename};
     my $eff_url = git_massage_url($tree->{Url});
     my $upcmd= <<END;
-        set -e; exec >&2
-        rm -rf $c{Repos}/$treename
-        git clone --bare $eff_url $c{Repos}/$treename
+        set -xe; exec >&2
+        if ! sh -xe <<ENDIFCOND
+            # the "set -e"-disarmament done by "if" leaks into ( ) !
+	    cd $c{Repos}/$treename
+	    git remote set-url origin $eff_url
+	    git fetch -p origin
+ENDIFCOND
+	then
+            rm -rf $c{Repos}/$treename
+            git clone --bare $eff_url $c{Repos}/$treename
+	fi
 END
     print DEBUG "GIT-GEN UPCMD\n$upcmd\n";
     shellcmd($upcmd) if $doupdate;
Signature · 1 line
1.7.10.4
#3 lore raw

PATCH v2 3/11 submodulefixup: Tell git cache [fetch=try]

In reply to Ian Jackson

Make git_massage_url take an optional %xopts list, currently with only GitFetchBestEffort as a possible key.

Use that in submodulefixup, unconditionally. Often the submodule update will work fine with an older version of the submodule, and if the submodule we get is out of date then the submodule update will fail anyway.

---
 Osstest/BuildSupport.pm |    5 ++++-
 Osstest/TestSupport.pm  |    8 ++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)
Osstest/BuildSupport.pm +4 -1
index bd79b4b..f3b8c63 100644
@@ -117,7 +117,10 @@ sub submodulefixup ($$$$) {
 		    $log1->("  recording url=$u");
 		    store_runvar($urv, $u);
 		}
-		my $nu = $submod->{Url} = git_massage_url($u);
+		my $nu = $submod->{Url} =
+		    git_massage_url($u, GitFetchBestEffort => 1);
+		# If we don't manage to fetch a version which contains the
+		# necessary commit(s), we will fail later.
 		$_ = "${l}${nu}\n";
 	    }
 	    print ::EO or die $!;
Osstest/TestSupport.pm +6 -2
index 93c8fcf..23ad106 100644
@@ -1026,12 +1026,16 @@ sub file_simple_write_contents ($$) {
 
 #---------- building, vcs's, etc. ----------
 
-sub git_massage_url ($) {
-    my ($url) = @_;
+sub git_massage_url ($;@) {
+    my ($url, %xopts) = @_;
+    # Supports $xopts{GitFetchBestEffort}
 
     if ($url =~ m,^(git|https?)://, && $c{GitCacheProxy} &&
 	substr($url,0,length($c{GitCacheProxy})) ne $c{GitCacheProxy}) {
 	$url = $c{GitCacheProxy}.$url;
+	if ($xopts{GitFetchBestEffort}) {
+	    $url .= '%20[fetch=try]';
+	}
     }
     return $url;
 }
Signature · 1 line
1.7.10.4
#4 lore raw

PATCH v2 4/11 standalone: Honour OSSTEST_CONFIG

In reply to Ian Jackson

If OSSTEST_CONFIG is set in the environment, do not default it to ~/.xen-osstest/config.

---
 standalone |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
standalone +1 -1
index b5eb9bc..55e884f 100755
@@ -61,7 +61,7 @@ TEMP=$(getopt -o c:f:h:rR --long config:,flight:,host:,reuse,noreuse,reinstall,l
 
 eval set -- "$TEMP"
 
-config=$HOME/.xen-osstest/config
+config=${OSSTEST_CONFIG-$HOME/.xen-osstest/config}
 flight="standalone"
 host=
 reuse=1 # Don't blow away machines by default
Signature · 1 line
1.7.10.4
#5 lore raw

PATCH v2 5/11 standalone: Use DAILY_BRANCH_POSTMAKE_HOOK

In reply to Ian Jackson

DAILY_BRANCH_PREEXEC_HOOK is after we have made half the prospective email, but this is not useful for standalone users.

---
v2: New patch in v2 of the series.

---
 standalone |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
standalone +1 -1
index 55e884f..daab7ae 100755
@@ -162,7 +162,7 @@ case $op in
 
         branch=$1; shift
 
-        DAILY_BRANCH_PREEXEC_HOOK=exit\ 0 \
+        DAILY_BRANCH_POSTMAKE_HOOK=exit\ 0 \
         OSSTEST_USE_HEAD=y \
         BRANCHES_ALWAYS="$branch" \
         BUILD_LVEXTEND_MAX="$lvextendmax" \
Signature · 1 line
1.7.10.4
#6 lore raw

PATCH v2 6/11 standalone-config-example: Provide a setting of Repos

In reply to Ian Jackson
---
 standalone-config-example |    2 ++
 1 file changed, 2 insertions(+)
standalone-config-example +2 -0
index 9b2b79b..9289010 100644
@@ -30,3 +30,5 @@ DebianMirrorHost debian.uk.xensource.com
 DebianPreseed= <<'END'
 d-i clock-setup/ntp-server string ntp.uk.xensource.com
 END
+
+Repos= "$ENV{'HOME'}/osstest-repos"
Signature · 1 line
1.7.10.4
#7 lore raw

PATCH v2 7/11 mg-list-all-branches: New script.

In reply to Ian Jackson

The approach here is a little unpleasant but it has the virtue of getting the ones out of crontab too, and of not depending on the production database (which will in any case contain obsolete flights).

---
 mg-list-all-branches |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100755 mg-list-all-branches
mg-list-all-branches new file +18 -0
new file mode 100755
index 0000000..c968a99
@@ -0,0 +1,18 @@
+#!/usr/bin/perl -w
+# prints on stdout a list of all the "branches"
+# mentioned in cr-daily-branch or crontab
+
+use strict;
+
+our %branches;
+
+foreach my $f (qw(cr-for-branches crontab)) {
+    open C, $f or die $!;
+    while (<C>) {
+        next unless m/(?:EXTRA_)?BRANCHES[:+]?='?([-.0-9a-z ]+)/;
+        $branches{$_}=1 foreach split /\s+/, $1;
+    }
+    close C or die $!;
+}
+
+print $_,"\n" or die $! foreach sort keys %branches;
Signature · 1 line
1.7.10.4
#8 lore raw

PATCH v2 8/11 standalone-generate-dump-flight-runvars: New utility

In reply to Ian Jackson

This is helpful for showing the effect of changes to make-flight, cr-daily-branch, et al.

---
v2: Do not set DAILY_BRANCH_POSTMAKE_HOOK, since standalone now does
that.

---
 standalone-generate-dump-flight-runvars |   69 +++++++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)
 create mode 100755 standalone-generate-dump-flight-runvars
standalone-generate-dump-flight-runvars new file +69 -0
new file mode 100755
index 0000000..2ce96be
@@ -0,0 +1,69 @@
+#!/bin/bash
+#
+# Prints the results of each cr-daily-branch's make-flight
+#
+# Usage:
+#    ./standalone-generate-dump-flight-runvars [BRANCH....]
+#
+# If no BRANCHes specified, does all that are normally run by
+# cr-daily-branch or out of crontab.
+
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2009-2014 Citrix Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+set -e
+
+set -o pipefail
+
+mkdir -p tmp
+
+procs=""
+
+if [ $# = 0 ]; then
+   set `./mg-list-all-branches`
+fi
+
+perbranch () {
+    log=tmp/make-flight.$branch.log
+    flight=check_${branch//[-._]/_}
+}
+
+for branch in $@; do
+    perbranch
+    ./standalone make-flight -f $flight $branch >$log 2>&1 &
+    procs+=" $branch=$!"
+done
+
+perproc () {
+    branch=${proc%=*}
+    pid=${proc##*=}
+    perbranch
+}
+
+for proc in $procs; do
+    perproc
+    if ! wait $pid; then
+       set +e
+       cat $log >&2
+       echo >&2 "make-flight $branch failed"
+       exit 1
+    fi
+done
+
+for proc in $procs; do
+    perproc
+    ./mg-show-flight-runvars $flight | sed "s/^/`printf '%-20s' $branch`/"
+done
Signature · 1 line
1.7.10.4
#9 lore raw

PATCH v2 9/11 make-flight: Break out do_rumpkernel_tests

In reply to Ian Jackson

No functional change in this patch.

---
 make-flight |   18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
make-flight +10 -8
index a01e5ee..a53fab0 100755
@@ -115,6 +115,15 @@ test_matrix_branch_filter_callback () {
   return 0
 }
 
+do_rumpkernel_tests () {
+  rumparch=$dom0arch
+  job_create_test test-$xenarch$kern-$dom0arch-rumpuserxen-$rumparch \
+                      test-rumpuserxen xl \
+            $xenarch $dom0arch                                       \
+            rump_rumpuserxenbuildjob=build-$rumparch-rumpuserxen     \
+            all_hostflags=$most_hostflags
+}
+
 do_freebsd_tests () {
 
   if [ $xenarch != amd64 -o $dom0arch != i386 -o "$kern" != "" ]; then
@@ -292,14 +301,7 @@ test_matrix_do_one () {
   *)               test_xend=n ;;
   esac
 
-  rumparch=$dom0arch
-  if true; then
-      job_create_test test-$xenarch$kern-$dom0arch-rumpuserxen-$rumparch \
-                      test-rumpuserxen xl \
-            $xenarch $dom0arch                                       \
-            rump_rumpuserxenbuildjob=build-$rumparch-rumpuserxen     \
-            all_hostflags=$most_hostflags
-  fi
+  do_rumpkernel_tests
 
   # xend PV guest test on x86 only
   if [ x$test_xend = xy -a \( $dom0arch = "i386" -o $dom0arch = "amd64" \) ]; then
Signature · 1 line
1.7.10.4
#10 lore raw

PATCH v2 10/11 make-flight: Test rump kernels only when needed

In reply to Ian Jackson

Introduce a new subroutine branch_wants_rumpkernel_tests and call it before making the rumpuserxen build and test jobs.

The default is not to include a rumpuserxen test. We include it for rumpuserxen itself, xen, linux (in case there is a frontend/backend incompatibility), and osstest.

---
 make-flight |    2 ++
 mfi-common  |   14 ++++++++++++++
 2 files changed, 16 insertions(+)
make-flight +2 -0
index a53fab0..fbda440 100755
@@ -116,6 +116,8 @@ test_matrix_branch_filter_callback () {
 }
 
 do_rumpkernel_tests () {
+  branch_wants_rumpkernel_tests || return 0
+
   rumparch=$dom0arch
   job_create_test test-$xenarch$kern-$dom0arch-rumpuserxen-$rumparch \
                       test-rumpuserxen xl \
mfi-common +14 -0
index d1b2737..5dcb2ee 100644
@@ -31,6 +31,16 @@ stripy () {
   eval "$out_vn=\"\$out_$out_val\""
 }
 
+branch_wants_rumpkernel_tests () {
+  case "$branch" in
+  osstest*) return 0;;
+  rump*)    return 0;;
+  xen*)     return 0;;
+  linux*)   return 0;;
+  *)        return 1;;
+  esac
+}
+
 create_build_jobs () {
 
   local arch
@@ -180,6 +190,8 @@ create_build_jobs () {
 
     fi
 
+    if branch_wants_rumpkernel_tests; then
+
     case $arch in
     i386|amd64)
     ./cs-job-create $flight build-$arch-rumpuserxen build-rumpuserxen        \
@@ -197,6 +209,8 @@ create_build_jobs () {
 		;;
     esac
 
+    fi
+
     case "$arch" in
     armhf) continue;; # don't do any other kernel builds
     esac
Signature · 1 line
1.7.10.4
#11 lore raw

PATCH v2 11/11 executive-postgresql-schema: Schema dump

In reply to Ian Jackson

We really ought to have a proper schema script. But for now, include the output of pg_dump --schema-only on the osstestdb, for the benefit of anyone trying to set up a hosted (rather than standalone) instance (or just trying to see how the code works).

---
v2: New patch in v2 of the series.

---
 executive-postgresql-schema |  541 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 541 insertions(+)
 create mode 100644 executive-postgresql-schema
executive-postgresql-schema new file +541 -0
new file mode 100644
index 0000000..7bd6c55
@@ -0,0 +1,541 @@
+--
+-- PostgreSQL database dump
+--
+
+SET statement_timeout = 0;
+SET client_encoding = 'UTF8';
+SET standard_conforming_strings = off;
+SET check_function_bodies = false;
+SET client_min_messages = warning;
+SET escape_string_warning = off;
+
+SET search_path = public, pg_catalog;
+
+SET default_tablespace = '';
+
+SET default_with_oids = false;
+
+--
+-- Name: flights; Type: TABLE; Schema: public; Owner: osstest; Tablespace: 
+--
+
+CREATE TABLE flights (
+    flight integer NOT NULL,
+    started integer DEFAULT 0 NOT NULL,
+    blessing text DEFAULT 'unknown'::text NOT NULL,
+    branch text NOT NULL,
+    intended text
+);
+
+
+ALTER TABLE public.flights OWNER TO osstest;
+
+--
+-- Name: flights_flight_seq; Type: SEQUENCE; Schema: public; Owner: osstest
+--
+
+CREATE SEQUENCE flights_flight_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+ALTER TABLE public.flights_flight_seq OWNER TO osstest;
+
+--
+-- Name: flights_flight_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: osstest
+--
+
+ALTER SEQUENCE flights_flight_seq OWNED BY flights.flight;
+
+
+--
+-- Name: flights_harness_touched; Type: TABLE; Schema: public; Owner: osstest; Tablespace: 
+--
+
+CREATE TABLE flights_harness_touched (
+    flight integer NOT NULL,
+    harness text NOT NULL
+);
+
+
+ALTER TABLE public.flights_harness_touched OWNER TO osstest;
+
+--
+-- Name: hostflags; Type: TABLE; Schema: public; Owner: osstest; Tablespace: 
+--
+
+CREATE TABLE hostflags (
+    hostname text NOT NULL,
+    hostflag text NOT NULL
+);
+
+
+ALTER TABLE public.hostflags OWNER TO osstest;
+
+--
+-- Name: jobs; Type: TABLE; Schema: public; Owner: osstest; Tablespace: 
+--
+
+CREATE TABLE jobs (
+    flight integer NOT NULL,
+    job character varying NOT NULL,
+    recipe text,
+    status text DEFAULT 'stopped'::text NOT NULL
+);
+
+
+ALTER TABLE public.jobs OWNER TO osstest;
+
+--
+-- Name: resource_log_evid_seq; Type: SEQUENCE; Schema: public; Owner: iwj
+--
+
+CREATE SEQUENCE resource_log_evid_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+ALTER TABLE public.resource_log_evid_seq OWNER TO iwj;
+
+--
+-- Name: resource_log; Type: TABLE; Schema: public; Owner: iwj; Tablespace: 
+--
+
+CREATE TABLE resource_log (
+    restype text NOT NULL,
+    resname text NOT NULL,
+    shareix integer NOT NULL,
+    evid integer DEFAULT nextval('resource_log_evid_seq'::regclass) NOT NULL,
+    "timestamp" integer,
+    taskid integer,
+    flight integer,
+    job character varying,
+    stepno integer,
+    evtype text NOT NULL,
+    evcomment text NOT NULL
+);
+
+
+ALTER TABLE public.resource_log OWNER TO iwj;
+
+--
+-- Name: resource_properties; Type: TABLE; Schema: public; Owner: osstest; Tablespace: 
+--
+
+CREATE TABLE resource_properties (
+    restype text NOT NULL,
+    resname text NOT NULL,
+    name text NOT NULL,
+    val text NOT NULL
+);
+
+
+ALTER TABLE public.resource_properties OWNER TO osstest;
+
+--
+-- Name: resource_sharing; Type: TABLE; Schema: public; Owner: osstest; Tablespace: 
+--
+
+CREATE TABLE resource_sharing (
+    restype text NOT NULL,
+    resname text NOT NULL,
+    sharetype text NOT NULL,
+    wear integer DEFAULT 0 NOT NULL,
+    state text NOT NULL,
+    harness character varying
+);
+
+
+ALTER TABLE public.resource_sharing OWNER TO osstest;
+
+--
+-- Name: resources; Type: TABLE; Schema: public; Owner: osstest; Tablespace: 
+--
+
+CREATE TABLE resources (
+    restype text NOT NULL,
+    resname text NOT NULL,
+    shareix integer DEFAULT 0 NOT NULL,
+    owntaskid integer NOT NULL,
+    subtask text DEFAULT ''::text NOT NULL,
+    CONSTRAINT resources_check CHECK (((shareix = 0) OR (restype ~~ 'share-%'::text)))
+);
+
+
+ALTER TABLE public.resources OWNER TO osstest;
+
+--
+-- Name: runvars; Type: TABLE; Schema: public; Owner: osstest; Tablespace: 
+--
+
+CREATE TABLE runvars (
+    flight integer NOT NULL,
+    job character varying NOT NULL,
+    name character varying NOT NULL,
+    val character varying,
+    synth boolean NOT NULL
+);
+
+
+ALTER TABLE public.runvars OWNER TO osstest;
+
+--
+-- Name: steps; Type: TABLE; Schema: public; Owner: osstest; Tablespace: 
+--
+
+CREATE TABLE steps (
+    flight integer NOT NULL,
+    job character varying NOT NULL,
+    stepno integer NOT NULL,
+    step character varying NOT NULL,
+    status character varying NOT NULL,
+    testid text,
+    started integer,
+    finished integer
+);
+
+
+ALTER TABLE public.steps OWNER TO osstest;
+
+--
+-- Name: tasks_taskid_seq; Type: SEQUENCE; Schema: public; Owner: osstest
+--
+
+CREATE SEQUENCE tasks_taskid_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+ALTER TABLE public.tasks_taskid_seq OWNER TO osstest;
+
+--
+-- Name: tasks; Type: TABLE; Schema: public; Owner: osstest; Tablespace: 
+--
+
+CREATE TABLE tasks (
+    taskid integer DEFAULT nextval('tasks_taskid_seq'::regclass) NOT NULL,
+    type text NOT NULL,
+    refkey text NOT NULL,
+    username text,
+    comment text,
+    live boolean NOT NULL,
+    refinfo text
+);
+
+
+ALTER TABLE public.tasks OWNER TO osstest;
+
+--
+-- Name: flight; Type: DEFAULT; Schema: public; Owner: osstest
+--
+
+ALTER TABLE ONLY flights ALTER COLUMN flight SET DEFAULT nextval('flights_flight_seq'::regclass);
+
+
+--
+-- Name: flights_harness_touched_pkey; Type: CONSTRAINT; Schema: public; Owner: osstest; Tablespace: 
+--
+
+ALTER TABLE ONLY flights_harness_touched
+    ADD CONSTRAINT flights_harness_touched_pkey PRIMARY KEY (flight, harness);
+
+
+--
+-- Name: flights_pkey; Type: CONSTRAINT; Schema: public; Owner: osstest; Tablespace: 
+--
+
+ALTER TABLE ONLY flights
+    ADD CONSTRAINT flights_pkey PRIMARY KEY (flight);
+
+
+--
+-- Name: jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: osstest; Tablespace: 
+--
+
+ALTER TABLE ONLY jobs
+    ADD CONSTRAINT jobs_pkey PRIMARY KEY (flight, job);
+
+
+--
+-- Name: resource_log_pkey; Type: CONSTRAINT; Schema: public; Owner: iwj; Tablespace: 
+--
+
+ALTER TABLE ONLY resource_log
+    ADD CONSTRAINT resource_log_pkey PRIMARY KEY (restype, resname, shareix, evid);
+
+
+--
+-- Name: resource_properties_pkey; Type: CONSTRAINT; Schema: public; Owner: osstest; Tablespace: 
+--
+
+ALTER TABLE ONLY resource_properties
+    ADD CONSTRAINT resource_properties_pkey PRIMARY KEY (restype, resname, name);
+
+
+--
+-- Name: resource_sharing_pkey; Type: CONSTRAINT; Schema: public; Owner: osstest; Tablespace: 
+--
+
+ALTER TABLE ONLY resource_sharing
+    ADD CONSTRAINT resource_sharing_pkey PRIMARY KEY (restype, resname);
+
+
+--
+-- Name: resources_pkey; Type: CONSTRAINT; Schema: public; Owner: osstest; Tablespace: 
+--
+
+ALTER TABLE ONLY resources
+    ADD CONSTRAINT resources_pkey PRIMARY KEY (restype, resname, shareix);
+
+
+--
+-- Name: runvars_pkey; Type: CONSTRAINT; Schema: public; Owner: osstest; Tablespace: 
+--
+
+ALTER TABLE ONLY runvars
+    ADD CONSTRAINT runvars_pkey PRIMARY KEY (flight, job, name);
+
+
+--
+-- Name: steps_flight_key; Type: CONSTRAINT; Schema: public; Owner: osstest; Tablespace: 
+--
+
+ALTER TABLE ONLY steps
+    ADD CONSTRAINT steps_flight_key UNIQUE (flight, job, testid);
+
+
+--
+-- Name: steps_pkey; Type: CONSTRAINT; Schema: public; Owner: osstest; Tablespace: 
+--
+
+ALTER TABLE ONLY steps
+    ADD CONSTRAINT steps_pkey PRIMARY KEY (flight, job, stepno);
+
+
+--
+-- Name: tasks_pkey; Type: CONSTRAINT; Schema: public; Owner: osstest; Tablespace: 
+--
+
+ALTER TABLE ONLY tasks
+    ADD CONSTRAINT tasks_pkey PRIMARY KEY (taskid);
+
+
+--
+-- Name: hostflags_flag_index; Type: INDEX; Schema: public; Owner: osstest; Tablespace: 
+--
+
+CREATE INDEX hostflags_flag_index ON hostflags USING btree (hostflag);
+
+
+--
+-- Name: hostflags_host_flag_index; Type: INDEX; Schema: public; Owner: osstest; Tablespace: 
+--
+
+CREATE INDEX hostflags_host_flag_index ON hostflags USING btree (hostname, hostflag);
+
+
+--
+-- Name: tasks_type_refkey_live_index; Type: INDEX; Schema: public; Owner: osstest; Tablespace: 
+--
+
+CREATE UNIQUE INDEX tasks_type_refkey_live_index ON tasks USING btree (type, refkey) WHERE live;
+
+
+--
+-- Name: tasks_type_taskid; Type: INDEX; Schema: public; Owner: osstest; Tablespace: 
+--
+
+CREATE INDEX tasks_type_taskid ON tasks USING btree (type, taskid);
+
+
+--
+-- Name: resource_log_flight_fkey; Type: FK CONSTRAINT; Schema: public; Owner: iwj
+--
+
+ALTER TABLE ONLY resource_log
+    ADD CONSTRAINT resource_log_flight_fkey FOREIGN KEY (flight) REFERENCES flights(flight);
+
+
+--
+-- Name: resource_log_flight_fkey1; Type: FK CONSTRAINT; Schema: public; Owner: iwj
+--
+
+ALTER TABLE ONLY resource_log
+    ADD CONSTRAINT resource_log_flight_fkey1 FOREIGN KEY (flight, job) REFERENCES jobs(flight, job);
+
+
+--
+-- Name: resource_log_flight_fkey2; Type: FK CONSTRAINT; Schema: public; Owner: iwj
+--
+
+ALTER TABLE ONLY resource_log
+    ADD CONSTRAINT resource_log_flight_fkey2 FOREIGN KEY (flight, job, stepno) REFERENCES steps(flight, job, stepno);
+
+
+--
+-- Name: resource_log_restype_fkey; Type: FK CONSTRAINT; Schema: public; Owner: iwj
+--
+
+ALTER TABLE ONLY resource_log
+    ADD CONSTRAINT resource_log_restype_fkey FOREIGN KEY (restype, resname, shareix) REFERENCES resources(restype, resname, shareix);
+
+
+--
+-- Name: resources_owntaskid_fkey; Type: FK CONSTRAINT; Schema: public; Owner: osstest
+--
+
+ALTER TABLE ONLY resources
+    ADD CONSTRAINT resources_owntaskid_fkey FOREIGN KEY (owntaskid) REFERENCES tasks(taskid);
+
+
+--
+-- Name: steps_flight_fkey; Type: FK CONSTRAINT; Schema: public; Owner: osstest
+--
+
+ALTER TABLE ONLY steps
+    ADD CONSTRAINT steps_flight_fkey FOREIGN KEY (flight, job) REFERENCES jobs(flight, job);
+
+
+--
+-- Name: public; Type: ACL; Schema: -; Owner: postgres
+--
+
+REVOKE ALL ON SCHEMA public FROM PUBLIC;
+REVOKE ALL ON SCHEMA public FROM postgres;
+GRANT ALL ON SCHEMA public TO postgres;
+GRANT ALL ON SCHEMA public TO PUBLIC;
+
+
+--
+-- Name: flights; Type: ACL; Schema: public; Owner: osstest
+--
+
+REVOKE ALL ON TABLE flights FROM PUBLIC;
+REVOKE ALL ON TABLE flights FROM osstest;
+GRANT ALL ON TABLE flights TO osstest;
+GRANT SELECT ON TABLE flights TO osstest_ro;
+
+
+--
+-- Name: flights_flight_seq; Type: ACL; Schema: public; Owner: osstest
+--
+
+REVOKE ALL ON SEQUENCE flights_flight_seq FROM PUBLIC;
+REVOKE ALL ON SEQUENCE flights_flight_seq FROM osstest;
+GRANT ALL ON SEQUENCE flights_flight_seq TO osstest;
+GRANT SELECT ON SEQUENCE flights_flight_seq TO osstest_ro;
+
+
+--
+-- Name: flights_harness_touched; Type: ACL; Schema: public; Owner: osstest
+--
+
+REVOKE ALL ON TABLE flights_harness_touched FROM PUBLIC;
+REVOKE ALL ON TABLE flights_harness_touched FROM osstest;
+GRANT ALL ON TABLE flights_harness_touched TO osstest;
+GRANT SELECT ON TABLE flights_harness_touched TO osstest_ro;
+
+
+--
+-- Name: hostflags; Type: ACL; Schema: public; Owner: osstest
+--
+
+REVOKE ALL ON TABLE hostflags FROM PUBLIC;
+REVOKE ALL ON TABLE hostflags FROM osstest;
+GRANT ALL ON TABLE hostflags TO osstest;
+GRANT SELECT ON TABLE hostflags TO osstest_ro;
+
+
+--
+-- Name: jobs; Type: ACL; Schema: public; Owner: osstest
+--
+
+REVOKE ALL ON TABLE jobs FROM PUBLIC;
+REVOKE ALL ON TABLE jobs FROM osstest;
+GRANT ALL ON TABLE jobs TO osstest;
+GRANT SELECT ON TABLE jobs TO osstest_ro;
+
+
+--
+-- Name: resource_properties; Type: ACL; Schema: public; Owner: osstest
+--
+
+REVOKE ALL ON TABLE resource_properties FROM PUBLIC;
+REVOKE ALL ON TABLE resource_properties FROM osstest;
+GRANT ALL ON TABLE resource_properties TO osstest;
+GRANT SELECT ON TABLE resource_properties TO osstest_ro;
+
+
+--
+-- Name: resource_sharing; Type: ACL; Schema: public; Owner: osstest
+--
+
+REVOKE ALL ON TABLE resource_sharing FROM PUBLIC;
+REVOKE ALL ON TABLE resource_sharing FROM osstest;
+GRANT ALL ON TABLE resource_sharing TO osstest;
+GRANT SELECT ON TABLE resource_sharing TO osstest_ro;
+
+
+--
+-- Name: resources; Type: ACL; Schema: public; Owner: osstest
+--
+
+REVOKE ALL ON TABLE resources FROM PUBLIC;
+REVOKE ALL ON TABLE resources FROM osstest;
+GRANT ALL ON TABLE resources TO osstest;
+GRANT SELECT ON TABLE resources TO osstest_ro;
+
+
+--
+-- Name: runvars; Type: ACL; Schema: public; Owner: osstest
+--
+
+REVOKE ALL ON TABLE runvars FROM PUBLIC;
+REVOKE ALL ON TABLE runvars FROM osstest;
+GRANT ALL ON TABLE runvars TO osstest;
+GRANT SELECT ON TABLE runvars TO osstest_ro;
+
+
+--
+-- Name: steps; Type: ACL; Schema: public; Owner: osstest
+--
+
+REVOKE ALL ON TABLE steps FROM PUBLIC;
+REVOKE ALL ON TABLE steps FROM osstest;
+GRANT ALL ON TABLE steps TO osstest;
+GRANT SELECT ON TABLE steps TO osstest_ro;
+
+
+--
+-- Name: tasks_taskid_seq; Type: ACL; Schema: public; Owner: osstest
+--
+
+REVOKE ALL ON SEQUENCE tasks_taskid_seq FROM PUBLIC;
+REVOKE ALL ON SEQUENCE tasks_taskid_seq FROM osstest;
+GRANT ALL ON SEQUENCE tasks_taskid_seq TO osstest;
+GRANT SELECT ON SEQUENCE tasks_taskid_seq TO osstest_ro;
+
+
+--
+-- Name: tasks; Type: ACL; Schema: public; Owner: osstest
+--
+
+REVOKE ALL ON TABLE tasks FROM PUBLIC;
+REVOKE ALL ON TABLE tasks FROM osstest;
+GRANT ALL ON TABLE tasks TO osstest;
+GRANT SELECT ON TABLE tasks TO osstest_ro;
+
+
+--
+-- PostgreSQL database dump complete
+--
+
Signature · 1 line
1.7.10.4