[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH RFC 31/59] Make a binary that can run reports on a system without libxl
From: George Dunlap <george.dunlap@xxxxxxxxxx> To simplify report-generation and iteration, make a binary that doesn't link against libxl. Create a "dummy" Xen library that just returns errors and warnings. A better way to do this is probably to do some dlopen hackery (so we can use the same binary), but that's for another day. Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxx> --- Makefile | 6 +++++- xenworker_dummy.go | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 xenworker_dummy.go diff --git a/Makefile b/Makefile index c1b9ee4..6dee499 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -BIN = schedbench +BIN = schedbench schedbench-report BINALL = $(BIN) .PHONY: all @@ -16,6 +16,10 @@ CGO_LDFLAGS = -L$(XENLIB_PATH) -Wl,-rpath-link=$(XENLIB_PATH) $(CGO_LIBS) schedbench: main.go processworker.go xenworker.go benchmark.go run.go libxl.go htmlreport.go 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 + go build -o $@ $^ + .PHONY: clean clean: rm -f $(BINALL) diff --git a/xenworker_dummy.go b/xenworker_dummy.go new file mode 100644 index 0000000..02e90ce --- /dev/null +++ b/xenworker_dummy.go @@ -0,0 +1,54 @@ +/* + * 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 (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 |