[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH RFC 36/59] controller: Make 'dummy' at the level of 'run' rather than xenworker
From: George Dunlap <george.dunlap@xxxxxxxxxx> Get rid of xenworker_dummy.go and use stubs.go instead. This is much cleaner (as evidenced by the size of the file), and allows us to use libxl-based things in run.go without having to make a load of dummy libxl stub functions. Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxx> --- Makefile | 2 +- stubs.go | 34 ++++++++++++++++++++++++++++++++ xenworker_dummy.go | 58 ------------------------------------------------------ 3 files changed, 35 insertions(+), 59 deletions(-) create mode 100644 stubs.go delete mode 100644 xenworker_dummy.go diff --git a/Makefile b/Makefile index af55e0a..0e0b231 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ schedbench: main.go processworker.go xenworker.go benchmark.go run.go libxl.go h CGO_LDFLAGS="$(CGO_LDFLAGS)" CGO_CFLAGS="$(CGO_CFLAGS)" go build -o $@ $^ # FIXME: Do with dlopen instead -schedbench-report: main.go processworker.go xenworker_dummy.go benchmark.go run.go htmlreport.go plan.go +schedbench-report: main.go benchmark.go stubs.go htmlreport.go plan.go go build -o $@ $^ .PHONY: clean diff --git a/stubs.go b/stubs.go new file mode 100644 index 0000000..78987ad --- /dev/null +++ b/stubs.go @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2016 George W. Dunlap, Citrix Systems UK Ltd + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; version 2 of the + * License only. + * + * 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 + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ +package main + +import ( + "fmt" +) + +func (plan *BenchmarkPlan) Run() (err error) { + err = fmt.Errorf("Not implemented") + + return +} + +func XlTest(Args []string) { + return +} + diff --git a/xenworker_dummy.go b/xenworker_dummy.go deleted file mode 100644 index e2dbdae..0000000 --- a/xenworker_dummy.go +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2016 George W. Dunlap, Citrix Systems UK Ltd - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License only. - * - * 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 - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ -package main - -import ( - "fmt" - "io" -) - -type XenWorker struct { -} - -func XlTest(Args []string) { - return -} - -func (w *XenWorker) SetId(i WorkerId) { -} - -func (w *XenWorker) Init(p WorkerParams, g WorkerConfig) (err error) { - err = fmt.Errorf("Xen functionality not implemented"); - return -} - -// FIXME: Return an error -func (w *XenWorker) Shutdown() { - - return -} - -func (w *XenWorker) DumpLog(f io.Writer) (err error) { - err = fmt.Errorf("Xen functionality not implemented"); - return -} - - - -// FIXME: Return an error -func (w *XenWorker) Process(report chan WorkerReport, done chan WorkerId) { - return; -} - -- 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |