From 846a43324f95c1226f89e1458b8cd9c05b78c1b6 Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Tue, 20 Mar 2018 12:11:10 +0000 Subject: [PATCH] UBUNTU: SAUCE: ubuntu_zfs_xfs_geneirc: Add support for arm64 (LP: #1755499) It turns out that the reason why xattr xfs test fails on ZFS is because the xattr tests don't have the xattr syscalls wired up to any actual syscalls on arm6 and are hard-coded to always return ENOSYS. Fix this by adding in the arm64 syscall support for the xattr family of syscalls. Also move and comment out the zfs umount $POOL as I believe it is not required but I've left it in just in case we need to enable it in the future and moved it to where I expect it could be more useful to use. Just want to add that figuring out this fix was a pain as I had to work through the ZFS + vfs kernel stack back down to userspace until I discovered that the xfs tests bypass glibc and user their own xattr compat syscall shims which was not what I expected. Signed-off-by: Colin Ian King --- ...d-syscalls-for-ARM64-platforms-LP-1755499.patch | 41 ++++++++++++++++++++++ ubuntu_zfs_xfs_generic/ubuntu_zfs_xfs_generic.py | 2 ++ ubuntu_zfs_xfs_generic/ubuntu_zfs_xfs_generic.sh | 2 +- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 ubuntu_zfs_xfs_generic/0004-Add-syscalls-for-ARM64-platforms-LP-1755499.patch diff --git a/ubuntu_zfs_xfs_generic/0004-Add-syscalls-for-ARM64-platforms-LP-1755499.patch b/ubuntu_zfs_xfs_generic/0004-Add-syscalls-for-ARM64-platforms-LP-1755499.patch new file mode 100644 index 00000000..209fc005 --- /dev/null +++ b/ubuntu_zfs_xfs_generic/0004-Add-syscalls-for-ARM64-platforms-LP-1755499.patch @@ -0,0 +1,41 @@ +From d29a24a9c30eeac73ef830c5c5342cb2cef941d2 Mon Sep 17 00:00:00 2001 +From: Colin Ian King +Date: Tue, 20 Mar 2018 09:43:29 +0000 +Subject: [PATCH] Add syscalls for ARM64 platforms (LP: #1755499) + +We currently don't have ARM64 syscall shims so we are getting +-ENOSYS returns for the extended attribute tests. Add these in. + +Signed-off-by: Colin Ian King +--- + attr/libattr/syscalls.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/attr/libattr/syscalls.c b/attr/libattr/syscalls.c +index 6ab0ca3..a8a9190 100644 +--- a/attr/libattr/syscalls.c ++++ b/attr/libattr/syscalls.c +@@ -185,6 +185,20 @@ + # define __NR_removexattr 232 + # define __NR_lremovexattr 233 + # define __NR_fremovexattr 234 ++#elif defined (__aarch64__) ++# define HAVE_XATTR_SYSCALLS 1 ++# define __NR_setxattr (5) ++# define __NR_lsetxattr (6) ++# define __NR_fsetxattr (7) ++# define __NR_getxattr (8) ++# define __NR_lgetxattr (9) ++# define __NR_fgetxattr (10) ++# define __NR_listxattr (11) ++# define __NR_llistxattr (12) ++# define __NR_flistxattr (13) ++# define __NR_removexattr (14) ++# define __NR_lremovexattr (15) ++# define __NR_fremovexattr (16) + #else + # warning "Extended attribute syscalls undefined for this architecture" + # define HAVE_XATTR_SYSCALLS 0 +-- +2.14.1 + diff --git a/ubuntu_zfs_xfs_generic/ubuntu_zfs_xfs_generic.py b/ubuntu_zfs_xfs_generic/ubuntu_zfs_xfs_generic.py index b21d5003..170998c6 100644 --- a/ubuntu_zfs_xfs_generic/ubuntu_zfs_xfs_generic.py +++ b/ubuntu_zfs_xfs_generic/ubuntu_zfs_xfs_generic.py @@ -92,6 +92,8 @@ class ubuntu_zfs_xfs_generic(test.test): utils.system('patch -p1 < %s/0002-config-use-http-https-protocol-for-firewall.patch' % self.bindir) print "Patching xfsprogs release version for lp:1753987" utils.system('patch -p1 < %s/0003-config-use-the-latest-xfsprogs-release.patch' % self.bindir) + print "Patching xfstests-bld to add ARM64 xattr syscall support" + utils.system('patch -p1 < %s/0004-Add-syscalls-for-ARM64-platforms-LP-1755499.patch' % self.bindir) print "Fetching all repos.." utils.system('./get-all') commit = "68d2ebf90d94da7d619d7556f4a5663bcca8c8f6" diff --git a/ubuntu_zfs_xfs_generic/ubuntu_zfs_xfs_generic.sh b/ubuntu_zfs_xfs_generic/ubuntu_zfs_xfs_generic.sh index 79fce082..f9974273 100755 --- a/ubuntu_zfs_xfs_generic/ubuntu_zfs_xfs_generic.sh +++ b/ubuntu_zfs_xfs_generic/ubuntu_zfs_xfs_generic.sh @@ -44,7 +44,6 @@ zfs set dedup=on $POOL/$TESTDIR zfs set mountpoint=legacy $POOL/$TESTDIR zfs set mountpoint=legacy $POOL/$SCRATCHDIR -zfs umount $POOL echo "VDEVs in ${VDEV_PATH}" mkdir /mnt/$TESTDIR /mnt/$SCRATCHDIR @@ -52,6 +51,7 @@ mkdir /mnt/$TESTDIR /mnt/$SCRATCHDIR rc=$? rmdir /mnt/$TESTDIR /mnt/$SCRATCHDIR +#zfs umount $POOL echo "Destroying zfs pool $POOL" zpool destroy $POOL echo "Removing VDEVs in ${VDEV_PATH}" -- 2.14.1