Commit 5cb8f0db authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

qos-test: virtio-blk test node



Convert tests/virtio-blk-test in qgraph test node,
virtio-blk-test. This test consumes a virtio-blk interface
and checks that its function return the expected values.

Some functions are implemented only for virtio-blk-pci, so they
don't consume virtio-blk, but virtio-blk-pci

Note that this test does not allocate any virtio-blk structure,
it's all done by the qtest walking graph mechanism.  The allocator
is also provided by qgraph; remove malloc-generic.c and malloc-generic.h
which are not used anymore.

Signed-off-by: default avatarEmanuele Giuseppe Esposito <e.emanuelegiuseppe@gmail.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent a3713493
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -154,7 +154,6 @@ check-qtest-generic-y += tests/cdrom-test$(EXESUF)
check-qtest-ipack-y += tests/ipoctal232-test$(EXESUF)

check-qtest-virtio-y += tests/virtio-net-test$(EXESUF)
check-qtest-virtio-y += tests/virtio-blk-test$(EXESUF)
check-qtest-virtio-y += tests/virtio-scsi-test$(EXESUF)

check-qtest-pci-y += tests/e1000-test$(EXESUF)
@@ -285,7 +284,6 @@ check-qtest-arm-y += tests/pca9552-test$(EXESUF)
check-qtest-arm-y += tests/ds1338-test$(EXESUF)
check-qtest-arm-y += tests/microbit-test$(EXESUF)
check-qtest-arm-y += tests/m25p80-test$(EXESUF)
check-qtest-arm-$(CONFIG_VIRTIO_BLK) += tests/virtio-blk-test$(EXESUF)
check-qtest-arm-y += tests/test-arm-mptimer$(EXESUF)
check-qtest-arm-y += tests/boot-serial-test$(EXESUF)
check-qtest-arm-y += tests/hexloader-test$(EXESUF)
@@ -722,7 +720,7 @@ tests/test-crypto-block$(EXESUF): tests/test-crypto-block.o $(test-crypto-obj-y)
libqgraph-obj-y = tests/libqos/qgraph.o

libqos-obj-y = $(libqgraph-obj-y) tests/libqos/pci.o tests/libqos/fw_cfg.o
libqos-obj-y += tests/libqos/malloc.o tests/libqos/malloc-generic.o
libqos-obj-y += tests/libqos/malloc.o
libqos-obj-y += tests/libqos/i2c.o tests/libqos/libqos.o
libqos-spapr-obj-y = $(libqos-obj-y) tests/libqos/malloc-spapr.o
libqos-spapr-obj-y += tests/libqos/libqos-spapr.o
@@ -764,6 +762,7 @@ qos-test-obj-y += tests/pci-test.o
qos-test-obj-y += tests/sdhci-test.o
qos-test-obj-y += tests/virtio-test.o
qos-test-obj-$(CONFIG_VIRTFS) += tests/virtio-9p-test.o
qos-test-obj-y += tests/virtio-blk-test.o
qos-test-obj-y += tests/virtio-rng-test.o
qos-test-obj-y += tests/virtio-serial-test.o

@@ -811,7 +810,6 @@ tests/vmxnet3-test$(EXESUF): tests/vmxnet3-test.o
tests/ne2000-test$(EXESUF): tests/ne2000-test.o
tests/wdt_ib700-test$(EXESUF): tests/wdt_ib700-test.o
tests/tco-test$(EXESUF): tests/tco-test.o $(libqos-pc-obj-y)
tests/virtio-blk-test$(EXESUF): tests/virtio-blk-test.o $(libqos-virtio-obj-y)
tests/virtio-ccw-test$(EXESUF): tests/virtio-ccw-test.o
tests/virtio-net-test$(EXESUF): tests/virtio-net-test.o $(libqos-pc-obj-y) $(libqos-virtio-obj-y)
tests/virtio-scsi-test$(EXESUF): tests/virtio-scsi-test.o $(libqos-virtio-obj-y)

tests/libqos/malloc-generic.c

deleted100644 → 0
+0 −20
Original line number Diff line number Diff line
/*
 * Basic libqos generic malloc support
 *
 * Copyright (c) 2014 Marc Marí
 *
 * This work is licensed under the terms of the GNU GPL, version 2 or later.
 * See the COPYING file in the top-level directory.
 */

#include "qemu/osdep.h"
#include "libqos/malloc-generic.h"
#include "libqos/malloc.h"

void generic_alloc_init(QGuestAllocator *s, uint64_t base_addr,
                        uint64_t size, uint32_t page_size)
{
    uint64_t start = base_addr + (1 << 20); /* Start at 1MB */

    alloc_init(s, 0, start, start + size, page_size);
}

tests/libqos/malloc-generic.h

deleted100644 → 0
+0 −18
Original line number Diff line number Diff line
/*
 * Basic libqos generic malloc support
 *
 * Copyright (c) 2014 Marc Marí
 *
 * This work is licensed under the terms of the GNU GPL, version 2 or later.
 * See the COPYING file in the top-level directory.
 */

#ifndef LIBQOS_MALLOC_GENERIC_H
#define LIBQOS_MALLOC_GENERIC_H

#include "libqos/malloc.h"

void generic_alloc_init(QGuestAllocator *s, uint64_t base_addr, uint64_t size,
                        uint32_t page_size);

#endif
+3 −0
Original line number Diff line number Diff line
@@ -17,6 +17,9 @@
#ifndef LIBQTEST_H
#define LIBQTEST_H

#include "qapi/qmp/qobject.h"
#include "qapi/qmp/qdict.h"

typedef struct QTestState QTestState;

extern QTestState *global_qtest;
+184 −290

File changed.

Preview size limit exceeded, changes collapsed.