mirror of
https://github.com/opencontainers/runc.git
synced 2025-11-02 03:52:38 +08:00
libct/int: better test container names
1. Do not create the same container named "test" over and over.
2. Fix randomization issues when generating container and cgroup names.
The issues were:
* math/rand used without seeding
* complex rand/md5/hexencode sequence
In both cases, replace with nanosecond time encoded with digits and
lowercase letters.
3. Add test name to container and cgroup names. For example, this is
how systemd log has changed:
Before: Started libcontainer container test16ddfwutxgjte.
After: Started libcontainer container TestPidsSystemd-4oaqvr.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -73,7 +73,7 @@ func testCheckpoint(t *testing.T, userns bool) {
|
||||
}
|
||||
defer remove(rootfs)
|
||||
|
||||
config := newTemplateConfig(&tParam{
|
||||
config := newTemplateConfig(t, &tParam{
|
||||
rootfs: rootfs,
|
||||
userns: userns,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user