* [PATCH 1/5] libnvdimm, pmem: Allow a NULL-kaddr to ->direct_access()
From: Huaisheng Ye @ 2018-07-24 8:45 UTC (permalink / raw)
To: linux-nvdimm, dan.j.williams
Cc: ross.zwisler, willy, vishal.l.verma, dave.jiang, schwidefsky,
heiko.carstens, viro, martin.petersen, axboe, gregkh,
bart.vanassche, jack, linux-kernel, linux-s390, linux-fsdevel,
chengnt, Huaisheng Ye
In-Reply-To: <20180724084510.6104-1-yehs2007@zoho.com>
From: Huaisheng Ye <yehs1@lenovo.com>
pmem_direct_access() needs to check the validity of second rank
pointer kaddr for NULL assignment. If kaddr equals to NULL, it
doesn't need to calculate the value.
Signed-off-by: Huaisheng Ye <yehs1@lenovo.com>
---
drivers/nvdimm/pmem.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index 9d71492..b1d121a 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -232,7 +232,9 @@ __weak long __pmem_direct_access(struct pmem_device *pmem, pgoff_t pgoff,
if (unlikely(is_bad_pmem(&pmem->bb, PFN_PHYS(pgoff) / 512,
PFN_PHYS(nr_pages))))
return -EIO;
- *kaddr = pmem->virt_addr + offset;
+
+ if (kaddr)
+ *kaddr = pmem->virt_addr + offset;
*pfn = phys_to_pfn_t(pmem->phys_addr + offset, pmem->pfn_flags);
/*
--
1.8.3.1
^ permalink raw reply related
* [PATCH 0/5] Do not request a pointer kaddr when not required
From: Huaisheng Ye @ 2018-07-24 8:45 UTC (permalink / raw)
To: linux-nvdimm, dan.j.williams
Cc: ross.zwisler, willy, vishal.l.verma, dave.jiang, schwidefsky,
heiko.carstens, viro, martin.petersen, axboe, gregkh,
bart.vanassche, jack, linux-kernel, linux-s390, linux-fsdevel,
chengnt, Huaisheng Ye
From: Huaisheng Ye <yehs1@lenovo.com>
Some functions within fs/dax and dax/super don't need to get kaddr from
direct_access. Assigning NULL to kaddr to ->direct_access() is more
straightforward and simple than offering a useless local pointer.
So all direct_access() need to check the validity of second rank pointer
kaddr for NULL assignment. If kaddr equals to NULL, it doesn't need to
calculate its value.
* This series are supplement to [PATCH v2 00/14]mm: Asynchronous +
multithreaded memmap init for ZONE_DEVICE. [1]
[1]: https://lkml.org/lkml/2018/7/16/828
Huaisheng Ye (5):
libnvdimm, pmem: Allow a NULL-kaddr to ->direct_access()
tools/testing/nvdimm: Allow a NULL-kaddr to ->direct_access()
s390, dcssblk: Allow a NULL-kaddr to ->direct_access()
filesystem-dax: Do not request a pointer kaddr when not required
dax/super: Do not request a pointer kaddr when not required
drivers/dax/super.c | 3 +--
drivers/nvdimm/pmem.c | 4 +++-
drivers/s390/block/dcssblk.c | 3 ++-
fs/dax.c | 3 +--
tools/testing/nvdimm/pmem-dax.c | 6 ++++--
5 files changed, 11 insertions(+), 8 deletions(-)
--
1.8.3.1
^ permalink raw reply
* Re: [PATCH] mmc: sunxi: allow 3.3V DDR when DDR is available
From: Maxime Ripard @ 2018-07-24 8:44 UTC (permalink / raw)
To: Icenowy Zheng
Cc: Ulf Hansson, Chen-Yu Tsai, linux-mmc, linux-arm-kernel,
linux-kernel, linux-sunxi
In-Reply-To: <20180722125407.43107-1-icenowy@aosc.io>
[-- Attachment #1: Type: text/plain, Size: 577 bytes --]
On Sun, Jul 22, 2018 at 08:54:07PM +0800, Icenowy Zheng wrote:
> Some Allwinner boards feature an on-board eMMC with fixed 3.3V voltage
> (e.g. Banana Pi M2+), and in this case both the eMMC and the SoC are
> capable of doing 3.3V DDR transmission.
>
> Add capability of 3.3V DDR when DDR is available (extra clock or new
> timing).
>
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Maxime
--
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply
* [PATCH] mmc: sunxi: allow 3.3V DDR when DDR is available
From: Maxime Ripard @ 2018-07-24 8:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20180722125407.43107-1-icenowy@aosc.io>
On Sun, Jul 22, 2018 at 08:54:07PM +0800, Icenowy Zheng wrote:
> Some Allwinner boards feature an on-board eMMC with fixed 3.3V voltage
> (e.g. Banana Pi M2+), and in this case both the eMMC and the SoC are
> capable of doing 3.3V DDR transmission.
>
> Add capability of 3.3V DDR when DDR is available (extra clock or new
> timing).
>
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Maxime
--
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180724/a598348e/attachment.sig>
^ permalink raw reply
* Re: [PATCH] mmc: sunxi: allow 3.3V DDR when DDR is available
From: Maxime Ripard @ 2018-07-24 8:44 UTC (permalink / raw)
To: Icenowy Zheng
Cc: Ulf Hansson, Chen-Yu Tsai, linux-mmc-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw
In-Reply-To: <20180722125407.43107-1-icenowy-h8G6r0blFSE@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 607 bytes --]
On Sun, Jul 22, 2018 at 08:54:07PM +0800, Icenowy Zheng wrote:
> Some Allwinner boards feature an on-board eMMC with fixed 3.3V voltage
> (e.g. Banana Pi M2+), and in this case both the eMMC and the SoC are
> capable of doing 3.3V DDR transmission.
>
> Add capability of 3.3V DDR when DDR is available (extra clock or new
> timing).
>
> Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
Acked-by: Maxime Ripard <maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>
Maxime
--
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply
* [U-Boot] [PATCH V3 1/2] mmc: add HS400 support
From: Peng Fan @ 2018-07-24 8:44 UTC (permalink / raw)
To: u-boot
In-Reply-To: <3ec20129-ad7c-8b1f-596a-9f2db8baeca7@ti.com>
Hi Faiz,
It's 2 months since this patchset out (:
>
> On Saturday 19 May 2018 06:24 PM, Peng Fan wrote:
> > Add HS400 support.
> > Selecting HS400 needs first select HS199 according to spec, so use a
> > dedicated function for HS400.
> > Add HS400 related macros.
> > Remove the restriction of only using the low 6 bits of
> > EXT_CSD_CARD_TYPE, using all the 8 bits.
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > Cc: Jaehoon Chung <jh80.chung@samsung.com>
> > Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
> > Cc: Stefano Babic <sbabic@denx.de>
> > Cc: Simon Glass <sjg@chromium.org>
> > Cc: Kishon Vijay Abraham I <kishon@ti.com>
> > Cc: Bin Meng <bmeng.cn@gmail.com>
> > ---
> >
> > V3:
> > Simplify code
> > add error msg
> >
> > V2:
> > remove 4bits support from HS400, as HS400 does not support 4bits per spec.
> >
> > drivers/mmc/Kconfig | 7 +++
> > drivers/mmc/mmc.c | 137
> +++++++++++++++++++++++++++++++++++++++++-----------
> > include/mmc.h | 11 +++++
> > 3 files changed, 128 insertions(+), 27 deletions(-)
> >
> > diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index
> > 3f15f85efd..a535a87a8e 100644
> > --- a/drivers/mmc/Kconfig
> > +++ b/drivers/mmc/Kconfig
> > @@ -104,6 +104,13 @@ config SPL_MMC_UHS_SUPPORT
> > cards. The IO voltage must be switchable from 3.3v to 1.8v. The bus
> > frequency can go up to 208MHz (SDR104)
> >
> > +config MMC_HS400_SUPPORT
> > + bool "enable HS400 support"
> > + select MMC_HS200_SUPPORT
> > + help
> > + The HS400 mode is support by some eMMC. The bus frequency is up to
> > + 200MHz. This mode requires tuning the IO.
> > +
>
> Please add SPL_MMC_HS400_SUPPORT also.
What issue do you see? I did not test SPL MMC with HS400 support. You mean only add a Kconfig
entry SPL_MMC_HS400_SUPPORT?
Regards,
Peng.
>
> Thanks,
> Faiz
^ permalink raw reply
* [Qemu-devel] [RFC PATCH v2] hw/s390x/virtio-ccw: Consolidate calls to virtio_ccw_unrealize()
From: Thomas Huth @ 2018-07-24 8:43 UTC (permalink / raw)
To: Cornelia Huck, David Hildenbrand, qemu-s390x
Cc: Christian Borntraeger, Michael S. Tsirkin, Alexander Graf,
Richard Henderson, qemu-devel
Currently, every virtio-ccw device explicitely sets its unrealize
function to virtio_ccw_unrealize() in its class_init function.
We can simplify this by using a common unrealize function, just like
it is already done for the realize functions.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
hw/s390x/virtio-ccw.c | 22 +++++++---------------
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index 7ddb378..f3ad7aa 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -750,8 +750,9 @@ out_err:
g_free(sch);
}
-static void virtio_ccw_unrealize(VirtioCcwDevice *dev, Error **errp)
+static void virtio_ccw_device_unrealize(VirtioCcwDevice *dev, Error **errp)
{
+ VirtIOCCWDeviceClass *dc = VIRTIO_CCW_DEVICE_GET_CLASS(dev);
CcwDevice *ccw_dev = CCW_DEVICE(dev);
SubchDev *sch = ccw_dev->sch;
@@ -764,6 +765,10 @@ static void virtio_ccw_unrealize(VirtioCcwDevice *dev, Error **errp)
release_indicator(&dev->routes.adapter, dev->indicators);
dev->indicators = NULL;
}
+
+ if (dc->unrealize) {
+ dc->unrealize(dev, errp);
+ }
}
static void virtio_ccw_net_realize(VirtioCcwDevice *ccw_dev, Error **errp)
@@ -1349,7 +1354,6 @@ static void virtio_ccw_net_class_init(ObjectClass *klass, void *data)
VirtIOCCWDeviceClass *k = VIRTIO_CCW_DEVICE_CLASS(klass);
k->realize = virtio_ccw_net_realize;
- k->unrealize = virtio_ccw_unrealize;
dc->props = virtio_ccw_net_properties;
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
}
@@ -1376,7 +1380,6 @@ static void virtio_ccw_blk_class_init(ObjectClass *klass, void *data)
VirtIOCCWDeviceClass *k = VIRTIO_CCW_DEVICE_CLASS(klass);
k->realize = virtio_ccw_blk_realize;
- k->unrealize = virtio_ccw_unrealize;
dc->props = virtio_ccw_blk_properties;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
}
@@ -1403,7 +1406,6 @@ static void virtio_ccw_serial_class_init(ObjectClass *klass, void *data)
VirtIOCCWDeviceClass *k = VIRTIO_CCW_DEVICE_CLASS(klass);
k->realize = virtio_ccw_serial_realize;
- k->unrealize = virtio_ccw_unrealize;
dc->props = virtio_ccw_serial_properties;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
}
@@ -1430,7 +1432,6 @@ static void virtio_ccw_balloon_class_init(ObjectClass *klass, void *data)
VirtIOCCWDeviceClass *k = VIRTIO_CCW_DEVICE_CLASS(klass);
k->realize = virtio_ccw_balloon_realize;
- k->unrealize = virtio_ccw_unrealize;
dc->props = virtio_ccw_balloon_properties;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
}
@@ -1457,7 +1458,6 @@ static void virtio_ccw_scsi_class_init(ObjectClass *klass, void *data)
VirtIOCCWDeviceClass *k = VIRTIO_CCW_DEVICE_CLASS(klass);
k->realize = virtio_ccw_scsi_realize;
- k->unrealize = virtio_ccw_unrealize;
dc->props = virtio_ccw_scsi_properties;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
}
@@ -1483,7 +1483,6 @@ static void vhost_ccw_scsi_class_init(ObjectClass *klass, void *data)
VirtIOCCWDeviceClass *k = VIRTIO_CCW_DEVICE_CLASS(klass);
k->realize = vhost_ccw_scsi_realize;
- k->unrealize = virtio_ccw_unrealize;
dc->props = vhost_ccw_scsi_properties;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
}
@@ -1519,7 +1518,6 @@ static void virtio_ccw_rng_class_init(ObjectClass *klass, void *data)
VirtIOCCWDeviceClass *k = VIRTIO_CCW_DEVICE_CLASS(klass);
k->realize = virtio_ccw_rng_realize;
- k->unrealize = virtio_ccw_unrealize;
dc->props = virtio_ccw_rng_properties;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
}
@@ -1556,7 +1554,6 @@ static void virtio_ccw_crypto_class_init(ObjectClass *klass, void *data)
VirtIOCCWDeviceClass *k = VIRTIO_CCW_DEVICE_CLASS(klass);
k->realize = virtio_ccw_crypto_realize;
- k->unrealize = virtio_ccw_unrealize;
dc->props = virtio_ccw_crypto_properties;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
}
@@ -1593,7 +1590,6 @@ static void virtio_ccw_gpu_class_init(ObjectClass *klass, void *data)
VirtIOCCWDeviceClass *k = VIRTIO_CCW_DEVICE_CLASS(klass);
k->realize = virtio_ccw_gpu_realize;
- k->unrealize = virtio_ccw_unrealize;
dc->props = virtio_ccw_gpu_properties;
dc->hotpluggable = false;
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
@@ -1621,7 +1617,6 @@ static void virtio_ccw_input_class_init(ObjectClass *klass, void *data)
VirtIOCCWDeviceClass *k = VIRTIO_CCW_DEVICE_CLASS(klass);
k->realize = virtio_ccw_input_realize;
- k->unrealize = virtio_ccw_unrealize;
dc->props = virtio_ccw_input_properties;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
}
@@ -1703,9 +1698,8 @@ static void virtio_ccw_busdev_realize(DeviceState *dev, Error **errp)
static void virtio_ccw_busdev_unrealize(DeviceState *dev, Error **errp)
{
VirtioCcwDevice *_dev = (VirtioCcwDevice *)dev;
- VirtIOCCWDeviceClass *_info = VIRTIO_CCW_DEVICE_GET_CLASS(dev);
- _info->unrealize(_dev, errp);
+ virtio_ccw_device_unrealize(_dev, errp);
}
static void virtio_ccw_busdev_unplug(HotplugHandler *hotplug_dev,
@@ -1801,7 +1795,6 @@ static void virtio_ccw_9p_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
VirtIOCCWDeviceClass *k = VIRTIO_CCW_DEVICE_CLASS(klass);
- k->unrealize = virtio_ccw_unrealize;
k->realize = virtio_ccw_9p_realize;
dc->props = virtio_ccw_9p_properties;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
@@ -1847,7 +1840,6 @@ static void vhost_vsock_ccw_class_init(ObjectClass *klass, void *data)
VirtIOCCWDeviceClass *k = VIRTIO_CCW_DEVICE_CLASS(klass);
k->realize = vhost_vsock_ccw_realize;
- k->unrealize = virtio_ccw_unrealize;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
dc->props = vhost_vsock_ccw_properties;
}
--
1.8.3.1
^ permalink raw reply related
* Re: [PATCH] doc: add graphics to bbdev library documentation
From: De Lara Guarch, Pablo @ 2018-07-24 8:43 UTC (permalink / raw)
To: Mokhtar, Amr; +Cc: dev@dpdk.org
In-Reply-To: <1532021376-29726-1-git-send-email-amr.mokhtar@intel.com>
> -----Original Message-----
> From: Mokhtar, Amr
> Sent: Thursday, July 19, 2018 6:30 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: dev@dpdk.org; Mokhtar, Amr <amr.mokhtar@intel.com>
> Subject: [PATCH] doc: add graphics to bbdev library documentation
>
> Add two SVG graphics representing Turbo coding of code blocks
> in mbuf data buffer.
>
> Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
Applied to dpdk-next-crypto.
Thanks,
Pablo
^ permalink raw reply
* Re: [PATCH 2/2] mtd: spi-nor: intel-spi: use mtd_device_register()
From: Boris Brezillon @ 2018-07-24 8:42 UTC (permalink / raw)
To: Rafał Miłecki
Cc: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
Richard Weinberger, Miquel Raynal, Bert Kenward, linux-mtd,
Rafał Miłecki
In-Reply-To: <20180721115510.24078-2-zajec5@gmail.com>
On Sat, 21 Jul 2018 13:55:10 +0200
Rafał Miłecki <zajec5@gmail.com> wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> This driver doesn't specify parsers so it can use that little helper.
>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Applied to spi-nor/next.
> ---
> drivers/mtd/spi-nor/intel-spi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/spi-nor/intel-spi.c b/drivers/mtd/spi-nor/intel-spi.c
> index d2cbfc27826e..af0a22019516 100644
> --- a/drivers/mtd/spi-nor/intel-spi.c
> +++ b/drivers/mtd/spi-nor/intel-spi.c
> @@ -908,7 +908,7 @@ struct intel_spi *intel_spi_probe(struct device *dev,
> if (!ispi->writeable || !writeable)
> ispi->nor.mtd.flags &= ~MTD_WRITEABLE;
>
> - ret = mtd_device_parse_register(&ispi->nor.mtd, NULL, NULL, &part, 1);
> + ret = mtd_device_register(&ispi->nor.mtd, &part, 1);
> if (ret)
> return ERR_PTR(ret);
>
^ permalink raw reply
* Re: [PATCH 2/5] dt-bindings: sunxi-sram: add binding for Allwinner H6 SRAM C
From: Maxime Ripard @ 2018-07-24 8:41 UTC (permalink / raw)
To: Icenowy Zheng
Cc: Rob Herring, Chen-Yu Tsai, David S. Miller, Corentin Labbe,
netdev, devicetree, linux-arm-kernel, linux-kernel, linux-sunxi
In-Reply-To: <20180722053955.25266-3-icenowy@aosc.io>
[-- Attachment #1: Type: text/plain, Size: 1272 bytes --]
On Sun, Jul 22, 2018 at 01:39:52PM +0800, Icenowy Zheng wrote:
> The Allwinner H6 SoC's DE3 needs the SRAM C section being claimed in the
> system controller to work, like A64 DE2.
>
> As H6 and A64 system controller are quite similar, code is reused now,
> and the A64 fallback compatible string is added after the H6 compatible
> string.
>
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> ---
> Documentation/devicetree/bindings/sram/sunxi-sram.txt | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/sram/sunxi-sram.txt b/Documentation/devicetree/bindings/sram/sunxi-sram.txt
> index c51ade86578c..6527a1a535a3 100644
> --- a/Documentation/devicetree/bindings/sram/sunxi-sram.txt
> +++ b/Documentation/devicetree/bindings/sram/sunxi-sram.txt
> @@ -18,6 +18,7 @@ Required properties:
> - "allwinner,sun8i-h3-system-control"
> - "allwinner,sun50i-a64-sram-controller" (deprecated)
> - "allwinner,sun50i-a64-system-control"
> + - "allwinner,sun50i-h6-system-contorl", "allwinner,sun50i-a64-system-control"
^ control
Maxime
--
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply
* Re: [PATCH 2/5] dt-bindings: sunxi-sram: add binding for Allwinner H6 SRAM C
From: Maxime Ripard @ 2018-07-24 8:41 UTC (permalink / raw)
To: Icenowy Zheng
Cc: Rob Herring, Chen-Yu Tsai, David S. Miller, Corentin Labbe,
netdev-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw
In-Reply-To: <20180722053955.25266-3-icenowy-h8G6r0blFSE@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1261 bytes --]
On Sun, Jul 22, 2018 at 01:39:52PM +0800, Icenowy Zheng wrote:
> The Allwinner H6 SoC's DE3 needs the SRAM C section being claimed in the
> system controller to work, like A64 DE2.
>
> As H6 and A64 system controller are quite similar, code is reused now,
> and the A64 fallback compatible string is added after the H6 compatible
> string.
>
> Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
> ---
> Documentation/devicetree/bindings/sram/sunxi-sram.txt | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/sram/sunxi-sram.txt b/Documentation/devicetree/bindings/sram/sunxi-sram.txt
> index c51ade86578c..6527a1a535a3 100644
> --- a/Documentation/devicetree/bindings/sram/sunxi-sram.txt
> +++ b/Documentation/devicetree/bindings/sram/sunxi-sram.txt
> @@ -18,6 +18,7 @@ Required properties:
> - "allwinner,sun8i-h3-system-control"
> - "allwinner,sun50i-a64-sram-controller" (deprecated)
> - "allwinner,sun50i-a64-system-control"
> + - "allwinner,sun50i-h6-system-contorl", "allwinner,sun50i-a64-system-control"
^ control
Maxime
--
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply
* [PATCH 2/5] dt-bindings: sunxi-sram: add binding for Allwinner H6 SRAM C
From: Maxime Ripard @ 2018-07-24 8:41 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20180722053955.25266-3-icenowy@aosc.io>
On Sun, Jul 22, 2018 at 01:39:52PM +0800, Icenowy Zheng wrote:
> The Allwinner H6 SoC's DE3 needs the SRAM C section being claimed in the
> system controller to work, like A64 DE2.
>
> As H6 and A64 system controller are quite similar, code is reused now,
> and the A64 fallback compatible string is added after the H6 compatible
> string.
>
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> ---
> Documentation/devicetree/bindings/sram/sunxi-sram.txt | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/sram/sunxi-sram.txt b/Documentation/devicetree/bindings/sram/sunxi-sram.txt
> index c51ade86578c..6527a1a535a3 100644
> --- a/Documentation/devicetree/bindings/sram/sunxi-sram.txt
> +++ b/Documentation/devicetree/bindings/sram/sunxi-sram.txt
> @@ -18,6 +18,7 @@ Required properties:
> - "allwinner,sun8i-h3-system-control"
> - "allwinner,sun50i-a64-sram-controller" (deprecated)
> - "allwinner,sun50i-a64-system-control"
> + - "allwinner,sun50i-h6-system-contorl", "allwinner,sun50i-a64-system-control"
^ control
Maxime
--
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180724/56876721/attachment.sig>
^ permalink raw reply
* [PATCH] netfilter: avoid stalls in nf_ct_alloc_hashtable
From: Li RongQing @ 2018-07-24 7:19 UTC (permalink / raw)
To: netdev, pablo, kadlec, fw
when system forks a process with CLONE_NEWNET flag under the
high memory pressure, it will trigger memory reclaim and stall
for a long time because nf_ct_alloc_hashtable need to allocate
high-order memory at that time. The calltrace as below:
delay_tsc
__delay
_raw_spin_lock
_spin_lock
mmu_shrink
shrink_slab
zone_reclaim
get_page_from_freelist
__alloc_pages_nodemask
alloc_pages_current
__get_free_pages
nf_ct_alloc_hashtable
nf_conntrack_init_net
setup_net
copy_net_ns
create_new_namespaces
copy_namespaces
copy_process
do_fork
sys_clone
stub_clone
__clone
not use the directly memory reclaim flag to avoid stall
Signed-off-by: Ni Xun <nixun@baidu.com>
Signed-off-by: Zhang Yu <zhangyu31@baidu.com>
Signed-off-by: Wang Li <wangli39@baidu.com>
Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
net/netfilter/nf_conntrack_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 8a113ca1eea2..672c5960530d 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -2120,8 +2120,8 @@ void *nf_ct_alloc_hashtable(unsigned int *sizep, int nulls)
return NULL;
sz = nr_slots * sizeof(struct hlist_nulls_head);
- hash = (void *)__get_free_pages(GFP_KERNEL | __GFP_NOWARN | __GFP_ZERO,
- get_order(sz));
+ hash = (void *)__get_free_pages((GFP_KERNEL & ~__GFP_DIRECT_RECLAIM) |
+ __GFP_NOWARN | __GFP_ZERO, get_order(sz));
if (!hash)
hash = vzalloc(sz);
--
2.16.2
^ permalink raw reply related
* Re: Build Error
From: Alexander Kanavin @ 2018-07-24 8:40 UTC (permalink / raw)
To: hardik vala; +Cc: Poky Project
In-Reply-To: <1354130903.1354552.1532420980242@mail.yahoo.com>
Your setup is incorrect. Each layer needs to be included only once,
and all layers should point to the same upstream release (e.g. sumo,
or master if you want the latest code).
Alex
2018-07-24 10:29 GMT+02:00 hardik vala <hardik.vala@aumraj.com>:
> one meta provided by poky and other meta is openembedded-core/meta directory
>
> ________________________________
> From: "Burton, Ross" <ross.burton@intel.com>
> To: hardik vala <hardik.vala@aumraj.com>
> Cc: Poky Project <poky@yoctoproject.org>
> Sent: Tuesday, 24 July 2018 1:40 PM
> Subject: Re: [poky] Build Error
>
> On 24 July 2018 at 08:11, hardik vala <hardik.vala@aumraj.com> wrote:
>
>> meta
>> meta-poky
>> meta-yocto-bsp = "sumo:96fbd39ba32362416c18d90bb7a81eb6a76912e0"
>> meta = "master:ff0b682b807959521c85716296de7a1d26d7d18f"
>> meta-oe
>> meta-python
>> meta-networking = "master:0aff7abedc1c7727c88029a123107f4faf5ba4f1"
>> meta-java = "master:ecb637a8cf5eb0cbff67e9e568858f7bfed061fc"
>
>
> Why do you have meta twice, one with sumo and once with master? What
> branch do you want to be using?
>
> Ross
>
>
>
>
> --
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky
>
^ permalink raw reply
* [U-Boot] [PATCH v2.1 11/13] sunxi: add DRAM support to H6
From: Maxime Ripard @ 2018-07-24 8:40 UTC (permalink / raw)
To: u-boot
In-Reply-To: <20180722221334.3679-1-icenowy@aosc.io>
On Mon, Jul 23, 2018 at 06:13:34AM +0800, Icenowy Zheng wrote:
> The Allwinner H6 SoC comes with a set of new DRAM controller+PHY combo.
> Both the controller and the PHY seem to be originate from DesignWare,
> and are similar to the ones in ZynqMP SoCs.
>
> This commit introduces an initial DRAM driver for H6, which contains
> only LPDDR3 support. The currently known SBCs with H6 all come with
> LPDDR3 memory, including Pine H64 and several Orange Pi's.
>
> The BSP DRAM initialization code is closed source and violates GPL. Code
> in this commit is written by experimenting, referring the code/document
> of other users of the IPs (mainly the ZynqMP, as it's the only found PHY
> reference) and disassebling the BSP blob.
>
> Thanks for Jernej Skrabec for review and fix some issues in this driver
> (including the most critical one which made it to work), and rewrite
> some code from register dump!
>
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Maxime
--
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180724/a9648f1d/attachment.sig>
^ permalink raw reply
* [PATCH 24/24] pynfs: python3 support plan: fix access class var in list comprehension
From: jiyin @ 2018-07-24 7:33 UTC (permalink / raw)
To: bfields; +Cc: linux-nfs, Jianhong.Yin
In-Reply-To: <20180724073342.5738-1-jiyin@redhat.com>
From: "Jianhong.Yin" <yin-jianhong@163.com>
see: https://stackoverflow.com/questions/13905741/accessing-class-variables-from-a-list-comprehension-in-the-class-definition
Signed-off-by: Jianhong Yin <yin-jianhong@163.com>
---
Status:
'''
all patches works fine on python-2.7
and build success on python-3.6
but because xdrlib issue https://bugs.python.org/issue9544
pynfs has not been able to run on python-3.6 now
'''
nfs4.1/config.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/nfs4.1/config.py b/nfs4.1/config.py
index b4a45d7..8779fe1 100644
--- a/nfs4.1/config.py
+++ b/nfs4.1/config.py
@@ -178,8 +178,9 @@ _invalid_ops = [
class OpsConfigServer(object):
__metaclass__ = MetaConfig
value = ['ERROR', 0, 0] # Note must have value == _opline(value)
- attrs = [ConfigLine(name.lower()[3:], value, "Generic comment", _opline)
- for name in nfs_opnum4.values()]
+ attrs = (lambda value=value: [ConfigLine(name.lower()[3:], value, "Generic comment", _opline)
+ for name in nfs_opnum4.values()])()
+
class Actions(object):
__metaclass__ = MetaConfig
--
2.17.1
^ permalink raw reply related
* [PATCH 23/24] pynfs: python3 support plan: fix except multi exceptions in one line
From: jiyin @ 2018-07-24 7:33 UTC (permalink / raw)
To: bfields; +Cc: linux-nfs, Jianhong.Yin
In-Reply-To: <20180724073342.5738-1-jiyin@redhat.com>
From: "Jianhong.Yin" <yin-jianhong@163.com>
Signed-off-by: Jianhong Yin <yin-jianhong@163.com>
---
rpc/rpc.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rpc/rpc.py b/rpc/rpc.py
index 46c59bf..18ff9fd 100644
--- a/rpc/rpc.py
+++ b/rpc/rpc.py
@@ -613,7 +613,7 @@ class ConnectionHandler(object):
msg_data = record[p.get_position():] # RPC payload
# Remember length of the header
msg.length = p.get_position()
- except (rpc_pack.XDRError, EOFError), e:
+ except (rpc_pack.XDRError, EOFError) as e:
log_t.warn("XDRError: %s, dropping packet" % e)
log_t.debug("unpacking raised the following error", exc_info=True)
self._notify_drop()
--
2.17.1
^ permalink raw reply related
* [PATCH 22/24] pynfs: python3 support plan: fix ord() failure on python3
From: jiyin @ 2018-07-24 7:33 UTC (permalink / raw)
To: bfields; +Cc: linux-nfs, Jianhong.Yin
In-Reply-To: <20180724073342.5738-1-jiyin@redhat.com>
From: "Jianhong.Yin" <yin-jianhong@163.com>
Signed-off-by: Jianhong Yin <yin-jianhong@163.com>
---
nfs4.0/nfs4lib.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/nfs4.0/nfs4lib.py b/nfs4.0/nfs4lib.py
index 79e386e..82fa4d8 100644
--- a/nfs4.0/nfs4lib.py
+++ b/nfs4.0/nfs4lib.py
@@ -144,7 +144,10 @@ class CBServer(rpc.RPCServer):
self.client = client
rpc.RPCServer.__init__(self, prog=self.prog, vers=1, port=self.port)
packed = struct.pack('>H', self.port)
- self.dotport = '.%s.%s' % (ord(packed[0]), ord(packed[1]))
+ try: #for python2
+ self.dotport = '.%s.%s' % (ord(packed[0]), ord(packed[1]))
+ except: #for python3
+ self.dotport = '.%s.%s' % ((packed[0]), (packed[1]))
self.nfs4packer = FancyNFS4Packer()
self.nfs4unpacker = FancyNFS4Unpacker('')
self.recall_lock = threading.Lock()
--
2.17.1
^ permalink raw reply related
* [PATCH 21/24] pynfs: python3 support plan: fix sort() fail and require python version
From: jiyin @ 2018-07-24 7:33 UTC (permalink / raw)
To: bfields; +Cc: linux-nfs, Jianhong.Yin
In-Reply-To: <20180724073342.5738-1-jiyin@redhat.com>
From: "Jianhong.Yin" <yin-jianhong@163.com>
Signed-off-by: Jianhong Yin <yin-jianhong@163.com>
---
nfs4.0/testserver.py | 6 +++---
nfs4.1/nfs4client.py | 2 +-
nfs4.1/nfs4lib.py | 2 +-
nfs4.1/testclient.py | 6 +++---
nfs4.1/testmod.py | 5 ++++-
nfs4.1/testserver.py | 6 +++---
6 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/nfs4.0/testserver.py b/nfs4.0/testserver.py
index ebce58d..e4a6db7 100755
--- a/nfs4.0/testserver.py
+++ b/nfs4.0/testserver.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# nfs4stest.py - nfsv4 server tester
#
-# Requires python 2.5
+# Requires python 2.7
#
# Written by Fred Isaman <iisaman@citi.umich.edu>
# Copyright (C) 2004 University of Michigan, Center for
@@ -26,8 +26,8 @@
import sys
-if sys.hexversion < 0x02050000:
- print("Requires python 2.5 or higher")
+if sys.hexversion < 0x02070000:
+ print("Requires python 2.7 or higher")
sys.exit(1)
import os
# Allow to be run stright from package root
diff --git a/nfs4.1/nfs4client.py b/nfs4.1/nfs4client.py
index e8c649b..be6b234 100644
--- a/nfs4.1/nfs4client.py
+++ b/nfs4.1/nfs4client.py
@@ -645,7 +645,7 @@ C.compound([C.bind_conn_to_session_op('0000000000000001', False, 3, False, 73, d
""" PROGRAM COVERAGE
-python2.5 ~/py_install/bin/coverage.py -x nfs4server.py
+python2.7 ~/py_install/bin/coverage.py -x nfs4server.py
coverage.py -a -d cover nfs4server.py
run test suite
"""
diff --git a/nfs4.1/nfs4lib.py b/nfs4.1/nfs4lib.py
index d46706a..5fed3ba 100644
--- a/nfs4.1/nfs4lib.py
+++ b/nfs4.1/nfs4lib.py
@@ -28,7 +28,7 @@ state00 = xdrdef.nfs4_type.stateid4(0, "\0" * 12)
state11 = xdrdef.nfs4_type.stateid4(0xffffffff, "\xff" * 12)
state01 = xdrdef.nfs4_type.stateid4(1, "\0" * 12)
-import hashlib # Note this requires 2.5 or higher
+import hashlib # Note this requires 2.7 or higher
op4 = nfs_ops.NFS4ops()
diff --git a/nfs4.1/testclient.py b/nfs4.1/testclient.py
index 5d21eaa..19bd148 100755
--- a/nfs4.1/testclient.py
+++ b/nfs4.1/testclient.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# nfs4stest.py - nfsv4 server tester
#
-# Requires python 2.5
+# Requires python 2.7
#
# Written by Fred Isaman <iisaman@citi.umich.edu>
# Copyright (C) 2004 University of Michigan, Center for
@@ -23,8 +23,8 @@
import use_local # HACK so don't have to rebuild constantly
import sys
-if sys.hexversion < 0x02050000:
- print("Requires python 2.5 or higher")
+if sys.hexversion < 0x02070000:
+ print("Requires python 2.7 or higher")
sys.exit(1)
import os
diff --git a/nfs4.1/testmod.py b/nfs4.1/testmod.py
index 6f576e2..68f7a5f 100644
--- a/nfs4.1/testmod.py
+++ b/nfs4.1/testmod.py
@@ -1,6 +1,6 @@
# testmod.py - run tests from a suite
#
-# Requires python 2.5
+# Requires python 2.7
#
# Written by Fred Isaman <iisaman@citi.umich.edu>
# Copyright (C) 2004 University of Michigan, Center for
@@ -157,6 +157,9 @@ class Test(object):
else:
return 1
+ def __lt__(self, other):
+ return self.__cmp__(other)
+
def __str__(self):
return "%-8s %s" % ( self.code, self.fullname)
diff --git a/nfs4.1/testserver.py b/nfs4.1/testserver.py
index 2becc13..249837e 100755
--- a/nfs4.1/testserver.py
+++ b/nfs4.1/testserver.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# nfs4stest.py - nfsv4 server tester
#
-# Requires python 2.5
+# Requires python 2.7
#
# Written by Fred Isaman <iisaman@citi.umich.edu>
# Copyright (C) 2004 University of Michigan, Center for
@@ -27,8 +27,8 @@
import use_local # HACK so don't have to rebuild constantly
import sys
-if sys.hexversion < 0x02050000:
- print("Requires python 2.5 or higher")
+if sys.hexversion < 0x02070000:
+ print("Requires python 2.7 or higher")
sys.exit(1)
import os
--
2.17.1
^ permalink raw reply related
* [PATCH 19/24] pynfs: python3 support plan: fix import fail on python3
From: jiyin @ 2018-07-24 7:33 UTC (permalink / raw)
To: bfields; +Cc: linux-nfs, Jianhong.Yin
In-Reply-To: <20180724073342.5738-1-jiyin@redhat.com>
From: "Jianhong.Yin" <yin-jianhong@163.com>
Signed-off-by: Jianhong Yin <yin-jianhong@163.com>
---
nfs4.0/servertests/environment.py | 2 +-
nfs4.0/servertests/st_access.py | 2 +-
nfs4.0/servertests/st_acl.py | 2 +-
nfs4.0/servertests/st_close.py | 2 +-
nfs4.0/servertests/st_commit.py | 2 +-
nfs4.0/servertests/st_compound.py | 5 +++--
nfs4.0/servertests/st_create.py | 2 +-
nfs4.0/servertests/st_delegation.py | 2 +-
nfs4.0/servertests/st_fslocations.py | 2 +-
nfs4.0/servertests/st_getattr.py | 2 +-
nfs4.0/servertests/st_getfh.py | 2 +-
nfs4.0/servertests/st_gss.py | 4 ++--
nfs4.0/servertests/st_link.py | 2 +-
nfs4.0/servertests/st_lock.py | 2 +-
nfs4.0/servertests/st_lockt.py | 2 +-
nfs4.0/servertests/st_locku.py | 2 +-
nfs4.0/servertests/st_lookup.py | 4 ++--
nfs4.0/servertests/st_lookupp.py | 2 +-
nfs4.0/servertests/st_nverify.py | 2 +-
nfs4.0/servertests/st_open.py | 2 +-
nfs4.0/servertests/st_openconfirm.py | 2 +-
nfs4.0/servertests/st_opendowngrade.py | 2 +-
nfs4.0/servertests/st_putfh.py | 2 +-
nfs4.0/servertests/st_putpubfh.py | 2 +-
nfs4.0/servertests/st_putrootfh.py | 2 +-
nfs4.0/servertests/st_read.py | 4 ++--
nfs4.0/servertests/st_readdir.py | 2 +-
nfs4.0/servertests/st_readlink.py | 2 +-
nfs4.0/servertests/st_reboot.py | 2 +-
nfs4.0/servertests/st_releaselockowner.py | 2 +-
nfs4.0/servertests/st_remove.py | 2 +-
nfs4.0/servertests/st_rename.py | 2 +-
nfs4.0/servertests/st_renew.py | 2 +-
nfs4.0/servertests/st_replay.py | 2 +-
nfs4.0/servertests/st_restorefh.py | 2 +-
nfs4.0/servertests/st_savefh.py | 2 +-
nfs4.0/servertests/st_secinfo.py | 2 +-
nfs4.0/servertests/st_setattr.py | 2 +-
nfs4.0/servertests/st_setclientid.py | 2 +-
nfs4.0/servertests/st_setclientidconfirm.py | 2 +-
nfs4.0/servertests/st_spoof.py | 2 +-
nfs4.0/servertests/st_verify.py | 2 +-
nfs4.0/servertests/st_write.py | 4 ++--
nfs4.0/testserver.py | 2 +-
nfs4.1/client41tests/ct_reboot.py | 2 +-
nfs4.1/client41tests/environment.py | 2 +-
nfs4.1/dataserver.py | 2 +-
nfs4.1/nfs3client.py | 2 +-
nfs4.1/nfs4client.py | 2 +-
nfs4.1/nfs4lib.py | 2 +-
nfs4.1/nfs4proxy.py | 2 +-
nfs4.1/nfs4server.py | 2 +-
nfs4.1/nfs4state.py | 2 +-
nfs4.1/server41tests/environment.py | 2 +-
nfs4.1/server41tests/st_block.py | 2 +-
nfs4.1/server41tests/st_compound.py | 2 +-
nfs4.1/server41tests/st_create_session.py | 2 +-
nfs4.1/server41tests/st_current_stateid.py | 4 ++--
nfs4.1/server41tests/st_debug.py | 2 +-
nfs4.1/server41tests/st_delegation.py | 2 +-
nfs4.1/server41tests/st_destroy_clientid.py | 2 +-
nfs4.1/server41tests/st_destroy_session.py | 4 ++--
nfs4.1/server41tests/st_exchange_id.py | 2 +-
nfs4.1/server41tests/st_flex.py | 2 +-
nfs4.1/server41tests/st_getdevicelist.py | 2 +-
nfs4.1/server41tests/st_lookup.py | 4 ++--
nfs4.1/server41tests/st_lookupp.py | 2 +-
nfs4.1/server41tests/st_open.py | 4 ++--
nfs4.1/server41tests/st_putfh.py | 2 +-
nfs4.1/server41tests/st_reboot.py | 2 +-
nfs4.1/server41tests/st_reclaim_complete.py | 2 +-
nfs4.1/server41tests/st_rename.py | 2 +-
nfs4.1/server41tests/st_secinfo.py | 2 +-
nfs4.1/server41tests/st_secinfo_no_name.py | 2 +-
nfs4.1/server41tests/st_sequence.py | 2 +-
nfs4.1/server41tests/st_sparse.py | 2 +-
nfs4.1/server41tests/st_trunking.py | 2 +-
nfs4.1/server41tests/st_verify.py | 2 +-
nfs4.1/testclient.py | 2 +-
nfs4.1/testserver.py | 2 +-
rpc/rpc.py | 2 +-
81 files changed, 91 insertions(+), 90 deletions(-)
diff --git a/nfs4.0/servertests/environment.py b/nfs4.0/servertests/environment.py
index a5cfe60..4d85837 100644
--- a/nfs4.0/servertests/environment.py
+++ b/nfs4.0/servertests/environment.py
@@ -14,7 +14,7 @@ from nfs4lib import NFS4Client, get_attrbitnum_dict
from xdrdef.nfs4_const import *
from xdrdef.nfs4_type import fsid4, nfsace4, fs_locations4, fs_location4, \
specdata4, nfstime4, settime4, stateid4
-import rpc
+import rpc.rpc as rpc
import sys
import os
import nfs_ops
diff --git a/nfs4.0/servertests/st_access.py b/nfs4.0/servertests/st_access.py
index 58c42bc..0a16986 100644
--- a/nfs4.0/servertests/st_access.py
+++ b/nfs4.0/servertests/st_access.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check
+from .environment import check
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_acl.py b/nfs4.0/servertests/st_acl.py
index 88667d2..3194ebc 100644
--- a/nfs4.0/servertests/st_acl.py
+++ b/nfs4.0/servertests/st_acl.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check
+from .environment import check
from xdrdef.nfs4_type import nfsace4
from nfs4lib import list2bitmap
diff --git a/nfs4.0/servertests/st_close.py b/nfs4.0/servertests/st_close.py
index 89ccbba..e0166f6 100644
--- a/nfs4.0/servertests/st_close.py
+++ b/nfs4.0/servertests/st_close.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check, makeStaleId
+from .environment import check, makeStaleId
def testCloseCreate(t, env):
diff --git a/nfs4.0/servertests/st_commit.py b/nfs4.0/servertests/st_commit.py
index eecf2c8..9345424 100644
--- a/nfs4.0/servertests/st_commit.py
+++ b/nfs4.0/servertests/st_commit.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check
+from .environment import check
_text = "Random data to write"
diff --git a/nfs4.0/servertests/st_compound.py b/nfs4.0/servertests/st_compound.py
index 59a279d..5225f61 100644
--- a/nfs4.0/servertests/st_compound.py
+++ b/nfs4.0/servertests/st_compound.py
@@ -1,8 +1,9 @@
from xdrdef.nfs4_const import *
from xdrdef.nfs4_type import nfs_argop4
from xdrdef.nfs4_pack import NFS4Packer
-from environment import check, get_invalid_utf8strings
-from rpc import RPCError
+from .environment import check, get_invalid_utf8strings
+from rpc.rpc import RPCError
+
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_create.py b/nfs4.0/servertests/st_create.py
index c7256e5..a43003b 100644
--- a/nfs4.0/servertests/st_create.py
+++ b/nfs4.0/servertests/st_create.py
@@ -1,6 +1,6 @@
from xdrdef.nfs4_const import *
from xdrdef.nfs4_type import createtype4, specdata4
-from environment import check
+from .environment import check
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_delegation.py b/nfs4.0/servertests/st_delegation.py
index 937d95f..0247151 100644
--- a/nfs4.0/servertests/st_delegation.py
+++ b/nfs4.0/servertests/st_delegation.py
@@ -1,6 +1,6 @@
from xdrdef.nfs4_const import *
from xdrdef.nfs4_type import nfs_client_id4, clientaddr4, cb_client4
-from environment import check
+from .environment import check
import os
import threading
import time
diff --git a/nfs4.0/servertests/st_fslocations.py b/nfs4.0/servertests/st_fslocations.py
index 442d5a2..0387843 100644
--- a/nfs4.0/servertests/st_fslocations.py
+++ b/nfs4.0/servertests/st_fslocations.py
@@ -1,6 +1,6 @@
from xdrdef.nfs4_const import *
from nfs4lib import list2bitmap
-from environment import check
+from .environment import check
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_getattr.py b/nfs4.0/servertests/st_getattr.py
index 65a5701..292fcd2 100644
--- a/nfs4.0/servertests/st_getattr.py
+++ b/nfs4.0/servertests/st_getattr.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check
+from .environment import check
from nfs4lib import get_attr_name
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_getfh.py b/nfs4.0/servertests/st_getfh.py
index 6fd22e7..4abe320 100644
--- a/nfs4.0/servertests/st_getfh.py
+++ b/nfs4.0/servertests/st_getfh.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check
+from .environment import check
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_gss.py b/nfs4.0/servertests/st_gss.py
index 414883e..e10e849 100644
--- a/nfs4.0/servertests/st_gss.py
+++ b/nfs4.0/servertests/st_gss.py
@@ -1,7 +1,7 @@
from xdrdef.nfs4_const import *
-from environment import check
+from .environment import check
from socket import timeout
-import rpc
+import rpc.rpc as rpc
import rpc.rpcsec.gss_const as gss
from rpc.rpcsec.gss_type import rpc_gss_cred_t
import nfs_ops
diff --git a/nfs4.0/servertests/st_link.py b/nfs4.0/servertests/st_link.py
index feddf1e..0ef5009 100644
--- a/nfs4.0/servertests/st_link.py
+++ b/nfs4.0/servertests/st_link.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check, get_invalid_utf8strings
+from .environment import check, get_invalid_utf8strings
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_lock.py b/nfs4.0/servertests/st_lock.py
index 060236a..b815a54 100644
--- a/nfs4.0/servertests/st_lock.py
+++ b/nfs4.0/servertests/st_lock.py
@@ -1,6 +1,6 @@
from xdrdef.nfs4_const import *
from xdrdef.nfs4_type import stateid4
-from environment import check, get_invalid_clientid, makeStaleId, makeBadIDganesha
+from .environment import check, get_invalid_clientid, makeStaleId, makeBadIDganesha
import time
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_lockt.py b/nfs4.0/servertests/st_lockt.py
index 7f8c5e1..ee0b825 100644
--- a/nfs4.0/servertests/st_lockt.py
+++ b/nfs4.0/servertests/st_lockt.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check, get_invalid_clientid
+from .environment import check, get_invalid_clientid
def testUnlockedFile(t, env):
"""LOCKT on a regular unlocked file
diff --git a/nfs4.0/servertests/st_locku.py b/nfs4.0/servertests/st_locku.py
index 74b464a..3524a61 100644
--- a/nfs4.0/servertests/st_locku.py
+++ b/nfs4.0/servertests/st_locku.py
@@ -1,6 +1,6 @@
from xdrdef.nfs4_const import *
from xdrdef.nfs4_type import stateid4
-from environment import check, makeStaleId
+from .environment import check, makeStaleId
def testFile(t, env):
"""LOCKU a regular file
diff --git a/nfs4.0/servertests/st_lookup.py b/nfs4.0/servertests/st_lookup.py
index eed7100..9bfaffe 100644
--- a/nfs4.0/servertests/st_lookup.py
+++ b/nfs4.0/servertests/st_lookup.py
@@ -1,6 +1,6 @@
from xdrdef.nfs4_const import *
-from environment import check, get_invalid_utf8strings
-import rpc
+from .environment import check, get_invalid_utf8strings
+import rpc.rpc as rpc
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_lookupp.py b/nfs4.0/servertests/st_lookupp.py
index 13c1553..7c38600 100644
--- a/nfs4.0/servertests/st_lookupp.py
+++ b/nfs4.0/servertests/st_lookupp.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check, get_invalid_utf8strings
+from .environment import check, get_invalid_utf8strings
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_nverify.py b/nfs4.0/servertests/st_nverify.py
index 4185970..e2a8130 100644
--- a/nfs4.0/servertests/st_nverify.py
+++ b/nfs4.0/servertests/st_nverify.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check, get_invalid_clientid, makeStaleId
+from .environment import check, get_invalid_clientid, makeStaleId
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_open.py b/nfs4.0/servertests/st_open.py
index b4af81c..9f5d1aa 100644
--- a/nfs4.0/servertests/st_open.py
+++ b/nfs4.0/servertests/st_open.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check, checkdict, get_invalid_utf8strings
+from .environment import check, checkdict, get_invalid_utf8strings
from nfs4lib import get_bitnumattr_dict
# Any test that uses create_confirm should depend on this test
diff --git a/nfs4.0/servertests/st_openconfirm.py b/nfs4.0/servertests/st_openconfirm.py
index 3b5b98f..631855a 100644
--- a/nfs4.0/servertests/st_openconfirm.py
+++ b/nfs4.0/servertests/st_openconfirm.py
@@ -1,6 +1,6 @@
from xdrdef.nfs4_const import *
from xdrdef.nfs4_type import stateid4
-from environment import check, makeStaleId
+from .environment import check, makeStaleId
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_opendowngrade.py b/nfs4.0/servertests/st_opendowngrade.py
index 213b2dd..2180223 100644
--- a/nfs4.0/servertests/st_opendowngrade.py
+++ b/nfs4.0/servertests/st_opendowngrade.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check, makeStaleId
+from .environment import check, makeStaleId
def testRegularOpen(t, env):
"""OPENDOWNGRADE on regular file
diff --git a/nfs4.0/servertests/st_putfh.py b/nfs4.0/servertests/st_putfh.py
index ba9ce27..6560f2e 100644
--- a/nfs4.0/servertests/st_putfh.py
+++ b/nfs4.0/servertests/st_putfh.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check
+from .environment import check
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_putpubfh.py b/nfs4.0/servertests/st_putpubfh.py
index 0149b9d..1514fde 100644
--- a/nfs4.0/servertests/st_putpubfh.py
+++ b/nfs4.0/servertests/st_putpubfh.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check
+from .environment import check
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_putrootfh.py b/nfs4.0/servertests/st_putrootfh.py
index dd47f58..b13c694 100644
--- a/nfs4.0/servertests/st_putrootfh.py
+++ b/nfs4.0/servertests/st_putrootfh.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check
+from .environment import check
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_read.py b/nfs4.0/servertests/st_read.py
index 15f8795..1eb996c 100644
--- a/nfs4.0/servertests/st_read.py
+++ b/nfs4.0/servertests/st_read.py
@@ -1,6 +1,6 @@
from xdrdef.nfs4_const import *
-from environment import check, makeBadID, makeBadIDganesha, makeStaleId
-import rpc
+from .environment import check, makeBadID, makeBadIDganesha, makeStaleId
+import rpc.rpc as rpc
def _compare(t, res, expect, eof=True):
def shorten(str):
diff --git a/nfs4.0/servertests/st_readdir.py b/nfs4.0/servertests/st_readdir.py
index 798b2d0..b9a8a4d 100644
--- a/nfs4.0/servertests/st_readdir.py
+++ b/nfs4.0/servertests/st_readdir.py
@@ -1,6 +1,6 @@
from xdrdef.nfs4_const import *
from nfs4lib import get_attr_name
-from environment import check
+from .environment import check
def _compare(t, entries, expect, attrlist=[]):
names = [e.name for e in entries]
diff --git a/nfs4.0/servertests/st_readlink.py b/nfs4.0/servertests/st_readlink.py
index 8b905d0..d8e3ea1 100644
--- a/nfs4.0/servertests/st_readlink.py
+++ b/nfs4.0/servertests/st_readlink.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check
+from .environment import check
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_reboot.py b/nfs4.0/servertests/st_reboot.py
index 16cb008..2a03e60 100644
--- a/nfs4.0/servertests/st_reboot.py
+++ b/nfs4.0/servertests/st_reboot.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check
+from .environment import check
import os
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_releaselockowner.py b/nfs4.0/servertests/st_releaselockowner.py
index 17dfe1a..8021ddf 100644
--- a/nfs4.0/servertests/st_releaselockowner.py
+++ b/nfs4.0/servertests/st_releaselockowner.py
@@ -1,6 +1,6 @@
from xdrdef.nfs4_const import *
from xdrdef.nfs4_type import lock_owner4
-from environment import check
+from .environment import check
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_remove.py b/nfs4.0/servertests/st_remove.py
index 5f531f4..a9c397f 100644
--- a/nfs4.0/servertests/st_remove.py
+++ b/nfs4.0/servertests/st_remove.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check, get_invalid_utf8strings
+from .environment import check, get_invalid_utf8strings
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_rename.py b/nfs4.0/servertests/st_rename.py
index 8f41763..3a7fa1e 100644
--- a/nfs4.0/servertests/st_rename.py
+++ b/nfs4.0/servertests/st_rename.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check, get_invalid_utf8strings
+from .environment import check, get_invalid_utf8strings
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_renew.py b/nfs4.0/servertests/st_renew.py
index 3a9f774..679363c 100644
--- a/nfs4.0/servertests/st_renew.py
+++ b/nfs4.0/servertests/st_renew.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check
+from .environment import check
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_replay.py b/nfs4.0/servertests/st_replay.py
index 81b8332..3eba563 100644
--- a/nfs4.0/servertests/st_replay.py
+++ b/nfs4.0/servertests/st_replay.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check
+from .environment import check
from xdrdef.nfs4_type import *
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_restorefh.py b/nfs4.0/servertests/st_restorefh.py
index 839079f..e5db09a 100644
--- a/nfs4.0/servertests/st_restorefh.py
+++ b/nfs4.0/servertests/st_restorefh.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check
+from .environment import check
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_savefh.py b/nfs4.0/servertests/st_savefh.py
index eef810c..c574718 100644
--- a/nfs4.0/servertests/st_savefh.py
+++ b/nfs4.0/servertests/st_savefh.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check
+from .environment import check
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_secinfo.py b/nfs4.0/servertests/st_secinfo.py
index eb874b1..6c828bf 100644
--- a/nfs4.0/servertests/st_secinfo.py
+++ b/nfs4.0/servertests/st_secinfo.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check, get_invalid_utf8strings
+from .environment import check, get_invalid_utf8strings
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_setattr.py b/nfs4.0/servertests/st_setattr.py
index aa7123b..edf8caa 100644
--- a/nfs4.0/servertests/st_setattr.py
+++ b/nfs4.0/servertests/st_setattr.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check, get_invalid_utf8strings
+from .environment import check, get_invalid_utf8strings
from nfs4lib import bitmap2list, dict2fattr
from xdrdef.nfs4_type import nfstime4, settime4
import nfs_ops
diff --git a/nfs4.0/servertests/st_setclientid.py b/nfs4.0/servertests/st_setclientid.py
index 7f42d2d..6ad91f8 100644
--- a/nfs4.0/servertests/st_setclientid.py
+++ b/nfs4.0/servertests/st_setclientid.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check
+from .environment import check
import os
import struct, time
import nfs_ops
diff --git a/nfs4.0/servertests/st_setclientidconfirm.py b/nfs4.0/servertests/st_setclientidconfirm.py
index 51f7981..4ecf635 100644
--- a/nfs4.0/servertests/st_setclientidconfirm.py
+++ b/nfs4.0/servertests/st_setclientidconfirm.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check
+from .environment import check
import os
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_spoof.py b/nfs4.0/servertests/st_spoof.py
index 777985e..68778d4 100644
--- a/nfs4.0/servertests/st_spoof.py
+++ b/nfs4.0/servertests/st_spoof.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check
+from .environment import check
def testSpoofUser(t, env):
"""SPOOF test, try to spoof user
diff --git a/nfs4.0/servertests/st_verify.py b/nfs4.0/servertests/st_verify.py
index 219d0a0..16d7c0c 100644
--- a/nfs4.0/servertests/st_verify.py
+++ b/nfs4.0/servertests/st_verify.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check, get_invalid_clientid, makeStaleId
+from .environment import check, get_invalid_clientid, makeStaleId
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/servertests/st_write.py b/nfs4.0/servertests/st_write.py
index 5b48153..70ff49e 100644
--- a/nfs4.0/servertests/st_write.py
+++ b/nfs4.0/servertests/st_write.py
@@ -1,8 +1,8 @@
from xdrdef.nfs4_const import *
from xdrdef.nfs4_type import *
-from environment import check, compareTimes, makeBadID, makeBadIDganesha, makeStaleId
+from .environment import check, compareTimes, makeBadID, makeBadIDganesha, makeStaleId
import struct
-import rpc
+import rpc.rpc as rpc
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.0/testserver.py b/nfs4.0/testserver.py
index 581dc3e..ebce58d 100755
--- a/nfs4.0/testserver.py
+++ b/nfs4.0/testserver.py
@@ -40,7 +40,7 @@ import testmod
from optparse import OptionParser, OptionGroup, IndentedHelpFormatter
import servertests.environment as environment
import socket
-import rpc
+import rpc.rpc as rpc
import pickle
VERSION="0.2" # How/when update this?
diff --git a/nfs4.1/client41tests/ct_reboot.py b/nfs4.1/client41tests/ct_reboot.py
index 3bd241b..efbd74e 100644
--- a/nfs4.1/client41tests/ct_reboot.py
+++ b/nfs4.1/client41tests/ct_reboot.py
@@ -1,5 +1,5 @@
import os
-from environment import fail
+from .environment import fail
def testReboot(t, env):
"""Test reboot
diff --git a/nfs4.1/client41tests/environment.py b/nfs4.1/client41tests/environment.py
index 933264c..09d07c2 100644
--- a/nfs4.1/client41tests/environment.py
+++ b/nfs4.1/client41tests/environment.py
@@ -12,7 +12,7 @@ import time
import testmod
from xdrdef.nfs4_const import *
from xdrdef.nfs4_type import *
-import rpc
+import rpc.rpc as rpc
import nfs4client
import os
import nfs4lib
diff --git a/nfs4.1/dataserver.py b/nfs4.1/dataserver.py
index af0e35a..f76ca5a 100644
--- a/nfs4.1/dataserver.py
+++ b/nfs4.1/dataserver.py
@@ -1,4 +1,4 @@
-import rpc
+import rpc.rpc as rpc
import nfs4lib
import xdrdef.nfs4_type as type4
from xdrdef.nfs4_pack import NFS4Packer
diff --git a/nfs4.1/nfs3client.py b/nfs4.1/nfs3client.py
index 176765c..f98f691 100644
--- a/nfs4.1/nfs3client.py
+++ b/nfs4.1/nfs3client.py
@@ -1,5 +1,5 @@
import use_local # HACK so don't have to rebuild constantly
-import rpc
+import rpc.rpc as rpc
import nfs4lib
#from nfs4lib import NFS4Error, NFS4Replay, inc_u32
from xdrdef.sctrl_pack import SCTRLPacker, SCTRLUnpacker
diff --git a/nfs4.1/nfs4client.py b/nfs4.1/nfs4client.py
index 0588d7b..e8c649b 100644
--- a/nfs4.1/nfs4client.py
+++ b/nfs4.1/nfs4client.py
@@ -1,5 +1,5 @@
import use_local # HACK so don't have to rebuild constantly
-import rpc
+import rpc.rpc as rpc
import nfs4lib
from nfs4lib import NFS4Error, NFS4Replay, inc_u32
from xdrdef.nfs4_type import *
diff --git a/nfs4.1/nfs4lib.py b/nfs4.1/nfs4lib.py
index 20eae0f..d46706a 100644
--- a/nfs4.1/nfs4lib.py
+++ b/nfs4.1/nfs4lib.py
@@ -1,5 +1,5 @@
from __future__ import with_statement
-import rpc
+import rpc.rpc as rpc
import xdrdef.nfs4_const
from xdrdef.nfs4_pack import NFS4Packer, NFS4Unpacker
import xdrdef.nfs4_type
diff --git a/nfs4.1/nfs4proxy.py b/nfs4.1/nfs4proxy.py
index efb6744..dc8fdd4 100755
--- a/nfs4.1/nfs4proxy.py
+++ b/nfs4.1/nfs4proxy.py
@@ -3,7 +3,7 @@ from __future__ import with_statement
import use_local # HACK so don't have to rebuild constantly
import nfs4lib
from nfs4lib import inc_u32, NFS4Error, NFS4Replay
-import rpc
+import rpc.rpc as rpc
from xdrdef.nfs4_const import *
from xdrdef.nfs4_type import *
from xdrdef.sctrl_pack import SCTRLPacker, SCTRLUnpacker
diff --git a/nfs4.1/nfs4server.py b/nfs4.1/nfs4server.py
index cd78082..767319d 100755
--- a/nfs4.1/nfs4server.py
+++ b/nfs4.1/nfs4server.py
@@ -3,7 +3,7 @@ from __future__ import with_statement
import use_local # HACK so don't have to rebuild constantly
import nfs4lib
from nfs4lib import inc_u32, NFS4Error, NFS4Replay
-import rpc
+import rpc.rpc as rpc
from xdrdef.nfs4_const import *
from xdrdef.nfs4_type import *
from xdrdef.sctrl_pack import SCTRLPacker, SCTRLUnpacker
diff --git a/nfs4.1/nfs4state.py b/nfs4.1/nfs4state.py
index 95f84df..f2cad04 100644
--- a/nfs4.1/nfs4state.py
+++ b/nfs4.1/nfs4state.py
@@ -9,7 +9,7 @@ from nfs4lib import NFS4Error
from xdrdef.nfs4_type import *
from xdrdef.nfs4_const import *
import nfs_ops
-import rpc
+import rpc.rpc as rpc
import logging
log = logging.getLogger("nfs.server.state")
diff --git a/nfs4.1/server41tests/environment.py b/nfs4.1/server41tests/environment.py
index 360089e..9e1201f 100644
--- a/nfs4.1/server41tests/environment.py
+++ b/nfs4.1/server41tests/environment.py
@@ -12,7 +12,7 @@ import time
import testmod
from xdrdef.nfs4_const import *
from xdrdef.nfs4_type import *
-import rpc
+import rpc.rpc as rpc
import nfs4client
import sys
import os
diff --git a/nfs4.1/server41tests/st_block.py b/nfs4.1/server41tests/st_block.py
index 2041de3..3cfc1c6 100644
--- a/nfs4.1/server41tests/st_block.py
+++ b/nfs4.1/server41tests/st_block.py
@@ -2,7 +2,7 @@ from xdrdef.nfs4_const import *
from xdrdef.nfs4_type import *
import nfs_ops
op = nfs_ops.NFS4ops()
-from environment import check, fail, create_file
+from .environment import check, fail, create_file
from block import Packer as BlockPacker, Unpacker as BlockUnpacker, \
PNFS_BLOCK_READWRITE_DATA, pnfs_block_layoutupdate4, \
pnfs_block_extent4
diff --git a/nfs4.1/server41tests/st_compound.py b/nfs4.1/server41tests/st_compound.py
index 3915dd8..ded5465 100644
--- a/nfs4.1/server41tests/st_compound.py
+++ b/nfs4.1/server41tests/st_compound.py
@@ -1,7 +1,7 @@
from xdrdef.nfs4_const import *
import nfs_ops
op = nfs_ops.NFS4ops()
-from environment import check, fail, get_invalid_utf8strings
+from .environment import check, fail, get_invalid_utf8strings
from xdrdef.nfs4_type import *
from rpc import RPCAcceptError, GARBAGE_ARGS, RPCTimeout
from nfs4lib import NFS4Error, hash_oids, encrypt_oids, FancyNFS4Packer
diff --git a/nfs4.1/server41tests/st_create_session.py b/nfs4.1/server41tests/st_create_session.py
index 5018ec6..a638990 100644
--- a/nfs4.1/server41tests/st_create_session.py
+++ b/nfs4.1/server41tests/st_create_session.py
@@ -1,7 +1,7 @@
from xdrdef.nfs4_const import *
import nfs_ops
op = nfs_ops.NFS4ops()
-from environment import check, fail, create_file, open_file
+from .environment import check, fail, create_file, open_file
from xdrdef.nfs4_type import *
import random
import nfs4lib
diff --git a/nfs4.1/server41tests/st_current_stateid.py b/nfs4.1/server41tests/st_current_stateid.py
index 819dfb1..58f6e9b 100644
--- a/nfs4.1/server41tests/st_current_stateid.py
+++ b/nfs4.1/server41tests/st_current_stateid.py
@@ -1,8 +1,8 @@
from st_create_session import create_session
from xdrdef.nfs4_const import *
-from environment import check, fail, create_file, open_file, close_file
-from environment import open_create_file_op, use_obj
+from .environment import check, fail, create_file, open_file, close_file
+from .environment import open_create_file_op, use_obj
from xdrdef.nfs4_type import open_owner4, openflag4, createhow4, open_claim4
from xdrdef.nfs4_type import creatverfattr, fattr4, stateid4, locker4, lock_owner4
from xdrdef.nfs4_type import open_to_lock_owner4
diff --git a/nfs4.1/server41tests/st_debug.py b/nfs4.1/server41tests/st_debug.py
index 345fc77..3e3087d 100644
--- a/nfs4.1/server41tests/st_debug.py
+++ b/nfs4.1/server41tests/st_debug.py
@@ -1,6 +1,6 @@
from st_create_session import create_session
from xdrdef.nfs4_const import *
-from environment import check, fail, create_file, close_file
+from .environment import check, fail, create_file, close_file
from xdrdef.nfs4_type import open_owner4, openflag4, createhow4, open_claim4
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.1/server41tests/st_delegation.py b/nfs4.1/server41tests/st_delegation.py
index cbabb85..4f05bf1 100644
--- a/nfs4.1/server41tests/st_delegation.py
+++ b/nfs4.1/server41tests/st_delegation.py
@@ -2,7 +2,7 @@ from st_create_session import create_session
from st_open import open_claim4
from xdrdef.nfs4_const import *
-from environment import check, fail, create_file, open_file, close_file
+from .environment import check, fail, create_file, open_file, close_file
from xdrdef.nfs4_type import *
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.1/server41tests/st_destroy_clientid.py b/nfs4.1/server41tests/st_destroy_clientid.py
index 25cc12a..50081b1 100644
--- a/nfs4.1/server41tests/st_destroy_clientid.py
+++ b/nfs4.1/server41tests/st_destroy_clientid.py
@@ -1,6 +1,6 @@
from st_create_session import create_session
from xdrdef.nfs4_const import *
-from environment import check, fail
+from .environment import check, fail
import nfs_ops
op = nfs_ops.NFS4ops()
import nfs4lib
diff --git a/nfs4.1/server41tests/st_destroy_session.py b/nfs4.1/server41tests/st_destroy_session.py
index c776617..c80c845 100644
--- a/nfs4.1/server41tests/st_destroy_session.py
+++ b/nfs4.1/server41tests/st_destroy_session.py
@@ -1,11 +1,11 @@
from st_create_session import create_session
from xdrdef.nfs4_const import *
-from environment import check, fail, create_file, open_file
+from .environment import check, fail, create_file, open_file
from xdrdef.nfs4_type import open_owner4, openflag4, createhow4, open_claim4
import nfs_ops
op = nfs_ops.NFS4ops()
import threading
-import rpc
+import rpc.rpc as rpc
def testDestroy(t, env):
"""
diff --git a/nfs4.1/server41tests/st_exchange_id.py b/nfs4.1/server41tests/st_exchange_id.py
index 9becec6..5a29634 100644
--- a/nfs4.1/server41tests/st_exchange_id.py
+++ b/nfs4.1/server41tests/st_exchange_id.py
@@ -2,7 +2,7 @@ from xdrdef.nfs4_const import *
import nfs_ops
op = nfs_ops.NFS4ops()
import time
-from environment import check, fail
+from .environment import check, fail
from xdrdef.nfs4_type import *
from rpc import RPCAcceptError, GARBAGE_ARGS, RPCTimeout
from nfs4lib import NFS4Error, hash_oids, encrypt_oids
diff --git a/nfs4.1/server41tests/st_flex.py b/nfs4.1/server41tests/st_flex.py
index 35be489..335b2c8 100644
--- a/nfs4.1/server41tests/st_flex.py
+++ b/nfs4.1/server41tests/st_flex.py
@@ -3,7 +3,7 @@ from xdrdef.nfs4_type import *
from xdrdef.nfs4_pack import *
import nfs_ops
op = nfs_ops.NFS4ops()
-from environment import check, fail, create_file, close_file, open_create_file_op
+from .environment import check, fail, create_file, close_file, open_create_file_op
from xdrdef.nfs4_pack import NFS4Packer as FlexPacker, \
NFS4Unpacker as FlexUnpacker
from nfs4lib import FancyNFS4Packer, get_nfstime
diff --git a/nfs4.1/server41tests/st_getdevicelist.py b/nfs4.1/server41tests/st_getdevicelist.py
index edf5fe4..aff510e 100644
--- a/nfs4.1/server41tests/st_getdevicelist.py
+++ b/nfs4.1/server41tests/st_getdevicelist.py
@@ -1,6 +1,6 @@
from xdrdef.nfs4_const import *
from xdrdef.nfs4_type import *
-from environment import check, fail, use_obj, open_file, create_file, get_blocksize
+from .environment import check, fail, use_obj, open_file, create_file, get_blocksize
import nfs_ops
op = nfs_ops.NFS4ops()
from block import Packer as BlockPacker, Unpacker as BlockUnpacker, \
diff --git a/nfs4.1/server41tests/st_lookup.py b/nfs4.1/server41tests/st_lookup.py
index 3899425..c46e7d2 100644
--- a/nfs4.1/server41tests/st_lookup.py
+++ b/nfs4.1/server41tests/st_lookup.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check, fail
+from .environment import check, fail
import nfs_ops
op = nfs_ops.NFS4ops()
@@ -64,7 +64,7 @@ def testLongName(t, env):
##############################################################
if 0:
- from environment import check, get_invalid_utf8strings
+ from .environment import check, get_invalid_utf8strings
def testDir(t, env):
"""LOOKUP testtree dir
diff --git a/nfs4.1/server41tests/st_lookupp.py b/nfs4.1/server41tests/st_lookupp.py
index 4c863a4..c91e39e 100644
--- a/nfs4.1/server41tests/st_lookupp.py
+++ b/nfs4.1/server41tests/st_lookupp.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check, fail, use_obj
+from .environment import check, fail, use_obj
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.1/server41tests/st_open.py b/nfs4.1/server41tests/st_open.py
index 473732d..ceca656 100644
--- a/nfs4.1/server41tests/st_open.py
+++ b/nfs4.1/server41tests/st_open.py
@@ -1,8 +1,8 @@
from st_create_session import create_session
from xdrdef.nfs4_const import *
-from environment import check, fail, create_file, open_file, close_file
-from environment import open_create_file_op
+from .environment import check, fail, create_file, open_file, close_file
+from .environment import open_create_file_op
from xdrdef.nfs4_type import open_owner4, openflag4, createhow4, open_claim4
from xdrdef.nfs4_type import creatverfattr, fattr4, stateid4, locker4, lock_owner4
from xdrdef.nfs4_type import open_to_lock_owner4
diff --git a/nfs4.1/server41tests/st_putfh.py b/nfs4.1/server41tests/st_putfh.py
index e1d6320..f8bfa71 100644
--- a/nfs4.1/server41tests/st_putfh.py
+++ b/nfs4.1/server41tests/st_putfh.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check, fail, use_obj, create_confirm, close_file
+from .environment import check, fail, use_obj, create_confirm, close_file
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.1/server41tests/st_reboot.py b/nfs4.1/server41tests/st_reboot.py
index b19c343..b852ded 100644
--- a/nfs4.1/server41tests/st_reboot.py
+++ b/nfs4.1/server41tests/st_reboot.py
@@ -1,6 +1,6 @@
from xdrdef.nfs4_const import *
from xdrdef.nfs4_type import *
-from environment import check, fail, create_file, open_file, create_confirm
+from .environment import check, fail, create_file, open_file, create_confirm
import sys
import os
import nfs4lib
diff --git a/nfs4.1/server41tests/st_reclaim_complete.py b/nfs4.1/server41tests/st_reclaim_complete.py
index 642ada2..ee51843 100644
--- a/nfs4.1/server41tests/st_reclaim_complete.py
+++ b/nfs4.1/server41tests/st_reclaim_complete.py
@@ -1,6 +1,6 @@
from st_create_session import create_session
from xdrdef.nfs4_const import *
-from environment import check, fail, open_file, create_file, create_confirm
+from .environment import check, fail, open_file, create_file, create_confirm
import nfs_ops
op = nfs_ops.NFS4ops()
import nfs4lib
diff --git a/nfs4.1/server41tests/st_rename.py b/nfs4.1/server41tests/st_rename.py
index c7c2c20..3042909 100644
--- a/nfs4.1/server41tests/st_rename.py
+++ b/nfs4.1/server41tests/st_rename.py
@@ -1,5 +1,5 @@
from xdrdef.nfs4_const import *
-from environment import check, fail, maketree, rename_obj, get_invalid_utf8strings, create_obj, create_confirm, link, use_obj, create_file
+from .environment import check, fail, maketree, rename_obj, get_invalid_utf8strings, create_obj, create_confirm, link, use_obj, create_file
import nfs_ops
op = nfs_ops.NFS4ops()
from xdrdef.nfs4_type import *
diff --git a/nfs4.1/server41tests/st_secinfo.py b/nfs4.1/server41tests/st_secinfo.py
index 008dc1e..d7f9557 100644
--- a/nfs4.1/server41tests/st_secinfo.py
+++ b/nfs4.1/server41tests/st_secinfo.py
@@ -1,6 +1,6 @@
from st_create_session import create_session
from xdrdef.nfs4_const import *
-from environment import check, fail, use_obj, bad_sessionid, create_file
+from .environment import check, fail, use_obj, bad_sessionid, create_file
from xdrdef.nfs4_type import channel_attrs4
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.1/server41tests/st_secinfo_no_name.py b/nfs4.1/server41tests/st_secinfo_no_name.py
index 9cd6bd3..a044940 100644
--- a/nfs4.1/server41tests/st_secinfo_no_name.py
+++ b/nfs4.1/server41tests/st_secinfo_no_name.py
@@ -1,6 +1,6 @@
from st_create_session import create_session
from xdrdef.nfs4_const import *
-from environment import check, fail, bad_sessionid, create_file
+from .environment import check, fail, bad_sessionid, create_file
from xdrdef.nfs4_type import channel_attrs4
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.1/server41tests/st_sequence.py b/nfs4.1/server41tests/st_sequence.py
index 25e5113..208160f 100644
--- a/nfs4.1/server41tests/st_sequence.py
+++ b/nfs4.1/server41tests/st_sequence.py
@@ -1,6 +1,6 @@
from st_create_session import create_session
from xdrdef.nfs4_const import *
-from environment import check, fail, bad_sessionid, create_file
+from .environment import check, fail, bad_sessionid, create_file
from xdrdef.nfs4_type import channel_attrs4
import nfs_ops
op = nfs_ops.NFS4ops()
diff --git a/nfs4.1/server41tests/st_sparse.py b/nfs4.1/server41tests/st_sparse.py
index 6adf3d6..06be19e 100644
--- a/nfs4.1/server41tests/st_sparse.py
+++ b/nfs4.1/server41tests/st_sparse.py
@@ -1,6 +1,6 @@
from st_create_session import create_session
from xdrdef.nfs4_const import *
-from environment import check, fail, create_file
+from .environment import check, fail, create_file
import nfs_ops
op = nfs_ops.NFS4ops()
import nfs4lib
diff --git a/nfs4.1/server41tests/st_trunking.py b/nfs4.1/server41tests/st_trunking.py
index 684423d..72afa1f 100644
--- a/nfs4.1/server41tests/st_trunking.py
+++ b/nfs4.1/server41tests/st_trunking.py
@@ -1,7 +1,7 @@
from xdrdef.nfs4_const import *
import nfs_ops
op = nfs_ops.NFS4ops()
-from environment import check, fail
+from .environment import check, fail
from xdrdef.nfs4_type import *
import random
import nfs4lib
diff --git a/nfs4.1/server41tests/st_verify.py b/nfs4.1/server41tests/st_verify.py
index 7fb8a47..64d6156 100644
--- a/nfs4.1/server41tests/st_verify.py
+++ b/nfs4.1/server41tests/st_verify.py
@@ -1,7 +1,7 @@
from xdrdef.nfs4_const import *
import nfs_ops
op = nfs_ops.NFS4ops()
-from environment import check, get_invalid_clientid, makeStaleId, \
+from .environment import check, get_invalid_clientid, makeStaleId, \
do_getattrdict, use_obj
def _try_mand(t, env, path):
diff --git a/nfs4.1/testclient.py b/nfs4.1/testclient.py
index 3665253..5d21eaa 100755
--- a/nfs4.1/testclient.py
+++ b/nfs4.1/testclient.py
@@ -33,7 +33,7 @@ import testmod
from optparse import OptionParser, OptionGroup, IndentedHelpFormatter
import client41tests.environment as environment
import socket
-import rpc
+import rpc.rpc as rpc
import pickle
def parse_useparams(str):
diff --git a/nfs4.1/testserver.py b/nfs4.1/testserver.py
index 7818a5d..2becc13 100755
--- a/nfs4.1/testserver.py
+++ b/nfs4.1/testserver.py
@@ -37,7 +37,7 @@ import testmod
from optparse import OptionParser, OptionGroup, IndentedHelpFormatter
import server41tests.environment as environment
import socket
-import rpc
+import rpc.rpc as rpc
import pickle
VERSION="0.2" # How/when update this?
diff --git a/rpc/rpc.py b/rpc/rpc.py
index af2b325..46c59bf 100644
--- a/rpc/rpc.py
+++ b/rpc/rpc.py
@@ -7,7 +7,7 @@ import logging
from collections import deque as Deque
from errno import EINPROGRESS, EWOULDBLOCK
-import rpc_pack
+import rpc.rpc_pack as rpc_pack
from rpc_const import *
from rpc_type import *
--
2.17.1
^ permalink raw reply related
* [PATCH 20/24] pynfs: python3 support plan: fix 'dict' has no attribute 'iteritems'
From: jiyin @ 2018-07-24 7:33 UTC (permalink / raw)
To: bfields; +Cc: linux-nfs, Jianhong.Yin
In-Reply-To: <20180724073342.5738-1-jiyin@redhat.com>
From: "Jianhong.Yin" <yin-jianhong@163.com>
Signed-off-by: Jianhong Yin <yin-jianhong@163.com>
---
nfs4.0/lib/rpc/rpc.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nfs4.0/lib/rpc/rpc.py b/nfs4.0/lib/rpc/rpc.py
index 93f20dc..96d9aa7 100644
--- a/nfs4.0/lib/rpc/rpc.py
+++ b/nfs4.0/lib/rpc/rpc.py
@@ -519,7 +519,7 @@ class RPCServer(Server):
for secname, sectype in {'none': AUTH_NONE,
'sys': AUTH_SYS,
'gss': RPCSEC_GSS,
- }.iteritems():
+ }.items():
if secname in supported:
self.security[sectype] = supported[secname]()
--
2.17.1
^ permalink raw reply related
* [PATCH 17/24] pynfs: python3 support plan: fix indent error on python3
From: jiyin @ 2018-07-24 7:33 UTC (permalink / raw)
To: bfields; +Cc: linux-nfs, Jianhong.Yin
In-Reply-To: <20180724073342.5738-1-jiyin@redhat.com>
From: "Jianhong.Yin" <yin-jianhong@163.com>
Signed-off-by: Jianhong Yin <yin-jianhong@163.com>
---
nfs4.0/servertests/__init__.py | 2 +-
nfs4.0/servertests/st_getattr.py | 12 +++++------
nfs4.0/servertests/st_lookup.py | 8 ++++----
nfs4.0/servertests/st_open.py | 4 ++--
nfs4.0/servertests/st_opendowngrade.py | 5 ++---
nfs4.0/servertests/st_readdir.py | 8 ++++----
nfs4.0/servertests/st_write.py | 4 ++--
nfs4.1/server41tests/__init__.py | 4 ++--
nfs4.1/server41tests/environment.py | 24 +++++++++++-----------
nfs4.1/server41tests/st_current_stateid.py | 2 +-
nfs4.1/server41tests/st_delegation.py | 12 +++++------
nfs4.1/server41tests/st_destroy_session.py | 2 +-
nfs4.1/server41tests/st_flex.py | 2 +-
nfs4.1/testmod.py | 8 ++++----
14 files changed, 48 insertions(+), 49 deletions(-)
diff --git a/nfs4.0/servertests/__init__.py b/nfs4.0/servertests/__init__.py
index 4b684cb..b5f4974 100644
--- a/nfs4.0/servertests/__init__.py
+++ b/nfs4.0/servertests/__init__.py
@@ -1,5 +1,5 @@
__all__ = [ "st_access.py",
- "st_acl.py",
+ "st_acl.py",
"st_close.py",
"st_commit.py",
"st_compound.py",
diff --git a/nfs4.0/servertests/st_getattr.py b/nfs4.0/servertests/st_getattr.py
index 500542d..65a5701 100644
--- a/nfs4.0/servertests/st_getattr.py
+++ b/nfs4.0/servertests/st_getattr.py
@@ -525,18 +525,18 @@ def testOwnerName(t, env):
def xxxtestMountedOnFileid(self):
"""GETATTR(FATTR4_MOUNTED_ON_FILEID)
- This DOES NOT work on standard test tree. It assumes that pseudofs
- root / and pseudo fs node /unix exist, and that /unix is a mountpoint
- of an exported file system. The fsid of "/" should differ from the
- fsid of "/unix", and the mounted_on_fileid should != the filed with
- both the Getattr of "/unix" and the Readdir of "/".
+ This DOES NOT work on standard test tree. It assumes that pseudofs
+ root / and pseudo fs node /unix exist, and that /unix is a mountpoint
+ of an exported file system. The fsid of "/" should differ from the
+ fsid of "/unix", and the mounted_on_fileid should != the filed with
+ both the Getattr of "/unix" and the Readdir of "/".
"""
request = [FATTR4_MOUNTED_ON_FILEID, FATTR4_FILEID, FATTR4_FSID]
lookupops = [op.lookup("unix")]
ops = [op.putrootfh()]
ops.append(self.ncl.getattr(request))
- ops += lookupops
+ ops += lookupops
ops.append(self.ncl.getattr(request))
res = self.ncl.do_ops(ops)
self.assert_OK(res)
diff --git a/nfs4.0/servertests/st_lookup.py b/nfs4.0/servertests/st_lookup.py
index a57d4cb..eed7100 100644
--- a/nfs4.0/servertests/st_lookup.py
+++ b/nfs4.0/servertests/st_lookup.py
@@ -220,9 +220,9 @@ def testNonAccessable(t, env):
check(res)
res = c.compound(c.use_obj(dir + ['foo']))
if env.opts.uid == 0:
- check(res, [NFS4_OK, NFS4ERR_ACCESS], "LOOKUP object in a dir with mode=0o000")
+ check(res, [NFS4_OK, NFS4ERR_ACCESS], "LOOKUP object in a dir with mode=0o000")
else:
- check(res, NFS4ERR_ACCESS, "LOOKUP object in a dir with mode=0o000")
+ check(res, NFS4ERR_ACCESS, "LOOKUP object in a dir with mode=0o000")
def testInvalidUtf8(t, env):
"""LOOKUP with bad UTF-8 name strings should return NFS4ERR_INVAL
@@ -283,9 +283,9 @@ def testUnaccessibleDir(t, env):
check(res, msg="Setting mode=0 on directory %s" % t.code)
res = c.compound(c.use_obj(path + ['hidden']))
if env.opts.uid == 0:
- check(res, [NFS4_OK, NFS4ERR_ACCESS], "LOOKUP off of dir with mode=0o000")
+ check(res, [NFS4_OK, NFS4ERR_ACCESS], "LOOKUP off of dir with mode=0o000")
else:
- check(res, NFS4ERR_ACCESS, "LOOKUP off of dir with mode=0o000")
+ check(res, NFS4ERR_ACCESS, "LOOKUP off of dir with mode=0o000")
def testBadOpaque(t, env):
"""LOOKUP with a path component that has an incorrect array length
diff --git a/nfs4.0/servertests/st_open.py b/nfs4.0/servertests/st_open.py
index 12db5df..b4af81c 100644
--- a/nfs4.0/servertests/st_open.py
+++ b/nfs4.0/servertests/st_open.py
@@ -331,9 +331,9 @@ def testModeChange(t, env):
res = c.open_file(t.code, access=OPEN4_SHARE_ACCESS_BOTH,
deny=OPEN4_SHARE_DENY_NONE)
if env.opts.uid == 0:
- check(res, [NFS4_OK, NFS4ERR_ACCESS], "Opening file %s with mode=0o000" % t.code)
+ check(res, [NFS4_OK, NFS4ERR_ACCESS], "Opening file %s with mode=0o000" % t.code)
else:
- check(res, NFS4ERR_ACCESS, "Opening file %s with mode=0o000" % t.code)
+ check(res, NFS4ERR_ACCESS, "Opening file %s with mode=0o000" % t.code)
def testShareConflict1(t, env):
"""OPEN conflicting with previous share
diff --git a/nfs4.0/servertests/st_opendowngrade.py b/nfs4.0/servertests/st_opendowngrade.py
index 9cbf5cb..213b2dd 100644
--- a/nfs4.0/servertests/st_opendowngrade.py
+++ b/nfs4.0/servertests/st_opendowngrade.py
@@ -136,16 +136,15 @@ class open_sequence:
deny=OPEN4_SHARE_DENY_NONE,
mode=UNCHECKED4)
def downgrade(self, access):
- res = self.client.downgrade_file(self.owner, self.fh, self.stateid,
+ res = self.client.downgrade_file(self.owner, self.fh, self.stateid,
access=access,
deny=OPEN4_SHARE_DENY_NONE)
- self.stateid = res.stateid
+ self.stateid = res.stateid
def close(self):
self.client.close_file(self.owner, self.fh, self.stateid)
def lock(self, type):
self.client.lock_file(self.owner, self.fh, self.stateid,
type=type)
-
def testOpenDowngradeSequence(t, env):
"""test complex upgrade/downgrade sequence
diff --git a/nfs4.0/servertests/st_readdir.py b/nfs4.0/servertests/st_readdir.py
index fb484b6..798b2d0 100644
--- a/nfs4.0/servertests/st_readdir.py
+++ b/nfs4.0/servertests/st_readdir.py
@@ -232,9 +232,9 @@ def testUnaccessibleDir(t, env):
ops = c.use_obj(path) + [c.readdir()]
res = c.compound(ops)
if env.opts.uid == 0:
- check(res, [NFS4_OK, NFS4ERR_ACCESS], "READDIR of directory with mode=0o000")
+ check(res, [NFS4_OK, NFS4ERR_ACCESS], "READDIR of directory with mode=0o000")
else:
- check(res, NFS4ERR_ACCESS, "READDIR of directory with mode=0o000")
+ check(res, NFS4ERR_ACCESS, "READDIR of directory with mode=0o000")
def testUnaccessibleDirAttrs(t, env):
"""READDIR with (cfh) in unaccessible directory requesting attrs
@@ -253,9 +253,9 @@ def testUnaccessibleDirAttrs(t, env):
[c.readdir(attr_request=[FATTR4_RDATTR_ERROR, FATTR4_TYPE])]
res = c.compound(ops)
if env.opts.uid == 0:
- check(res, [NFS4_OK, NFS4ERR_ACCESS], "READDIR of directory with mode=0o000")
+ check(res, [NFS4_OK, NFS4ERR_ACCESS], "READDIR of directory with mode=0o000")
else:
- check(res, NFS4ERR_ACCESS, "READDIR of directory with mode=0o000")
+ check(res, NFS4ERR_ACCESS, "READDIR of directory with mode=0o000")
###########################################
diff --git a/nfs4.0/servertests/st_write.py b/nfs4.0/servertests/st_write.py
index 4777e1b..5b48153 100644
--- a/nfs4.0/servertests/st_write.py
+++ b/nfs4.0/servertests/st_write.py
@@ -438,8 +438,8 @@ def testLargeReadWrite(t, env):
check(res)
data = res.resarray[-2].switch.switch.data
if len(data) != len(writedata):
- t.fail("READ returned %d bytes, expected %d" %
- (len(data), len(writedata)))
+ t.fail("READ returned %d bytes, expected %d" %
+ (len(data), len(writedata)))
if (data != '\0'*size):
t.fail("READ returned unexpected data")
res = c.read_file(fh, 0, size)
diff --git a/nfs4.1/server41tests/__init__.py b/nfs4.1/server41tests/__init__.py
index a38c314..47bdd79 100644
--- a/nfs4.1/server41tests/__init__.py
+++ b/nfs4.1/server41tests/__init__.py
@@ -7,7 +7,7 @@ __all__ = ["st_exchange_id.py", # draft 21
"st_secinfo_no_name.py",
"st_secinfo.py",
"st_sequence.py",
- "st_trunking.py",
+ "st_trunking.py",
"st_open.py",
"st_delegation.py",
"st_verify.py",
@@ -22,6 +22,6 @@ __all__ = ["st_exchange_id.py", # draft 21
## "st_debug.py",
## "st_loop",
"st_current_stateid.py",
- "st_sparse.py",
+ "st_sparse.py",
"st_flex.py",
]
diff --git a/nfs4.1/server41tests/environment.py b/nfs4.1/server41tests/environment.py
index 3020371..360089e 100644
--- a/nfs4.1/server41tests/environment.py
+++ b/nfs4.1/server41tests/environment.py
@@ -471,12 +471,12 @@ def create_obj(sess, path, kind=NF4DIR, attrs={FATTR4_MODE:0o755}):
def open_create_file(sess, owner, path=None, attrs={FATTR4_MODE: 0o644},
access=OPEN4_SHARE_ACCESS_BOTH,
deny=OPEN4_SHARE_DENY_NONE,
- mode=GUARDED4, verifier=None,
- claim_type=CLAIM_NULL,
- want_deleg=False,
- deleg_type=None,
- open_create=OPEN4_NOCREATE,
- seqid=0, clientid=0):
+ mode=GUARDED4, verifier=None,
+ claim_type=CLAIM_NULL,
+ want_deleg=False,
+ deleg_type=None,
+ open_create=OPEN4_NOCREATE,
+ seqid=0, clientid=0):
open_op = open_create_file_op(sess, owner, path, attrs, access, deny, mode,
verifier, claim_type, want_deleg, deleg_type,
open_create, seqid, clientid)
@@ -486,12 +486,12 @@ def open_create_file(sess, owner, path=None, attrs={FATTR4_MODE: 0o644},
def open_create_file_op(sess, owner, path=None, attrs={FATTR4_MODE: 0o644},
access=OPEN4_SHARE_ACCESS_BOTH,
deny=OPEN4_SHARE_DENY_NONE,
- mode=GUARDED4, verifier=None,
- claim_type=CLAIM_NULL,
- want_deleg=False,
- deleg_type=None,
- open_create=OPEN4_NOCREATE,
- seqid=0, clientid=0):
+ mode=GUARDED4, verifier=None,
+ claim_type=CLAIM_NULL,
+ want_deleg=False,
+ deleg_type=None,
+ open_create=OPEN4_NOCREATE,
+ seqid=0, clientid=0):
# Set defaults
if path is None:
dir = sess.c.homedir
diff --git a/nfs4.1/server41tests/st_current_stateid.py b/nfs4.1/server41tests/st_current_stateid.py
index 792eee8..819dfb1 100644
--- a/nfs4.1/server41tests/st_current_stateid.py
+++ b/nfs4.1/server41tests/st_current_stateid.py
@@ -43,7 +43,7 @@ def testLockLockU(t, env):
open_to_lock_owner = open_to_lock_owner4( 0, stateid, 0, lock_owner4(0, "lock1"))
lock_owner = locker4(open_owner=open_to_lock_owner, new_lock_owner=True)
lock_ops = [ op.lock(WRITE_LT, False, 0, NFS4_UINT64_MAX, lock_owner),
- op.locku(WRITE_LT, 0, current_stateid, 0, NFS4_UINT64_MAX) ]
+ op.locku(WRITE_LT, 0, current_stateid, 0, NFS4_UINT64_MAX) ]
res = sess1.compound([op.putfh(fh)] + lock_ops)
check(res, NFS4_OK)
res = close_file(sess1, fh, stateid=stateid)
diff --git a/nfs4.1/server41tests/st_delegation.py b/nfs4.1/server41tests/st_delegation.py
index c5959f6..cbabb85 100644
--- a/nfs4.1/server41tests/st_delegation.py
+++ b/nfs4.1/server41tests/st_delegation.py
@@ -27,8 +27,8 @@ def __create_file_with_deleg(sess, name, access):
return (fh, deleg)
def _create_file_with_deleg(sess, name, access):
- fh, deleg = __create_file_with_deleg(sess, name, access)
- return fh
+ fh, deleg = __create_file_with_deleg(sess, name, access)
+ return fh
def _testDeleg(t, env, openaccess, want, breakaccess, sec = None, sec2 = None):
recall = threading.Event()
@@ -182,7 +182,7 @@ def testDelegRevocation(t, env):
if res.status == NFS4_OK:
break;
check(res, [NFS4_OK, NFS4ERR_DELAY])
- # just to keep sess1 renewed. This is a bit fragile, as we
+ # just to keep sess1 renewed. This is a bit fragile, as we
# depend on the above compound waiting no longer than the
# server's lease period:
res = sess1.compound([])
@@ -196,7 +196,7 @@ def testDelegRevocation(t, env):
" sucess of open conflicting with delegation")
flags &= ~SEQ4_STATUS_RECALLABLE_STATE_REVOKED
if flags:
- print("WARNING: unexpected status flag(s) 0x%x set" % flags);
+ print("WARNING: unexpected status flag(s) 0x%x set" % flags);
res = sess1.update_seq_state(res, slot)
res = sess1.compound([op.test_stateid([delegstateid])])
stateid_stat = res.resarray[0].tsr_status_codes[0]
@@ -210,7 +210,7 @@ def testDelegRevocation(t, env):
res = sess1.c.compound([seq_op])
flags = res.resarray[0].sr_status_flags
if flags & SEQ4_STATUS_RECALLABLE_STATE_REVOKED:
- fail("SEQ4_STATUS_RECALLABLE_STATE_REVOKED should be cleared after"
- " FREE_STATEID")
+ fail("SEQ4_STATUS_RECALLABLE_STATE_REVOKED should be cleared after"
+ " FREE_STATEID")
if flags & ~SEQ4_STATUS_RECALLABLE_STATE_REVOKED:
print("WARNING: unexpected status flag(s) 0x%x set" % flags)
diff --git a/nfs4.1/server41tests/st_destroy_session.py b/nfs4.1/server41tests/st_destroy_session.py
index 466845d..c776617 100644
--- a/nfs4.1/server41tests/st_destroy_session.py
+++ b/nfs4.1/server41tests/st_destroy_session.py
@@ -97,7 +97,7 @@ def testDestroy3(t, env):
recall.happened = True
env.notify = recall.set # This is called after compound sent to queue
def bad_post_hook(arg, env, res):
- return None;
+ return None;
def good_post_hook(arg, env, res):
return res
c = env.c1.new_client(env.testname(t))
diff --git a/nfs4.1/server41tests/st_flex.py b/nfs4.1/server41tests/st_flex.py
index a14c926..35be489 100644
--- a/nfs4.1/server41tests/st_flex.py
+++ b/nfs4.1/server41tests/st_flex.py
@@ -50,7 +50,7 @@ def testStateid1(t, env):
# From draft23 12.5.3 "After the layout stateid is established,
# the server increments by one the value of the "seqid" in each
# subsequent LAYOUTGET and LAYOUTRETURN response,
- check_seqid(lo_stateid, i + 2)
+ check_seqid(lo_stateid, i + 2)
res = close_file(sess, fh, stateid=open_stateid)
check(res)
diff --git a/nfs4.1/testmod.py b/nfs4.1/testmod.py
index 0cb76da..6f576e2 100644
--- a/nfs4.1/testmod.py
+++ b/nfs4.1/testmod.py
@@ -222,8 +222,8 @@ class Test(object):
environment.startUp()
self.runtest(self, environment)
self.result = self._pass_result
- environment.clean_sessions()
- environment.clean_clients()
+ environment.clean_sessions()
+ environment.clean_clients()
except KeyboardInterrupt:
raise
except TestException as e:
@@ -330,8 +330,8 @@ def _import_by_name(name):
def parseversions(t):
if len(t.vers_list) > 1:
- raise RuntimeError("Test %s has invalid version range %s"
- % (t.fullname, t.vers_list))
+ raise RuntimeError("Test %s has invalid version range %s"
+ % (t.fullname, t.vers_list))
if len(t.vers_list) == 0:
return (0, sys.maxsize)
limits = t.vers_list[0].split("-")
--
2.17.1
^ permalink raw reply related
* [PATCH 18/24] pynfs: python3 support plan: fix 'TypeError: must be str, not bytes'
From: jiyin @ 2018-07-24 7:33 UTC (permalink / raw)
To: bfields; +Cc: linux-nfs, Jianhong.Yin
In-Reply-To: <20180724073342.5738-1-jiyin@redhat.com>
From: "Jianhong.Yin" <yin-jianhong@163.com>
Signed-off-by: Jianhong Yin <yin-jianhong@163.com>
---
nfs4.0/lib/rpc/rpcsec/sec_auth_sys.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/nfs4.0/lib/rpc/rpcsec/sec_auth_sys.py b/nfs4.0/lib/rpc/rpcsec/sec_auth_sys.py
index 778d379..5b7fe33 100644
--- a/nfs4.0/lib/rpc/rpcsec/sec_auth_sys.py
+++ b/nfs4.0/lib/rpc/rpcsec/sec_auth_sys.py
@@ -13,7 +13,10 @@ class SecAuthSys(SecFlavor):
try:
p = Packer()
p.pack_int(stamp)
- p.pack_string(machinename)
+ try: # for python2
+ p.pack_string(machinename)
+ except: # for python3
+ p.pack_string(bytes(machinename, 'utf-8'))
p.pack_uint(uid)
p.pack_uint(gid)
p.pack_array(gids, p.pack_uint)
--
2.17.1
^ permalink raw reply related
* [PATCH 16/24] pynfs: python3 support plan: remove cPickle
From: jiyin @ 2018-07-24 7:33 UTC (permalink / raw)
To: bfields; +Cc: linux-nfs, Jianhong.Yin
In-Reply-To: <20180724073342.5738-1-jiyin@redhat.com>
From: "Jianhong.Yin" <yin-jianhong@163.com>
Signed-off-by: Jianhong Yin <yin-jianhong@163.com>
---
nfs4.0/testserver.py | 2 +-
nfs4.1/testclient.py | 2 +-
nfs4.1/testserver.py | 2 +-
showresults.py | 1 -
4 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/nfs4.0/testserver.py b/nfs4.0/testserver.py
index fcee8e9..581dc3e 100755
--- a/nfs4.0/testserver.py
+++ b/nfs4.0/testserver.py
@@ -41,7 +41,7 @@ from optparse import OptionParser, OptionGroup, IndentedHelpFormatter
import servertests.environment as environment
import socket
import rpc
-import cPickle as pickle
+import pickle
VERSION="0.2" # How/when update this?
diff --git a/nfs4.1/testclient.py b/nfs4.1/testclient.py
index 47b74bd..3665253 100755
--- a/nfs4.1/testclient.py
+++ b/nfs4.1/testclient.py
@@ -34,7 +34,7 @@ from optparse import OptionParser, OptionGroup, IndentedHelpFormatter
import client41tests.environment as environment
import socket
import rpc
-import cPickle as pickle
+import pickle
def parse_useparams(str):
return str.split(':')
diff --git a/nfs4.1/testserver.py b/nfs4.1/testserver.py
index c21221e..7818a5d 100755
--- a/nfs4.1/testserver.py
+++ b/nfs4.1/testserver.py
@@ -38,7 +38,7 @@ from optparse import OptionParser, OptionGroup, IndentedHelpFormatter
import server41tests.environment as environment
import socket
import rpc
-import cPickle as pickle
+import pickle
VERSION="0.2" # How/when update this?
diff --git a/showresults.py b/showresults.py
index ed23f7b..0b022fa 100755
--- a/showresults.py
+++ b/showresults.py
@@ -17,7 +17,6 @@ if __name__ == "__main__":
if os.path.isfile(os.path.join(sys.path[0], 'nfs4.1', 'testmod.py')):
sys.path.insert(1, os.path.join(sys.path[0], 'nfs4.1'))
-#import cPickle as pickle
import pickle
import testmod
from optparse import OptionParser
--
2.17.1
^ permalink raw reply related
* [PATCH 15/24] pynfs: python3 support plan: fix 'socket' has no attribute '_socketobject'
From: jiyin @ 2018-07-24 7:33 UTC (permalink / raw)
To: bfields; +Cc: linux-nfs, Jianhong.Yin
In-Reply-To: <20180724073342.5738-1-jiyin@redhat.com>
From: "Jianhong.Yin" <yin-jianhong@163.com>
Signed-off-by: Jianhong Yin <yin-jianhong@163.com>
---
nfs4.0/lib/rpc/rpc.py | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/nfs4.0/lib/rpc/rpc.py b/nfs4.0/lib/rpc/rpc.py
index 86075b2..93f20dc 100644
--- a/nfs4.0/lib/rpc/rpc.py
+++ b/nfs4.0/lib/rpc/rpc.py
@@ -176,9 +176,14 @@ def _send_record(self, data, chunksize=2048):
mark = struct.pack('>L', last | len(chunk))
self.sendall(mark + chunk)
-socket._socketobject.recv_all = _recv_all
-socket._socketobject.recv_record = _recv_record
-socket._socketobject.send_record = _send_record
+try: #for python2
+ socket._socketobject.recv_all = _recv_all
+ socket._socketobject.recv_record = _recv_record
+ socket._socketobject.send_record = _send_record
+except: #for python3
+ socket.recv_all = _recv_all
+ socket.recv_record = _recv_record
+ socket.send_record = _send_record
#################################################
--
2.17.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
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.