diff --git a/auxdir/ltmain.sh b/auxdir/ltmain.sh old mode 100644 new mode 100755 diff --git a/testsuite/slurm_unit/common/Makefile.am b/testsuite/slurm_unit/common/Makefile.am index 7877f34c62c5ba627a667a4bd9b2e04be98447de..d44d04e5a6f7a508de0cdbf45cd37a3c13d6cef5 100644 --- a/testsuite/slurm_unit/common/Makefile.am +++ b/testsuite/slurm_unit/common/Makefile.am @@ -9,7 +9,7 @@ elan_lib = endif INCLUDES = -I$(top_srcdir) -LDADD = $(top_builddir)/src/common/libcommon.la \ +LDADD = $(top_builddir)/src/api/libslurm.o -ldl\ $(elan_lib) check_PROGRAMS = \ diff --git a/testsuite/slurm_unit/common/Makefile.in b/testsuite/slurm_unit/common/Makefile.in index bd23cb05c10771ca5a00ed523d61cb2dd99448e9..48d79a84c67304c1df57cf3f6296b084a58018b0 100644 --- a/testsuite/slurm_unit/common/Makefile.in +++ b/testsuite/slurm_unit/common/Makefile.in @@ -87,22 +87,22 @@ bitstring_test_SOURCES = bitstring-test.c bitstring_test_OBJECTS = bitstring-test.$(OBJEXT) bitstring_test_LDADD = $(LDADD) @HAVE_ELAN_TRUE@am__DEPENDENCIES_1 = $(top_builddir)/src/plugins/switch/elan/switch_elan.la -bitstring_test_DEPENDENCIES = $(top_builddir)/src/common/libcommon.la \ +bitstring_test_DEPENDENCIES = $(top_builddir)/src/api/libslurm.o \ $(am__DEPENDENCIES_1) log_test_SOURCES = log-test.c log_test_OBJECTS = log-test.$(OBJEXT) log_test_LDADD = $(LDADD) -log_test_DEPENDENCIES = $(top_builddir)/src/common/libcommon.la \ +log_test_DEPENDENCIES = $(top_builddir)/src/api/libslurm.o \ $(am__DEPENDENCIES_1) pack_test_SOURCES = pack-test.c pack_test_OBJECTS = pack-test.$(OBJEXT) pack_test_LDADD = $(LDADD) -pack_test_DEPENDENCIES = $(top_builddir)/src/common/libcommon.la \ +pack_test_DEPENDENCIES = $(top_builddir)/src/api/libslurm.o \ $(am__DEPENDENCIES_1) runqsw_SOURCES = runqsw.c runqsw_OBJECTS = runqsw.$(OBJEXT) runqsw_LDADD = $(LDADD) -runqsw_DEPENDENCIES = $(top_builddir)/src/common/libcommon.la \ +runqsw_DEPENDENCIES = $(top_builddir)/src/api/libslurm.o \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/slurm depcomp = $(SHELL) $(top_srcdir)/auxdir/depcomp @@ -321,7 +321,7 @@ AUTOMAKE_OPTIONS = foreign @HAVE_ELAN_FALSE@elan_lib = @HAVE_ELAN_TRUE@elan_lib = $(top_builddir)/src/plugins/switch/elan/switch_elan.la INCLUDES = -I$(top_srcdir) -LDADD = $(top_builddir)/src/common/libcommon.la \ +LDADD = $(top_builddir)/src/api/libslurm.o -ldl\ $(elan_lib) all: all-am diff --git a/testsuite/slurm_unit/common/pack-test.c b/testsuite/slurm_unit/common/pack-test.c index 3cd617b922c46e288619e1a6600852c2ff859dc3..82ac5172d1e666110cb146295d83bc500c19d846 100644 --- a/testsuite/slurm_unit/common/pack-test.c +++ b/testsuite/slurm_unit/common/pack-test.c @@ -39,10 +39,13 @@ int main (int argc, char *argv[]) char *nullstr = NULL; char *data; int data_size; + long double test_double = 1340664754944.2132312, test_double2; + uint64_t test64; buffer = init_buf (0); pack16(test16, buffer); pack32(test32, buffer); + pack64((uint64_t)test_double, buffer); packstr(testbytes, buffer); packstr(teststring, buffer); @@ -50,6 +53,7 @@ int main (int argc, char *argv[]) packstr("literal", buffer); packstr("", buffer); + data_size = get_buf_offset(buffer); printf("wrote %d bytes\n", data_size); @@ -63,7 +67,14 @@ int main (int argc, char *argv[]) unpack32(&out32, buffer); TEST(out32 != test32, "un/pack32"); - unpackstr_ptr(&outbytes, &byte_cnt, buffer); + unpack64(&test64, buffer); + test_double2 = (long double)test64; + TEST(test64 != (uint64_t)test_double, "un/pack double as a uint64"); + /* info("Original\t %Lf", test_double); */ + /* info("uint64\t %ld", test64); */ + /* info("converted LD\t %Lf", test_double2); */ + + unpackstr_ptr(&outbytes, &byte_cnt, buffer); TEST( ( strcmp(testbytes, outbytes) != 0 ) , "un/packstr_ptr"); unpackstr_xmalloc(&outstring, &byte_cnt, buffer); @@ -80,6 +91,7 @@ int main (int argc, char *argv[]) unpackstr_xmalloc(&outstring, &byte_cnt, buffer); TEST(strcmp("", outstring) != 0, "un/packstr of string \"\" "); + xfree(outstring); free_buf(buffer);