libbsd: Branch 'master' - 2 commits

Guillem Jover guillem at kemper.freedesktop.org
Sun Jan 10 17:41:15 PST 2016


 test/arc4random.c       |    2 ++
 test/headers-overlay.sh |    6 +++---
 test/headers-system.sh  |    6 +++---
 3 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit e4ab2c62cdc5457ea4b8cabd6c7d391810e17fc1
Author: Guillem Jover <guillem at hadrons.org>
Date:   Mon Jan 11 02:21:15 2016 +0100

    test: Fix success return code for arc4random unit test

diff --git a/test/arc4random.c b/test/arc4random.c
index ec52af1..e5a61f7 100644
--- a/test/arc4random.c
+++ b/test/arc4random.c
@@ -99,6 +99,8 @@ main(int argc, char **argv)
 		/* XXX: We should probably FAIL the test, but we currently
 		 * have one test always failing. */
 		rc = TEST_SKIP;
+	} else {
+		rc = TEST_OK;
 	}
 
 	return rc;
commit bf5573f86ca0b042b3f56d4c65913d5825c82ffe
Author: Lukas Fleischer <lfleischer at lfos.de>
Date:   Thu Jan 7 17:26:12 2016 +0100

    test: Fix race condition in headers-*.sh
    
    When running tests in parallel (e.g. using `make -j4 check`), the header
    tests currently fail due to headers-overlay.sh and headers-system.sh
    both generating headers-gen.c simultaneously, resulting in garbled
    output. Fix this by using separate C files for the tests.
    
    Signed-off-by: Lukas Fleischer <lfleischer at lfos.de>
    Signed-off-by: Guillem Jover <guillem at hadrons.org>

diff --git a/test/headers-overlay.sh b/test/headers-overlay.sh
index 56ce90d..be92eff 100755
--- a/test/headers-overlay.sh
+++ b/test/headers-overlay.sh
@@ -12,14 +12,14 @@ incdir="${top_srcdir}/include/bsd"
 CPPFLAGS="$CPPFLAGS -DLIBBSD_OVERLAY"
 
 for inc in $(cd $incdir; find -name '*.h' | sort | cut -c3-); do
-  cat >headers-gen.c <<SOURCE
+  cat >headers-overlay-gen.c <<SOURCE
 #include <$inc>
 int main() { return 0; }
 SOURCE
 
   echo "testing header $inc"
-  run $CC -isystem "$incdir" $CPPFLAGS headers-gen.c -o /dev/null
+  run $CC -isystem "$incdir" $CPPFLAGS headers-overlay-gen.c -o /dev/null
   echo
 
-  rm -f headers-gen*
+  rm -f headers-overlay-gen*
 done
diff --git a/test/headers-system.sh b/test/headers-system.sh
index 173fcc5..5ff0517 100755
--- a/test/headers-system.sh
+++ b/test/headers-system.sh
@@ -11,14 +11,14 @@ run()
 incdir="${top_srcdir}/include"
 
 for inc in $(cd $incdir; find -name '*.h' | sort | cut -c3-); do
-  cat >headers-gen.c <<SOURCE
+  cat >headers-system-gen.c <<SOURCE
 #include <$inc>
 int main() { return 0; }
 SOURCE
 
   echo "testing header $inc"
-  run $CC -isystem "$incdir" $CPPFLAGS headers-gen.c -o /dev/null
+  run $CC -isystem "$incdir" $CPPFLAGS headers-system-gen.c -o /dev/null
   echo
 
-  rm -f headers-gen.*
+  rm -f headers-system-gen.*
 done


More information about the libbsd mailing list