flux-framework / flux-core

core services for the Flux resource management framework
GNU Lesser General Public License v3.0
167 stars 50 forks source link

test/kvs_txn.c build failure on aarch64 under rpmbuild #5615

Closed grondo closed 11 months ago

grondo commented 11 months ago

The kvs_txn.c unit test started failing to build under the rpmbuild environment on aarch64:

test/kvs_txn.c: In function 'test_corner_cases':
test/kvs_txn.c:382:51: error: incompatible type for argument 5 of 'flux_kvs_txn_vpack'
     rc = flux_kvs_txn_vpack (NULL, 0, NULL, NULL, NULL);
                                                   ^~~~
In file included from ./kvs.h:19,
                 from test/kvs_txn.c:19:
./kvs_txn.h:29:50: note: expected 'va_list' {aka '__va_list'} but argument is of type 'void *'
                         const char *fmt, va_list ap);
                                          ~~~~~~~~^~
make[4]: *** [Makefile:1118: test/kvs_txn_t-kvs_txn.o] Error 1
garlick commented 11 months ago

Maybe we need something like this?

diff --git a/src/common/libkvs/test/kvs_txn.c b/src/common/libkvs/test/kvs_txn.c
index 3de3c3ba3..a65cf5163 100644
--- a/src/common/libkvs/test/kvs_txn.c
+++ b/src/common/libkvs/test/kvs_txn.c
@@ -379,7 +379,7 @@ void test_corner_cases (void)
         "flux_kvs_txn_put fails w/ EINVAL on bad inputs");

     errno = 0;
-    rc = flux_kvs_txn_vpack (NULL, 0, NULL, NULL, NULL);
+    rc = flux_kvs_txn_vpack (NULL, 0, NULL, NULL, (va_list){0});
     ok (rc < 0 && errno == EINVAL,
         "flux_kvs_txn_vpack fails w/ EINVAL on bad inputs");
grondo commented 11 months ago

I tested this patch out in the buildfarm and it appears to have addressed the problem there.