tests: Update lxc-test-unpriv

Update lxc-test-unpriv to be a bit simpler and more reliable.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
tests: Fix cleanup in lxc-test-unpriv

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
tests: Rework lxc-test-usernic

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
tests: Tweak lxc-test-ubuntu to be faster

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
tests: Speed up lxc-test-usernic

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
tests: Fix shutdown test

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
tests: Fix lxc-test-saveconfig cleanup

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Fix destroy() crash when no config is loaded

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
tests: Drop 60s delay in shutdowntest

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
tests: Remove containers after running clonetest

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
tests: Fix createtest

Drop 60s delay and clear config before loading it.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
doc: Add Japanese lxc-config(1)

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
add lua-alt-getopt dependency

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
idmap_add_id: fix broken behavior

The geteuid() addition is being made the first element of the lxc_list,
but the first element is just a head whose entry is ignored.  Therefore
userns_exec_1() was starting its tasks without the caller's uid mapped
into the namespace.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
Update CentOS and Fedora templates to support archtectures option.

Added code to the CentOS and Fedora templates so that x86 32 bit containers
may be built on x86_64 platforms.  Like archectectures may also be trivially
used as well.

Option added is "-a {arch}".

Additionally cleaned up some bash specific logic.

Signed-off-by: Michael H. Warfield <mhw@WittsEnd.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
doc: fix See Also lxc-usernet.conf -> lxc-usernet

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
Support __NR_set_ns as well.

Apparently some older systems didn't have __NR_setns but had __NR_set_ns.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Fix previous change to use defined()

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
tests: Don't require user interaction in containertests

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
tests: Fix python3 API test

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>