Commit Graph

51 Commits

Author SHA1 Message Date
Ondřej Nový b046ff7091 Fix building with LD_LIBRARY_PATH set
If LD_LIBRARY_PATH is set to any value, build will fail, example:
Making check in doc
...
/bin/bash: line 1: /usr/lib/libeatmydata: No such file or directory
...

See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906480

Same is true for DYLD_LIBRARY_PATH and DYLD_FALLBACK_LIBRARY_PATH.

This bug was introduced with commit 19442df2cd
where Kota removed evals, but forgot to remove prepending of same env
variables.

Change-Id: Ib7a1d6b839d4a207ee0471b55233e1ce5d958705
2018-10-01 16:35:35 +02:00
Kota Tsuyuzaki 19442df2cd Fix warning on automake tool
This patch fixes automake tools warnings as follows (and a my fault
in previous patch [1]):

- Change INCLUDES variable to APP_CPP_FLAGS and APP_C_FLAGS according to
  the warning message

- Remove non-POSIX variable to suppress that warnings

Note that the latter change may be affected to the testing so please
be careful on your review what's going on your testing environment.
In the past change [2], they ware designed to use the shared
object binaries in the build path. However, Daniel had pointed out the good
thing at [1] if we runs the test/liberasruecode_test (it's shell with linker)
in the dir, we can touch the expected binaries.

My fault in the previous patch is that I didn't replace
./test/.libs/liberasurecode_test to ./test/liberasurecode_test even
we use --trace-children=yes option for the valgrind.

Now, all tests run via ./test/<test name> syntax and IMO no matters
exist even if we remove the non-POSIX variable for test settings.

1: https://review.openstack.org/#/c/434162
2: 93446db941

Change-Id: I0e79bed7755a1f286b746a70fcf56fdc972bfd5d
2017-02-20 14:23:16 -08:00
Kota Tsuyuzaki c9136a62b6 Fix valgrind-check and memory leak
Can you believe that we ware testing the memory leak with valgrind
to just *bash scripts* instead of actual binaries on liberasurecode_test
and libec_slap?

That is why we cannot find such an easy memory leak[1] at the gate.
Now this patch enable to run the valgrind against to the binaries.

With this fix, we found various memory leak at liberasurecode_test as
follows and this patch also fixes them:

- If we create fake fragments, we're responsible for freeing all of the
  frags as well as the array holding the pointers to the frags.
- If we allocate any space, we're responsible for freeing it.
- If we create an EC descriptor, we're responsible for destroying it.
- If we create a fragment or skip array, we're responsible for freeing it.
- If that happens inside a loop, we're responsible for doing it *inside
  that same loop*.

In addition to the test fix, this patch fixes following memory leaks at
the code which is affected to other users (pyeclib, OpenStack Swift)

* Refuse to decode fragments that aren't even long enough to include
  fragment headers.
* Fix a small memory leak in the builtin rs_vand implementation.

Closes-Bug: #1665242

Co-Authored-By: Tim Burke <tim@swiftstack.com>

1: https://review.openstack.org/#/c/431812

Change-Id: I96f124e4e536bbd7544208acc084de1cda5c19b2
2017-02-20 07:45:55 -08:00
Tushar Gohad 28dec505f4 Get version from liberasurecode version header
... (keep version in one place)
2015-12-10 06:09:02 -07:00
Tushar Gohad 92bad94311 Include major API version in pkg-config file name 2015-12-10 04:00:29 -07:00
Chris Lamb aea8a26c22 Create includedir on call to install-exec-hook
Debian maintainers reported that liberasurecode could
not be built reproducibly.

What happens is that erasurecode_version.h headers are
non-determinstically installed in the target directory
depending on the system clock. This is due to
debian/tmp/usr/include not being created and the
install-exec-hook ignores errors.

The attached patch ensures target ${includedir} exists
and therefore the headers will always be there.

Signed-off-by: Chris Lamb <lamby@debian.org>
2015-12-02 09:54:48 -07:00
Tushar Gohad 398c48c95d Split helpers.h include for backward compatibility
Users of liberasurecode <= 1.0.7 used alloc/free helpers
(which they shouldn't have).  This change is to make sure
we are still able to those older revs of programs and they
work with newer liberasurecode.
2015-09-22 21:47:15 +00:00
Tushar Gohad bca105ccd3 Create header symlinks in std locations for backward compat 2015-09-20 19:39:24 +00:00
Tushar Gohad f61e907d2b Release 1.0.8 2015-07-20 11:48:35 -07:00
Tushar Gohad 379eaba7a2 Merge remote-tracking branch 'origin/new_commits_for_1_0_8' 2015-06-21 23:51:37 +00:00
Tushar Gohad 590aeec468 Add get_flags_from_cpuid.c to dist 2015-06-21 22:34:33 +00:00
Tushar Gohad fe3dec94e4 Remove remaining m4/ references 2015-06-21 22:17:08 +00:00
Kevin Greenan c2ffbd488c Fix 'make test' to properly run null and installed backend tests. 2015-06-18 13:26:12 -07:00
Kevin Greenan 1118acd645 Fixing issue #17 to namespace header files. 2015-06-18 12:31:17 -07:00
Tushar Gohad 18276412fd Fix a uint < 0 warning reported by Clang
Also add -Wall for future builds
2015-04-30 13:43:23 -07:00
Tushar Gohad 9a24890f9c Sanitize fragments_to_string() errorcodes, add tests for frags w/o fmetadata
Addresses issue#10
2015-03-28 22:33:45 -07:00
Tushar Gohad 93446db941 Set runtime ld path to point to local so's when running tests 2015-03-10 18:48:03 -07:00
Tushar Gohad c85e1bacd3 Integrate doxygen with autoconf infrastructure
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
2014-09-07 12:49:21 -07:00
Eric Lambert a3d903d4f1 Added libec_slap test 2014-08-26 16:29:08 -07:00
Eric Lambert 9b92176b4e Added ability to generate coverage data with configure --enable-gcov.
Currently only works on Linux (build/tests will run on OS X but
coverage data is not generated).
2014-08-08 13:29:01 -07:00
Kevin Greenan 4469d69a1e Distributing the generated config.h (renamed to config_erasurecode.h), since it is used by the publid headers... 2014-07-31 08:32:32 -07:00
Tushar Gohad 5b393fab81 algsig: Move jerasure backend dlopen up a level
.. also check for errors

Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
2014-07-22 18:25:30 -07:00
Tushar Gohad e96f00ee11 Disable alg_sig_test (take 2) 2014-07-22 12:43:44 -07:00
Kevin Greenan 59bec942cb Ripping out galois.[ch] and dynamically pulling the multiplication functon from jerasure 2014-07-22 13:37:39 -07:00
Tushar Gohad 94c0253253 gf: Convert exit(1)s to return statements
... shared library should not call exit()

Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
2014-07-21 09:36:33 -07:00
Tushar Gohad 8a07d41e85 Add encode postprocessing, checksum helpers
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
2014-07-21 01:19:36 -07:00
Tushar Gohad 6ad997f1c7 automake: Fix cscope target 2014-07-18 08:53:22 -07:00
Tushar Gohad a21e6e1a79 Fix --enable-debug target, make debug CFLAGS consistent (global)
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
2014-07-17 20:57:54 -07:00
Tushar Gohad 184e656d26 autoconf: Add erasurecode_helpers.h
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
2014-07-17 13:58:07 -07:00
Eric Lambert 4de14ff304 run liberasuretest as part of make test 2014-07-18 13:51:45 -07:00
Tushar Gohad cd9ba46771 alg_sig.h was moved to topdir/include
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
2014-07-17 03:03:07 -07:00
Tushar Gohad 6533759ba5 Frontend/backend API split, make EC handle int type
.. also introduce a map for backend method stub name
to backend library function names

Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
2014-07-13 19:26:23 -07:00
Tushar Gohad 411e53aae7 Enable valgrind target for all tests
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
2014-07-07 15:26:24 -07:00
Tushar Gohad ea7af2e7fc xor code backend implementation (WIP)
Facing some nasty dlopen() issues when testing with
"test/liberasurecode_test"

Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
2014-07-07 15:19:16 -07:00
Tushar Gohad 7f7687dc78 autoconf: Simplify Makefile.am by adding SUBDIRS
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
2014-07-06 09:59:06 -07:00
Tushar Gohad 6c3cb91be5 autoconf: Add cscope target
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
2014-07-05 13:24:31 -07:00
Tushar Gohad de4b779b84 Add placeholder xor backend routines
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
2014-06-30 19:52:28 -07:00
Tushar Gohad de3dbc5421 chksum: Add gf_complete dep for algsig
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
2014-06-30 09:02:24 -07:00
Tushar Gohad 152f308636 autoconf: Add liberasurecode version for libtool
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
2014-06-30 06:41:42 -07:00
Tushar Gohad 86221e2455 autoconf: Fix libXorcode LIBADD line, minor fixes
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
2014-06-30 06:37:17 -07:00
Tushar Gohad e8b6c3ec39 autoconf: Fix CPPFLAGS/include path
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
2014-06-29 21:42:09 -07:00
Tushar Gohad ce0543ac70 autoconf: Add Xorcode pkgconfig, other minor fixes
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
2014-06-29 21:42:09 -07:00
Tushar Gohad f101b311be autoconf: Tell libtool about libXorcore version
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
2014-06-29 21:42:09 -07:00
Tushar Gohad 9008d7d7ac autoconf: Incremental autoreconf fixes (take 2)
- No need for SIMD_FLAGS in the generic case
 - No need to compile against jerasure/gf_complete

Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
2014-06-29 21:42:09 -07:00
Tushar Gohad 532f4fba1d autoconf: Incremental autoreconf fixes (take 1)
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
2014-06-29 21:42:09 -07:00
Tushar Gohad b20fa95fa8 autoconf: Re-add Makefile.am for the new library skeleton
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
2014-06-29 21:42:09 -07:00
Tushar Gohad 59bf182630 Start refactor
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
2014-06-29 07:37:05 -07:00
Eric Lambert 69cce4911a Fixed typo in 'check' make target and moved valgrind target
definition out of Makefile.in and into Makefile.am
2014-06-19 16:44:41 -07:00
Eric Lambert 6f23b06302 Override default behavior of AC_CHECK_LIB so that we no longer
link libjerasure and libgf_complete to binaries built by configure
2014-06-12 10:59:01 -07:00
Eric Lambert 9e9e2a6ec3 refactor workspace and build 2014-06-11 16:07:04 -07:00