All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] openssl.inc: avoid random ptest failures
@ 2016-09-23 13:23 Patrick Ohly
  2016-09-23 13:33 ` Alexander Kanavin
  2016-09-23 14:46 ` Patrick Ohly
  0 siblings, 2 replies; 3+ messages in thread
From: Patrick Ohly @ 2016-09-23 13:23 UTC (permalink / raw)
  To: openembedded-core

"make alltests" is sensitive to the timestamps of the installed
files. Depending on the order in which cp copies files, .o and/or
executables may end up with time stamps older than the source files.
Running tests then triggers recompilation attempts, which typically
will fail because dev tools and files are not installed.

"cp -a" is not enough because the files also have to be newer than
the installed header files. Setting the file time stamps to
the current time explicitly after copying solves the problem because
do_install_ptest_base is guaranteed to run after do_install.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
 meta/recipes-connectivity/openssl/openssl.inc | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/meta/recipes-connectivity/openssl/openssl.inc b/meta/recipes-connectivity/openssl/openssl.inc
index f83664c..a632d8a 100644
--- a/meta/recipes-connectivity/openssl/openssl.inc
+++ b/meta/recipes-connectivity/openssl/openssl.inc
@@ -215,6 +215,19 @@ do_install_ptest () {
 	mkdir -p ${D}${PTEST_PATH}/util
 	install util/opensslwrap.sh    ${D}${PTEST_PATH}/util
 	install util/shlib_wrap.sh     ${D}${PTEST_PATH}/util
+	# Time stamps are relevant for "make alltests", otherwise
+	# make may try to recompile binaries. Not only must the
+	# binary files be newer than the sources, they also must
+	# be more recent than the header files in /usr/include.
+	#
+	# Using "cp -a" is not sufficient, because do_install
+	# does not preserve the original time stamps.
+	#
+	# So instead of using the original file stamps, we set
+	# the current time for all files. Binaries will get
+	# modified again later when stripping them, but that's okay.
+	touch ${D}${PTEST_PATH}
+	find ${D}${PTEST_PATH} -type f -print0 | xargs --verbose -0 touch -r ${D}${PTEST_PATH}
 }
 
 do_install_append_class-native() {
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] openssl.inc: avoid random ptest failures
  2016-09-23 13:23 [PATCH 1/2] openssl.inc: avoid random ptest failures Patrick Ohly
@ 2016-09-23 13:33 ` Alexander Kanavin
  2016-09-23 14:46 ` Patrick Ohly
  1 sibling, 0 replies; 3+ messages in thread
From: Alexander Kanavin @ 2016-09-23 13:33 UTC (permalink / raw)
  To: openembedded-core

On 09/23/2016 04:23 PM, Patrick Ohly wrote:
> "make alltests" is sensitive to the timestamps of the installed
> files. Depending on the order in which cp copies files, .o and/or
> executables may end up with time stamps older than the source files.
> Running tests then triggers recompilation attempts, which typically
> will fail because dev tools and files are not installed.

Patch 2/2 hasn't arrived.

Alex



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] openssl.inc: avoid random ptest failures
  2016-09-23 13:23 [PATCH 1/2] openssl.inc: avoid random ptest failures Patrick Ohly
  2016-09-23 13:33 ` Alexander Kanavin
@ 2016-09-23 14:46 ` Patrick Ohly
  1 sibling, 0 replies; 3+ messages in thread
From: Patrick Ohly @ 2016-09-23 14:46 UTC (permalink / raw)
  To: openembedded-core

Hello!

This patch can be applied stand-alone. I had it in a branch together
with the 1.0.2i update and then didn't export it independently, hence
the erroneous "PATCH 1/2" in the subject.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-23 14:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-23 13:23 [PATCH 1/2] openssl.inc: avoid random ptest failures Patrick Ohly
2016-09-23 13:33 ` Alexander Kanavin
2016-09-23 14:46 ` Patrick Ohly

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.