Test framework seems broken in certain circumstances #230
Replies: 2 comments 6 replies
-
Hmm, I see the contours of at least two distinct problems here.
|
Beta Was this translation helpful? Give feedback.
-
To anyone arriving here, we've now done a lot of cleanup and simplification of the test system. We're still running in an unshare, so more actual test targets are needed to be automated. As it looks now, adding that to the existing test framework is not likely possible, or something we'd want, but a "farm" of test servers (qemu machines) that can build and deploys test images on push to Finit would be nice. Currently I'm running all this manually using a combination of myLinux and Westermo NetBox. |
Beta Was this translation helpful? Give feedback.
-
I have found that finit fails unless it's been configured with
--without-random-seed
. For some reason, when finit tries to copy 32 KB of random data from/dev/urandom
to/var/lib/misc/random-seed
it only manages to copy 512 bytes. Not really sure why this is: maybe my machine is a very poor source of entropy? Maybe the test README should mention this?Recompiling/reconfiguring finit with
--without-random-seed
makes test succeed on my machine, but the teardown phase causes the tests to superficially fail. It is this block of code that causes the failure:This code generates the error message:
Upon examination, this is what the directory listing of the test environments var directory looks like:
lock
is a symlink pointing to/run/lock
. I think the teardown phase is running outside the test context, the symlink is resolved to my machine's/run/lock
, and that's where the operation not permitted comes from. I may be wrong about the code not being run in the test context - but a quick reading of the test frame work code, it sure looks like it.I think, we need to reparse all/any path inside the test environment. If the path being touched is behind any symlink, we have to evaluate them against
test/tenv-root
.Not sure why I am the one finding this issue, but it could be that my Linux setup differs from everybody else's. After all, this is only a problem if the symlink points to something that exists on the host machine.
Beta Was this translation helpful? Give feedback.
All reactions