* An obscure problem with v2.37 make check
@ 2021-06-16 20:42 Bruce Dubbs
2021-06-17 8:59 ` Karel Zak
0 siblings, 1 reply; 5+ messages in thread
From: Bruce Dubbs @ 2021-06-16 20:42 UTC (permalink / raw)
To: util-linux
When I built version v2.37, make check hung on me. The problem was in
my kernel configuration, but I thought I would pass this on.
First of all, my biggest problem was finding out what had failed. A
simple 'make check' ran the tests and when it got to the end, hung.
I could not find any documentation about running the tests, but diving
into the Makefile led me to tests/run.sh. By default this runs tests
using all cores, but it is unclear if this is meant to be run directly.
In any case running run.sh --parallel=1 (instead of the default 24)
allowed me to find the problem test, tests/ts/lsns/ioctl_ns. In this
test, it is doing:
my_userns=$(stat -c %i -L /proc/self/ns/user)
My problem was that /proc/self/ns/user did not exist on my system. This
was due to a missing CONFIG option in my kernel configuration. Adding
that and rebuilding the kernel allowed all tests to pass.
One solution to this problem may be to test for the existence of the
file before running 'stat' similar to the tests for programs like
'touch' and 'uniq'. Since this is such an unusual situation, I can
understand if you just ignore the issue, however I thought you should
know about it.
-- Bruce
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: An obscure problem with v2.37 make check
2021-06-16 20:42 An obscure problem with v2.37 make check Bruce Dubbs
@ 2021-06-17 8:59 ` Karel Zak
2021-06-17 12:37 ` Anatoly Pugachev
0 siblings, 1 reply; 5+ messages in thread
From: Karel Zak @ 2021-06-17 8:59 UTC (permalink / raw)
To: Bruce Dubbs; +Cc: util-linux
On Wed, Jun 16, 2021 at 03:42:04PM -0500, Bruce Dubbs wrote:
> When I built version v2.37, make check hung on me. The problem was in my
> kernel configuration, but I thought I would pass this on.
>
> First of all, my biggest problem was finding out what had failed. A simple
> 'make check' ran the tests and when it got to the end, hung.
>
> I could not find any documentation about running the tests, but diving into
> the Makefile led me to tests/run.sh. By default this runs tests using all
> cores, but it is unclear if this is meant to be run directly.
The tests are designed for smart people, like you who, are able to debug it ;-)
> In any case running run.sh --parallel=1 (instead of the default 24) allowed
> me to find the problem test, tests/ts/lsns/ioctl_ns. In this test, it is
> doing:
The --parallel=1 is the default when you execute ./run.sh from command
line. This is the way I usually use the tests. The "make check"
executes it in parallel to make it faster for automated execution
(github actions, travis, random QA, etc.)
>
> my_userns=$(stat -c %i -L /proc/self/ns/user)
>
> My problem was that /proc/self/ns/user did not exist on my system. This was
> due to a missing CONFIG option in my kernel configuration. Adding that and
> rebuilding the kernel allowed all tests to pass.
>
> One solution to this problem may be to test for the existence of the file
> before running 'stat' similar to the tests for programs like 'touch' and
Sounds good. Please, send patch.
For 3rd party programs you need "ts_check_prog <progname>" at the
beginning of the test.
> 'uniq'. Since this is such an unusual situation, I can understand if you
> just ignore the issue, however I thought you should know about it.
It's definitely important to run the tests in more environments to
make it stable and I'm happy that we have contributors from
non-mainstream distributions.
So, thanks for your feedback.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: An obscure problem with v2.37 make check
2021-06-17 8:59 ` Karel Zak
@ 2021-06-17 12:37 ` Anatoly Pugachev
2021-06-17 16:50 ` Bruce Dubbs
0 siblings, 1 reply; 5+ messages in thread
From: Anatoly Pugachev @ 2021-06-17 12:37 UTC (permalink / raw)
To: Karel Zak; +Cc: Bruce Dubbs, util-linux
On Thu, Jun 17, 2021 at 12:00 PM Karel Zak <kzak@redhat.com> wrote:
> > One solution to this problem may be to test for the existence of the file
> > before running 'stat' similar to the tests for programs like 'touch' and
>
> Sounds good. Please, send patch.
Bruce, Karel,
something like this?
util-linux$ git diff
diff --git a/tests/ts/lsns/ioctl_ns b/tests/ts/lsns/ioctl_ns
index e91f6743f..b8f35e2e5 100755
--- a/tests/ts/lsns/ioctl_ns
+++ b/tests/ts/lsns/ioctl_ns
@@ -24,6 +24,9 @@ ts_init "$*"
# ts_skip_nonroot
grep -q '#define HAVE_LINUX_NSFS_H' ${top_builddir}/config.h ||
ts_skip "no ioctl_ns support"
+[ -a /proc/self/ns/user ] || ts_skip "no USER namespace kernel support"
+[ -a /proc/self/ns/pid ] || ts_skip "no PID namespace kernel support"
+
ts_check_test_command "$TS_CMD_LSNS"
ts_check_test_command "$TS_CMD_UNSHARE"
ts_check_prog "stat"
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: An obscure problem with v2.37 make check
2021-06-17 12:37 ` Anatoly Pugachev
@ 2021-06-17 16:50 ` Bruce Dubbs
2021-06-18 12:47 ` Karel Zak
0 siblings, 1 reply; 5+ messages in thread
From: Bruce Dubbs @ 2021-06-17 16:50 UTC (permalink / raw)
To: Anatoly Pugachev, Karel Zak; +Cc: util-linux
On 6/17/21 6:37 AM, Anatoly Pugachev wrote:
> On Thu, Jun 17, 2021 at 12:00 PM Karel Zak <kzak@redhat.com> wrote:
>>> One solution to this problem may be to test for the existence of the file
>>> before running 'stat' similar to the tests for programs like 'touch' and
>>
>> Sounds good. Please, send patch.
>
> Bruce, Karel,
>
> something like this?
>
> util-linux$ git diff
> diff --git a/tests/ts/lsns/ioctl_ns b/tests/ts/lsns/ioctl_ns
> index e91f6743f..b8f35e2e5 100755
> --- a/tests/ts/lsns/ioctl_ns
> +++ b/tests/ts/lsns/ioctl_ns
> @@ -24,6 +24,9 @@ ts_init "$*"
> # ts_skip_nonroot
> grep -q '#define HAVE_LINUX_NSFS_H' ${top_builddir}/config.h ||
> ts_skip "no ioctl_ns support"
>
> +[ -a /proc/self/ns/user ] || ts_skip "no USER namespace kernel support"
> +[ -a /proc/self/ns/pid ] || ts_skip "no PID namespace kernel support"
> +
> ts_check_test_command "$TS_CMD_LSNS"
> ts_check_test_command "$TS_CMD_UNSHARE"
> ts_check_prog "stat"
>
Looks pretty good to me, but I would use -r instead of -a.
-- Bruce
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: An obscure problem with v2.37 make check
2021-06-17 16:50 ` Bruce Dubbs
@ 2021-06-18 12:47 ` Karel Zak
0 siblings, 0 replies; 5+ messages in thread
From: Karel Zak @ 2021-06-18 12:47 UTC (permalink / raw)
To: Bruce Dubbs; +Cc: Anatoly Pugachev, util-linux
On Thu, Jun 17, 2021 at 11:50:42AM -0500, Bruce Dubbs wrote:
> On 6/17/21 6:37 AM, Anatoly Pugachev wrote:
> > util-linux$ git diff
> > diff --git a/tests/ts/lsns/ioctl_ns b/tests/ts/lsns/ioctl_ns
> > index e91f6743f..b8f35e2e5 100755
> > --- a/tests/ts/lsns/ioctl_ns
> > +++ b/tests/ts/lsns/ioctl_ns
> > @@ -24,6 +24,9 @@ ts_init "$*"
> > # ts_skip_nonroot
> > grep -q '#define HAVE_LINUX_NSFS_H' ${top_builddir}/config.h ||
> > ts_skip "no ioctl_ns support"
> >
> > +[ -a /proc/self/ns/user ] || ts_skip "no USER namespace kernel support"
> > +[ -a /proc/self/ns/pid ] || ts_skip "no PID namespace kernel support"
> > +
> > ts_check_test_command "$TS_CMD_LSNS"
> > ts_check_test_command "$TS_CMD_UNSHARE"
> > ts_check_prog "stat"
> >
>
> Looks pretty good to me, but I would use -r instead of -a.
Applied with -r, thanks guys!
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-06-18 12:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16 20:42 An obscure problem with v2.37 make check Bruce Dubbs
2021-06-17 8:59 ` Karel Zak
2021-06-17 12:37 ` Anatoly Pugachev
2021-06-17 16:50 ` Bruce Dubbs
2021-06-18 12:47 ` Karel Zak
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.