From 85548f619e01629ca66b0b7087fab223e91fef59 Mon Sep 17 00:00:00 2001 From: Frederic Barrat Date: Fri, 11 Jun 2021 20:25:49 +0200 Subject: [PATCH 1/3] Fix test compilation We had a problem with the redefinition of _POSIX_C_SOURCE, which is set in libocxl_internal.h. It needs to be defined before including system header files. Signed-off-by: Frederic Barrat --- unittests/unittests.c | 6 +----- unittests/virtocxl.c | 5 ++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/unittests/unittests.c b/unittests/unittests.c index 8d67358..6f45de4 100644 --- a/unittests/unittests.c +++ b/unittests/unittests.c @@ -14,6 +14,7 @@ * limitations under the License. */ +#include "libocxl_internal.h" #include #include #include @@ -24,14 +25,9 @@ #include #include #include - #include - -#include "libocxl_internal.h" #include "static.h" -#include - static const char *ocxl_sysfs_path = "/tmp/ocxl-test"; static const char *ocxl_dev_path = "/dev/ocxl-test"; diff --git a/unittests/virtocxl.c b/unittests/virtocxl.c index c00f1fc..a918b70 100644 --- a/unittests/virtocxl.c +++ b/unittests/virtocxl.c @@ -14,10 +14,10 @@ * limitations under the License. */ +#include "libocxl_internal.h" #include #include #include -#include "libocxl_internal.h" #include #include #include @@ -26,7 +26,6 @@ #include #include #include - #include typedef struct ocxl_kernel_event_header ocxl_kernel_event_header; @@ -193,7 +192,7 @@ bool afu_is_attached() { * @return the thread for the device, or 0 on error */ pthread_t create_ocxl_device(const char *afu_name, size_t global_mmio_size, size_t per_pasid_mmio_size) { - char sysfs_base[PATH_MAX]; + char sysfs_base[PATH_MAX - 20]; char tmp[PATH_MAX]; char buf[BUF_SIZE]; From 6841323d391b5097179c8fe678279e2edd877043 Mon Sep 17 00:00:00 2001 From: Frederic Barrat Date: Fri, 11 Jun 2021 20:27:56 +0200 Subject: [PATCH 2/3] Update library version for future release 1.2.1 I missed the update when tagging 1.2.0. So going straight to 1.2.1 Signed-off-by: Frederic Barrat --- Makefile.vars | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.vars b/Makefile.vars index a1b4bd4..212ed2e 100644 --- a/Makefile.vars +++ b/Makefile.vars @@ -6,10 +6,10 @@ MAKEFLAGS += -rR VERSION_MAJOR = 1 # Change VERSION_MINOR on new features -VERSION_MINOR = 1 +VERSION_MINOR = 2 # Change VERSION_PATCH on each tag -VERSION_PATCH = 0 +VERSION_PATCH = 1 AR = $(CROSS_COMPILE)ar AS = $(CROSS_COMPILE)as From 78d0d5b96c0a1cd5645655e01a7a2e39b04c3640 Mon Sep 17 00:00:00 2001 From: Frederic Barrat Date: Fri, 11 Jun 2021 20:29:13 +0200 Subject: [PATCH 3/3] Update change log Signed-off-by: Frederic Barrat --- Changelog.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Changelog.md b/Changelog.md index 85a28eb..43ae128 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,16 @@ +# 1.2.1 + - Set library version correctly + - Fix test build + +# 1.2.0 +This is mostly a bug fix release, there's no major new feature: + - Fix to support devices names with a hexadecimal domain name + - Allow to override path to read driver info (LIBOCXL_SYSPATH) + - Documentation enhancements + - Makefile/build enhancements + - Add tests for debug AFUs (memcpy, afp) + + # 1.1.0 ## User facing changes - Requires Linux headers >= 4.18 to compile