Summary: | app-arch/tar-1.24 testsuite failures with FEATURES="sandbox" | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Ryan Hill (RETIRED) <rhill> |
Component: | New packages | Assignee: | Sandbox Maintainers <sandbox> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | base-system, brant, kanelxake, krinpaus |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 342983 | ||
Bug Blocks: | |||
Attachments: |
testsuite.log
$ tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp > sandbox-debug.log 2>&1 |
Description
Ryan Hill (RETIRED)
2010-10-26 00:59:15 UTC
Created attachment 251973 [details]
testsuite.log
with manual make check as root 20 and 35 pass, 32 is skipped. All pass with FEATURES="-sandbox -usersandbox userpriv". I tried looking into why sandbox was causing failures, but I was unable to figure it out. As far as I could tell, the tests aren't doing anything to violate the sandbox. As far as 20: exclude: long files in pax archives FAILED (exclude06.at:29) I was able to manually go through the steps that Autotest runs and reproduce the issue. It creates the tar fine, but sandbox is causing a failure extracting it. Created attachment 252161 [details]
$ tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp > sandbox-debug.log 2>&1
This is a SANDBOX_DEBUG log of the offending command.
For some reason it seems like the mkdir function pokes around in the "<current directory>" instead of in "<current directory>/out" as it is supposed to.
One other interesting aspect is that if you remove the "<current dir>/one" sandbox (or tar?) does not recurse down it, but creates the files fine inside of "<current dir>/out" as it should. POC is the following patch which makes the testsuite pass: diff --git a/tests/exclude06.at b/tests/exclude06.at index b1c0da7..89c5b4d 100644 --- a/tests/exclude06.at +++ b/tests/exclude06.at @@ -32,6 +32,7 @@ genfile --length 20 -f test_base_dir[/1.txt] genfile --length 20 -f test_base_dir[/1.c] tar cf archive.tar test_base_dir +rm -rf one mkdir out tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp find out -type f So for some reason it recurs down the wrong path, but only if that path already exists. After some stracing it seems like without sandbox no matter if "<cwd>/one" exists or not you get: openat(AT_FDCWD, "out", O_RDONLY|O_NOCTTY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4 mkdirat(4, "one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen", 0755) = -1 ENOENT (No such file or directory) (observe the ENOENT which is the same when "<cwd>/one" exists and thus it seems like it looks inside "<cwd>/out") While with running strace inside sandbox and "<cwd>/one" removed: openat(AT_FDCWD, "out", O_RDONLY|O_NOCTTY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4 getcwd("/home/xake/devel/tar/tests/testsuite.dir/020/pax", 8192) = 49 lstat("/home/xake/devel/tar/tests/testsuite.dir/020/pax", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/home/xake/devel/tar/tests/testsuite.dir/020/pax", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/home/xake/devel/tar/tests/testsuite.dir/020/pax/one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen", 0x7deec45b9c90) = -1 ENOENT (No such file or directory) (observe how with sandbox it looks inside "<cwd>/one" instead of "<cwd>/out/one") When "<cwd>/one/..." exists it seems to confuse the hell out of sandbox, and for some reason every time it lstat "<cwd>/out/one" and fails it recurse with lstat down the path of "<cwd>/one/..." instead, while if you have removed "<cwd>/one" it only tries that directory that one time. pretty much a dupe of Bug 342983, but i'll keep this open for now to avoid other people filing more dupes should retest with sandbox-2.4 ... |