All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] Determinism issue for swapon/swapoff tests
@ 2021-03-02 13:50 Richard Purdie
  2021-03-02 14:02 ` Cyril Hrubis
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2021-03-02 13:50 UTC (permalink / raw)
  To: ltp

Hi,

I've been ensuring the ltp binaries/packages used by Yocto Project
are reproducible. I've sent two patches which address most of the issues,
the remaining one was with the swapon/swapoff tests.

The challenge there is they share libswapon.o. There is a race over
building it depending on whether swapon or swapoff is built first.
The issue is that in one case "../swapon/libswapon.c" is referenced
in libswapon.o and in the other, "libswapon.c" is referenced. This
means the build isn't deterministic/reproducible.

I've worked around this in Yocto Project by executing:

"make -C XXX/testcases/kernel/syscalls/swapon/"

before running the main compile. That ensures we're deterministic
but I wanted to mention the issue in case you had a better solution
to fix the Makefiles?

Cheers,

Richard


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

* [LTP] Determinism issue for swapon/swapoff tests
  2021-03-02 13:50 [LTP] Determinism issue for swapon/swapoff tests Richard Purdie
@ 2021-03-02 14:02 ` Cyril Hrubis
  0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2021-03-02 14:02 UTC (permalink / raw)
  To: ltp

Hi!
> I've been ensuring the ltp binaries/packages used by Yocto Project
> are reproducible. I've sent two patches which address most of the issues,
> the remaining one was with the swapon/swapoff tests.
> 
> The challenge there is they share libswapon.o. There is a race over
> building it depending on whether swapon or swapoff is built first.
> The issue is that in one case "../swapon/libswapon.c" is referenced
> in libswapon.o and in the other, "libswapon.c" is referenced. This
> means the build isn't deterministic/reproducible.
> 
> I've worked around this in Yocto Project by executing:
> 
> "make -C XXX/testcases/kernel/syscalls/swapon/"
> 
> before running the main compile. That ensures we're deterministic
> but I wanted to mention the issue in case you had a better solution
> to fix the Makefiles?

Actually we recently introduced top level libs directory for code shared
between multiple tests, so the best course of action would be to move
the libswapon.c there.

-- 
Cyril Hrubis
chrubis@suse.cz

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

end of thread, other threads:[~2021-03-02 14:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-02 13:50 [LTP] Determinism issue for swapon/swapoff tests Richard Purdie
2021-03-02 14:02 ` Cyril Hrubis

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.