Skip to content

Instantly share code, notes, and snippets.

@henglinli
Created May 11, 2018 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save henglinli/685a54f4f20a122d28b212b841017b34 to your computer and use it in GitHub Desktop.
Save henglinli/685a54f4f20a122d28b212b841017b34 to your computer and use it in GitHub Desktop.
sydtest -v > sydtest.log
*** t0000-basic.sh ***
expecting success:
:
ok 1 - success is reported like this
expecting success:
run_sub_test_lib_test full-pass '3 passing tests' <<-\EOF &&
for i in 1 2 3
do
test_expect_success "passing test #$i" 'true'
done
test_done
EOF
check_sub_test_lib_test full-pass <<-\EOF
> ok 1 - passing test #1
> ok 2 - passing test #2
> ok 3 - passing test #3
> # passed all 3 test(s)
> 1..3
EOF
ok 2 - pretend we have a fully passing test suite
expecting success:
test_must_fail run_sub_test_lib_test partial-pass '2/3 tests passing' <<-\EOF &&
test_expect_success 'passing test #1' 'true'
test_expect_success 'failing test #2' 'false'
test_expect_success 'passing test #3' 'true'
test_done
EOF
check_sub_test_lib_test partial-pass <<-\EOF
> ok 1 - passing test #1
> not ok 2 - failing test #2
# false
> ok 3 - passing test #3
> # failed 1 among 3 test(s)
> 1..3
EOF
ok 3 - pretend we have a partially passing test suite
expecting success:
run_sub_test_lib_test failing-todo 'A failing TODO test' <<-\EOF &&
test_expect_success 'passing test' 'true'
test_expect_failure 'pretend we have a known breakage' 'false'
test_done
EOF
check_sub_test_lib_test failing-todo <<-\EOF
> ok 1 - passing test
> not ok 2 - pretend we have a known breakage # TODO known breakage
> # still have 1 known breakage(s)
> # passed all remaining 1 test(s)
> 1..2
EOF
ok 4 - pretend we have a known breakage
expecting success:
run_sub_test_lib_test passing-todo 'A passing TODO test' <<-\EOF &&
test_expect_failure 'pretend we have fixed a known breakage' 'true'
test_done
EOF
check_sub_test_lib_test passing-todo <<-\EOF
> ok 1 - pretend we have fixed a known breakage # TODO known breakage vanished
> # 1 known breakage(s) vanished; please update test(s)
> 1..1
EOF
ok 5 - pretend we have fixed a known breakage
expecting success:
run_sub_test_lib_test partially-passing-todos '2 TODO tests, one passing' <<-\EOF &&
test_expect_failure 'pretend we have a known breakage' 'false'
test_expect_success 'pretend we have a passing test' 'true'
test_expect_failure 'pretend we have fixed another known breakage' 'true'
test_done
EOF
check_sub_test_lib_test partially-passing-todos <<-\EOF
> not ok 1 - pretend we have a known breakage # TODO known breakage
> ok 2 - pretend we have a passing test
> ok 3 - pretend we have fixed another known breakage # TODO known breakage vanished
> # 1 known breakage(s) vanished; please update test(s)
> # still have 1 known breakage(s)
> # passed all remaining 1 test(s)
> 1..3
EOF
ok 6 - pretend we have fixed one of two known breakages (run in sub test-lib)
expecting success:
test_must_fail run_sub_test_lib_test mixed-results1 'mixed results #1' <<-\EOF &&
test_expect_success 'passing test' 'true'
test_expect_success 'failing test' 'false'
test_expect_failure 'pretend we have a known breakage' 'false'
test_done
EOF
check_sub_test_lib_test mixed-results1 <<-\EOF
> ok 1 - passing test
> not ok 2 - failing test
> # false
> not ok 3 - pretend we have a known breakage # TODO known breakage
> # still have 1 known breakage(s)
> # failed 1 among remaining 2 test(s)
> 1..3
EOF
ok 7 - pretend we have a pass, fail, and known breakage
expecting success:
test_must_fail run_sub_test_lib_test mixed-results2 'mixed results #2' <<-\EOF &&
test_expect_success 'passing test' 'true'
test_expect_success 'passing test' 'true'
test_expect_success 'passing test' 'true'
test_expect_success 'passing test' 'true'
test_expect_success 'failing test' 'false'
test_expect_success 'failing test' 'false'
test_expect_success 'failing test' 'false'
test_expect_failure 'pretend we have a known breakage' 'false'
test_expect_failure 'pretend we have a known breakage' 'false'
test_expect_failure 'pretend we have fixed a known breakage' 'true'
test_done
EOF
check_sub_test_lib_test mixed-results2 <<-\EOF
> ok 1 - passing test
> ok 2 - passing test
> ok 3 - passing test
> ok 4 - passing test
> not ok 5 - failing test
> # false
> not ok 6 - failing test
> # false
> not ok 7 - failing test
> # false
> not ok 8 - pretend we have a known breakage # TODO known breakage
> not ok 9 - pretend we have a known breakage # TODO known breakage
> ok 10 - pretend we have fixed a known breakage # TODO known breakage vanished
> # 1 known breakage(s) vanished; please update test(s)
> # still have 2 known breakage(s)
> # failed 3 among remaining 7 test(s)
> 1..10
EOF
ok 8 - pretend we have a mix of all possible results
expecting success:
test_must_fail run_sub_test_lib_test \
test-verbose "test verbose" --verbose <<-\EOF &&
test_expect_success "passing test" true
test_expect_success "test with output" "echo foo"
test_expect_success "failing test" false
test_done
EOF
mv test-verbose/out test-verbose/out+
grep -v "^Initialized empty" test-verbose/out+ >test-verbose/out &&
check_sub_test_lib_test test-verbose <<-\EOF
> expecting success: true
> ok 1 - passing test
> Z
> expecting success: echo foo
> foo
> ok 2 - test with output
> Z
> expecting success: false
> not ok 3 - failing test
> # false
> Z
> # failed 1 among 3 test(s)
> 1..3
EOF
ok 9 - test --verbose
expecting success:
test_must_fail run_sub_test_lib_test \
test-verbose-only-2 "test verbose-only=2" \
--verbose-only=2 <<-\EOF &&
test_expect_success "passing test" true
test_expect_success "test with output" "echo foo"
test_expect_success "failing test" false
test_done
EOF
check_sub_test_lib_test test-verbose-only-2 <<-\EOF
> ok 1 - passing test
> Z
> expecting success: echo foo
> foo
> ok 2 - test with output
> Z
> not ok 3 - failing test
> # false
> # failed 1 among 3 test(s)
> 1..3
EOF
ok 10 - test --verbose-only
expecting success:
test_have_prereq HAVEIT &&
haveit=yes
ok 11 - test runs if prerequisite is satisfied
skipping test: unmet prerequisite causes test to be skipped
donthaveit=no
ok 12 # skip unmet prerequisite causes test to be skipped (missing DONTHAVEIT)
expecting success:
test_have_prereq HAVEIT &&
test_have_prereq HAVETHIS &&
haveit=yes
ok 13 - test runs if prerequisites are satisfied
skipping test: unmet prerequisites causes test to be skipped
donthaveit=no
ok 14 # skip unmet prerequisites causes test to be skipped (missing DONTHAVEIT of HAVEIT,DONTHAVEIT)
skipping test: unmet prerequisites causes test to be skipped
donthaveiteither=no
ok 15 # skip unmet prerequisites causes test to be skipped (missing DONTHAVEIT of DONTHAVEIT,HAVEIT)
checking prerequisite: LAZY_TRUE
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&true
)
prerequisite LAZY_TRUE ok
expecting success:
havetrue=yes
ok 16 - test runs if lazy prereq is satisfied
skipping test: missing lazy prereqs skip tests
donthavetrue=no
ok 17 # skip missing lazy prereqs skip tests (missing !LAZY_TRUE)
checking prerequisite: LAZY_FALSE
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&false
)
prerequisite LAZY_FALSE not satisfied
expecting success:
nothavefalse=yes
ok 18 - negative lazy prereqs checked
skipping test: missing negative lazy prereqs will skip
havefalse=no
ok 19 # skip missing negative lazy prereqs will skip (missing LAZY_FALSE)
expecting success:
test_when_finished clean=yes
ok 20 - tests clean up after themselves
expecting success:
test_must_fail run_sub_test_lib_test failing-cleanup 'Failing tests with cleanup commands' <<-\EOF &&
test_expect_success 'tests clean up even after a failure' '
touch clean-after-failure &&
test_when_finished rm clean-after-failure &&
(exit 1)
'
test_expect_success 'failure to clean up causes the test to fail' '
test_when_finished "(exit 2)"
'
test_done
EOF
check_sub_test_lib_test failing-cleanup <<-\EOF
> not ok 1 - tests clean up even after a failure
> # Z
> # touch clean-after-failure &&
> # test_when_finished rm clean-after-failure &&
> # (exit 1)
> # Z
> not ok 2 - failure to clean up causes the test to fail
> # Z
> # test_when_finished "(exit 2)"
> # Z
> # failed 2 among 2 test(s)
> 1..2
EOF
ok 21 - tests clean up even on failures
# passed all 21 test(s)
1..21
*** t0001-path-wildmatch.sh ***
# run 0: wildmatch (wildtest /usr/x86_64-pc-linux-gnu/libexec/sydbox/t/test-data/wildtest.txt)
# 11: "foo" iterations = 1
ok 1 wildmatch ok on line 11:
# foo
# foo
# 12: "bar" iterations = 1
ok 2 wildmatch ok on line 12:
# foo
# bar
# 13: "" iterations = 1
ok 3 wildmatch ok on line 13:
#
#
# 14: "???" iterations = 1
ok 4 wildmatch ok on line 14:
# foo
# ???
# 15: "??" iterations = 1
ok 5 wildmatch ok on line 15:
# foo
# ??
# 16: "*" iterations = 1
ok 6 wildmatch ok on line 16:
# foo
# *
# 17: "f*" iterations = 1
ok 7 wildmatch ok on line 17:
# foo
# f*
# 18: "*f" iterations = 4
ok 8 wildmatch ok on line 18:
# foo
# *f
# 19: "*foo*" iterations = 2
ok 9 wildmatch ok on line 19:
# foo
# *foo*
# 20: "*ob*a*r*" iterations = 6
ok 10 wildmatch ok on line 20:
# foobar
# *ob*a*r*
# 21: "*ab" iterations = 14
ok 11 wildmatch ok on line 21:
# aaaaaaabababab
# *ab
# 22: "foo\*" iterations = 1
ok 12 wildmatch ok on line 22:
# foo*
# foo\*
# 23: "foo\*bar" iterations = 1
ok 13 wildmatch ok on line 23:
# foobar
# foo\*bar
# 24: "f\\oo" iterations = 1
ok 14 wildmatch ok on line 24:
# f\oo
# f\\oo
# 25: "*[al]?" iterations = 4
ok 15 wildmatch ok on line 25:
# ball
# *[al]?
# 26: "[ten]" iterations = 1
ok 16 wildmatch ok on line 26:
# ten
# [ten]
# 27: "**[!te]" iterations = 4
ok 17 wildmatch ok on line 27:
# ten
# **[!te]
# 28: "**[!ten]" iterations = 4
ok 18 wildmatch ok on line 28:
# ten
# **[!ten]
# 29: "t[a-g]n" iterations = 1
ok 19 wildmatch ok on line 29:
# ten
# t[a-g]n
# 30: "t[!a-g]n" iterations = 1
ok 20 wildmatch ok on line 30:
# ten
# t[!a-g]n
# 31: "t[!a-g]n" iterations = 1
ok 21 wildmatch ok on line 31:
# ton
# t[!a-g]n
# 32: "t[^a-g]n" iterations = 1
ok 22 wildmatch ok on line 32:
# ton
# t[^a-g]n
# 33: "a[]]b" iterations = 1
ok 23 wildmatch ok on line 33:
# a]b
# a[]]b
# 34: "a[]-]b" iterations = 1
ok 24 wildmatch ok on line 34:
# a-b
# a[]-]b
# 35: "a[]-]b" iterations = 1
ok 25 wildmatch ok on line 35:
# a]b
# a[]-]b
# 36: "a[]-]b" iterations = 1
ok 26 wildmatch ok on line 36:
# aab
# a[]-]b
# 37: "a[]a-]b" iterations = 1
ok 27 wildmatch ok on line 37:
# aab
# a[]a-]b
# 38: "]" iterations = 1
ok 28 wildmatch ok on line 38:
# ]
# ]
# 41: "foo*bar" iterations = 2
ok 29 wildmatch ok on line 41:
# foo/baz/bar
# foo*bar
# 42: "foo**bar" iterations = 7
ok 30 wildmatch ok on line 42:
# foo/baz/bar
# foo**bar
# 43: "foo?bar" iterations = 1
ok 31 wildmatch ok on line 43:
# foo/bar
# foo?bar
# 44: "foo[/]bar" iterations = 1
ok 32 wildmatch ok on line 44:
# foo/bar
# foo[/]bar
# 45: "f[^eiu][^eiu][^eiu][^eiu][^eiu]r" iterations = 1
ok 33 wildmatch ok on line 45:
# foo/bar
# f[^eiu][^eiu][^eiu][^eiu][^eiu]r
# 46: "f[^eiu][^eiu][^eiu][^eiu][^eiu]r" iterations = 1
ok 34 wildmatch ok on line 46:
# foo-bar
# f[^eiu][^eiu][^eiu][^eiu][^eiu]r
# 47: "**/foo" iterations = 4
ok 35 wildmatch ok on line 47:
# foo
# **/foo
# 48: "**/foo" iterations = 2
ok 36 wildmatch ok on line 48:
# /foo
# **/foo
# 49: "**/foo" iterations = 9
ok 37 wildmatch ok on line 49:
# bar/baz/foo
# **/foo
# 50: "*/foo" iterations = 5
ok 38 wildmatch ok on line 50:
# bar/baz/foo
# */foo
# 51: "**/bar*" iterations = 12
ok 39 wildmatch ok on line 51:
# foo/bar/baz
# **/bar*
# 52: "**/bar/*" iterations = 10
ok 40 wildmatch ok on line 52:
# deep/foo/bar/baz
# **/bar/*
# 53: "**/bar/*" iterations = 18
ok 41 wildmatch ok on line 53:
# deep/foo/bar/baz/
# **/bar/*
# 54: "**/bar/**" iterations = 10
ok 42 wildmatch ok on line 54:
# deep/foo/bar/baz/
# **/bar/**
# 55: "**/bar/*" iterations = 10
ok 43 wildmatch ok on line 55:
# deep/foo/bar
# **/bar/*
# 56: "**/bar/**" iterations = 10
ok 44 wildmatch ok on line 56:
# deep/foo/bar/
# **/bar/**
# 57: "**/bar**" iterations = 5
ok 45 wildmatch ok on line 57:
# foo/bar/baz
# **/bar**
# 58: "*/bar/**" iterations = 5
ok 46 wildmatch ok on line 58:
# foo/bar/baz/x
# */bar/**
# 59: "*/bar/**" iterations = 6
ok 47 wildmatch ok on line 59:
# deep/foo/bar/baz/x
# */bar/**
# 60: "**/bar/*/*" iterations = 14
ok 48 wildmatch ok on line 60:
# deep/foo/bar/baz/x
# **/bar/*/*
# 63: "a[c-c]st" iterations = 1
ok 49 wildmatch ok on line 63:
# acrt
# a[c-c]st
# 64: "a[c-c]rt" iterations = 1
ok 50 wildmatch ok on line 64:
# acrt
# a[c-c]rt
# 65: "[!]-]" iterations = 1
ok 51 wildmatch ok on line 65:
# ]
# [!]-]
# 66: "[!]-]" iterations = 1
ok 52 wildmatch ok on line 66:
# a
# [!]-]
# 67: "\" iterations = 1
ok 53 wildmatch ok on line 67:
#
# \
# 68: "\" iterations = 1
ok 54 wildmatch ok on line 68:
# \
# \
# 69: "*/\" iterations = 2
ok 55 wildmatch ok on line 69:
# /\
# */\
# 70: "*/\\" iterations = 2
ok 56 wildmatch ok on line 70:
# /\
# */\\
# 71: "foo" iterations = 1
ok 57 wildmatch ok on line 71:
# foo
# foo
# 72: "@foo" iterations = 1
ok 58 wildmatch ok on line 72:
# @foo
# @foo
# 73: "@foo" iterations = 1
ok 59 wildmatch ok on line 73:
# foo
# @foo
# 74: "\[ab]" iterations = 1
ok 60 wildmatch ok on line 74:
# [ab]
# \[ab]
# 75: "[[]ab]" iterations = 1
ok 61 wildmatch ok on line 75:
# [ab]
# [[]ab]
# 76: "[[:]ab]" iterations = 1
ok 62 wildmatch ok on line 76:
# [ab]
# [[:]ab]
# 77: "[[::]ab]" iterations = 1
ok 63 wildmatch ok on line 77:
# [ab]
# [[::]ab]
# 78: "[[:digit]ab]" iterations = 1
ok 64 wildmatch ok on line 78:
# [ab]
# [[:digit]ab]
# 79: "[\[:]ab]" iterations = 1
ok 65 wildmatch ok on line 79:
# [ab]
# [\[:]ab]
# 80: "\??\?b" iterations = 1
ok 66 wildmatch ok on line 80:
# ?a?b
# \??\?b
# 81: "\a\b\c" iterations = 1
ok 67 wildmatch ok on line 81:
# abc
# \a\b\c
# 82: "" iterations = 1
ok 68 wildmatch ok on line 82:
# foo
#
# 83: "**/t[o]" iterations = 13
ok 69 wildmatch ok on line 83:
# foo/bar/baz/to
# **/t[o]
# 86: "[[:alpha:]][[:digit:]][[:upper:]]" iterations = 1
ok 70 wildmatch ok on line 86:
# a1B
# [[:alpha:]][[:digit:]][[:upper:]]
# 87: "[[:digit:][:upper:][:space:]]" iterations = 1
ok 71 wildmatch ok on line 87:
# a
# [[:digit:][:upper:][:space:]]
# 88: "[[:digit:][:upper:][:space:]]" iterations = 1
ok 72 wildmatch ok on line 88:
# A
# [[:digit:][:upper:][:space:]]
# 89: "[[:digit:][:upper:][:space:]]" iterations = 1
ok 73 wildmatch ok on line 89:
# 1
# [[:digit:][:upper:][:space:]]
# 90: "[[:digit:][:upper:][:spaci:]]" iterations = 1
ok 74 wildmatch ok on line 90:
# 1
# [[:digit:][:upper:][:spaci:]]
# 91: "[[:digit:][:upper:][:space:]]" iterations = 1
ok 75 wildmatch ok on line 91:
#
# [[:digit:][:upper:][:space:]]
# 92: "[[:digit:][:upper:][:space:]]" iterations = 1
ok 76 wildmatch ok on line 92:
# .
# [[:digit:][:upper:][:space:]]
# 93: "[[:digit:][:punct:][:space:]]" iterations = 1
ok 77 wildmatch ok on line 93:
# .
# [[:digit:][:punct:][:space:]]
# 94: "[[:xdigit:]]" iterations = 1
ok 78 wildmatch ok on line 94:
# 5
# [[:xdigit:]]
# 95: "[[:xdigit:]]" iterations = 1
ok 79 wildmatch ok on line 95:
# f
# [[:xdigit:]]
# 96: "[[:xdigit:]]" iterations = 1
ok 80 wildmatch ok on line 96:
# D
# [[:xdigit:]]
# 97: "[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]" iterations = 1
ok 81 wildmatch ok on line 97:
# _
# [[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]
# 99: "[^[:alnum:][:alpha:][:blank:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]" iterations = 1
ok 82 wildmatch ok on line 99:
# 
# [^[:alnum:][:alpha:][:blank:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]
# 100: "[^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]" iterations = 1
ok 83 wildmatch ok on line 100:
# .
# [^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]
# 101: "[a-c[:digit:]x-z]" iterations = 1
ok 84 wildmatch ok on line 101:
# 5
# [a-c[:digit:]x-z]
# 102: "[a-c[:digit:]x-z]" iterations = 1
ok 85 wildmatch ok on line 102:
# b
# [a-c[:digit:]x-z]
# 103: "[a-c[:digit:]x-z]" iterations = 1
ok 86 wildmatch ok on line 103:
# y
# [a-c[:digit:]x-z]
# 104: "[a-c[:digit:]x-z]" iterations = 1
ok 87 wildmatch ok on line 104:
# q
# [a-c[:digit:]x-z]
# 107: "[\\-^]" iterations = 1
ok 88 wildmatch ok on line 107:
# ]
# [\\-^]
# 108: "[\\-^]" iterations = 1
ok 89 wildmatch ok on line 108:
# [
# [\\-^]
# 109: "[\-_]" iterations = 1
ok 90 wildmatch ok on line 109:
# -
# [\-_]
# 110: "[\]]" iterations = 1
ok 91 wildmatch ok on line 110:
# ]
# [\]]
# 111: "[\]]" iterations = 1
ok 92 wildmatch ok on line 111:
# \]
# [\]]
# 112: "[\]]" iterations = 1
ok 93 wildmatch ok on line 112:
# \
# [\]]
# 113: "a[]b" iterations = 1
ok 94 wildmatch ok on line 113:
# ab
# a[]b
# 114: "a[]b" iterations = 1
ok 95 wildmatch ok on line 114:
# a[]b
# a[]b
# 115: "ab[" iterations = 1
ok 96 wildmatch ok on line 115:
# ab[
# ab[
# 116: "[!" iterations = 1
ok 97 wildmatch ok on line 116:
# ab
# [!
# 117: "[-" iterations = 1
ok 98 wildmatch ok on line 117:
# ab
# [-
# 118: "[-]" iterations = 1
ok 99 wildmatch ok on line 118:
# -
# [-]
# 119: "[a-" iterations = 1
ok 100 wildmatch ok on line 119:
# -
# [a-
# 120: "[!a-" iterations = 1
ok 101 wildmatch ok on line 120:
# -
# [!a-
# 121: "[--A]" iterations = 1
ok 102 wildmatch ok on line 121:
# -
# [--A]
# 122: "[--A]" iterations = 1
ok 103 wildmatch ok on line 122:
# 5
# [--A]
# 123: "[ --]" iterations = 1
ok 104 wildmatch ok on line 123:
#
# [ --]
# 124: "[ --]" iterations = 1
ok 105 wildmatch ok on line 124:
# $
# [ --]
# 125: "[ --]" iterations = 1
ok 106 wildmatch ok on line 125:
# -
# [ --]
# 126: "[ --]" iterations = 1
ok 107 wildmatch ok on line 126:
# 0
# [ --]
# 127: "[---]" iterations = 1
ok 108 wildmatch ok on line 127:
# -
# [---]
# 128: "[------]" iterations = 1
ok 109 wildmatch ok on line 128:
# -
# [------]
# 129: "[a-e-n]" iterations = 1
ok 110 wildmatch ok on line 129:
# j
# [a-e-n]
# 130: "[a-e-n]" iterations = 1
ok 111 wildmatch ok on line 130:
# -
# [a-e-n]
# 131: "[!------]" iterations = 1
ok 112 wildmatch ok on line 131:
# a
# [!------]
# 132: "[]-a]" iterations = 1
ok 113 wildmatch ok on line 132:
# [
# []-a]
# 133: "[]-a]" iterations = 1
ok 114 wildmatch ok on line 133:
# ^
# []-a]
# 134: "[!]-a]" iterations = 1
ok 115 wildmatch ok on line 134:
# ^
# [!]-a]
# 135: "[!]-a]" iterations = 1
ok 116 wildmatch ok on line 135:
# [
# [!]-a]
# 136: "[a^bc]" iterations = 1
ok 117 wildmatch ok on line 136:
# ^
# [a^bc]
# 137: "[a-]b]" iterations = 1
ok 118 wildmatch ok on line 137:
# -b]
# [a-]b]
# 138: "[\]" iterations = 1
ok 119 wildmatch ok on line 138:
# \
# [\]
# 139: "[\\]" iterations = 1
ok 120 wildmatch ok on line 139:
# \
# [\\]
# 140: "[!\\]" iterations = 1
ok 121 wildmatch ok on line 140:
# \
# [!\\]
# 141: "[A-\\]" iterations = 1
ok 122 wildmatch ok on line 141:
# G
# [A-\\]
# 142: "b*a" iterations = 1
ok 123 wildmatch ok on line 142:
# aaabbb
# b*a
# 143: "*ba*" iterations = 7
ok 124 wildmatch ok on line 143:
# aabcaa
# *ba*
# 144: "[,]" iterations = 1
ok 125 wildmatch ok on line 144:
# ,
# [,]
# 145: "[\\,]" iterations = 1
ok 126 wildmatch ok on line 145:
# ,
# [\\,]
# 146: "[\\,]" iterations = 1
ok 127 wildmatch ok on line 146:
# \
# [\\,]
# 147: "[,-.]" iterations = 1
ok 128 wildmatch ok on line 147:
# -
# [,-.]
# 148: "[,-.]" iterations = 1
ok 129 wildmatch ok on line 148:
# +
# [,-.]
# 149: "[,-.]" iterations = 1
ok 130 wildmatch ok on line 149:
# -.]
# [,-.]
# 150: "[\1-\3]" iterations = 1
ok 131 wildmatch ok on line 150:
# 2
# [\1-\3]
# 151: "[\1-\3]" iterations = 1
ok 132 wildmatch ok on line 151:
# 3
# [\1-\3]
# 152: "[\1-\3]" iterations = 1
ok 133 wildmatch ok on line 152:
# 4
# [\1-\3]
# 153: "[[-\]]" iterations = 1
ok 134 wildmatch ok on line 153:
# \
# [[-\]]
# 154: "[[-\]]" iterations = 1
ok 135 wildmatch ok on line 154:
# [
# [[-\]]
# 155: "[[-\]]" iterations = 1
ok 136 wildmatch ok on line 155:
# ]
# [[-\]]
# 156: "[[-\]]" iterations = 1
ok 137 wildmatch ok on line 156:
# -
# [[-\]]
# 159: "-*-*-*-*-*-*-12-*-*-*-m-*-*-*" iterations = 51
ok 138 wildmatch ok on line 159:
# -adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1
# -*-*-*-*-*-*-12-*-*-*-m-*-*-*
# 160: "-*-*-*-*-*-*-12-*-*-*-m-*-*-*" iterations = 54
ok 139 wildmatch ok on line 160:
# -adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1
# -*-*-*-*-*-*-12-*-*-*-m-*-*-*
# 161: "-*-*-*-*-*-*-12-*-*-*-m-*-*-*" iterations = 41
ok 140 wildmatch ok on line 161:
# -adobe-courier-bold-o-normal--12-120-75-75-/-70-iso8859-1
# -*-*-*-*-*-*-12-*-*-*-m-*-*-*
# 162: "/*/*/*/*/*/*/12/*/*/*/m/*/*/*" iterations = 51
ok 141 wildmatch ok on line 162:
# /adobe/courier/bold/o/normal//12/120/75/75/m/70/iso8859/1
# /*/*/*/*/*/*/12/*/*/*/m/*/*/*
# 163: "/*/*/*/*/*/*/12/*/*/*/m/*/*/*" iterations = 40
ok 142 wildmatch ok on line 163:
# /adobe/courier/bold/o/normal//12/120/75/75/X/70/iso8859/1
# /*/*/*/*/*/*/12/*/*/*/m/*/*/*
# 164: "**/*a*b*g*n*t" iterations = 66
ok 143 wildmatch ok on line 164:
# abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt
# **/*a*b*g*n*t
# 165: "**/*a*b*g*n*t" iterations = 67
ok 144 wildmatch ok on line 165:
# abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txtz
# **/*a*b*g*n*t
# No wildmatch errors found
1..144
wildmatch
# test_external test wildmatch was ok
*** t0002-path-realpath.sh ***
checking prerequisite: SYMLINKS
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
# test whether the filesystem supports symbolic links
ln -s x y && test -h y
)
prerequisite SYMLINKS ok
expecting success:
ln -sf self self &&
ln -sf loop0 loop1 &&
ln -sf loop1 loop0
ok 1 - setup-symlinks
expecting success:
realpath_mode-1 EINVAL no-file existing NULL
PASS: realpath_mode("no-file", 0, 0x6051b0) = -22 (wanted -22); "NULL" (wanted "NULL"); errno = EINVAL:22 [Invalid argument] (wanted EINVAL:22 [Invalid argument])
ok 2 - non-absolute path returns EINVAL
expecting success:
realpath_mode-1 ENOENT "" existing NULL
PASS: realpath_mode("", 0, 0x6051b0) = -2 (wanted -2); "NULL" (wanted "NULL"); errno = ENOENT:2 [No such file or directory] (wanted ENOENT:2 [No such file or directory])
ok 3 - empty path -> ENOENT
expecting success:
mkdir -p -m 700 foo/bar/baz &&
test_when_finished "chmod 700 foo/bar" && chmod 000 foo/bar &&
realpath_mode-1 EACCES "${HOMER}"/foo/bar/baz existing NULL
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/foo/bar/baz", 0, 0x6051b0) = -13 (wanted -13); "NULL" (wanted "NULL"); errno = EACCES:13 [Permission denied] (wanted EACCES:13 [Permission denied])
ok 4 - permission was denied for a component of path prefix -> EACCES
expecting success:
mkdir -p -m 700 foo/bar/baz &&
ln -s bar foo/bal &&
test_when_finished "chmod 700 foo/bar" && chmod 000 foo/bar &&
realpath_mode-1 EACCES "${HOMER}"/foo/bal/baz existing NULL
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/foo/bal/baz", 0, 0x6051b0) = -13 (wanted -13); "NULL" (wanted "NULL"); errno = EACCES:13 [Permission denied] (wanted EACCES:13 [Permission denied])
ok 5 - permission was denied for a symlink component of path prefix -> EACCES
expecting success:
realpath_mode-1 ELOOP "${HOMER}"/loop0/foo existing NULL
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/loop0/foo", 0, 0x6051b0) = -40 (wanted -40); "NULL" (wanted "NULL"); errno = ELOOP:40 [Too many levels of symbolic links] (wanted ELOOP:40 [Too many levels of symbolic links])
ok 6 - too many symbolic links for a component of path prefix -> ELOOP
expecting success:
realpath_mode-1 ELOOP "${HOMER}"/loop0 existing NULL
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/loop0", 0, 0x6051b0) = -40 (wanted -40); "NULL" (wanted "NULL"); errno = ELOOP:40 [Too many levels of symbolic links] (wanted ELOOP:40 [Too many levels of symbolic links])
ok 7 - too many symbolic links for file -> ELOOP
expecting success:
realpath_mode-1 0 "${HOMER}"/loop0 "nolast|nofollow" "${HOMER}"/loop0
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/loop0", 5, 0x6051b0) = 0 (wanted 0); "/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/loop0" (wanted "/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/loop0"); errno = Success:0 [Success] (wanted Success:0 [Success])
ok 8 - too many symbolic links for file (RPATH_NOLAST|RPATH_NOFOLLOW) -> OK
expecting success:
realpath_mode-1 ELOOP "${HOMER}"/self/foo existing NULL
realpath_mode-1 ELOOP "${HOMER}"/self existing NULL
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/self/foo", 0, 0x6051b0) = -40 (wanted -40); "NULL" (wanted "NULL"); errno = ELOOP:40 [Too many levels of symbolic links] (wanted ELOOP:40 [Too many levels of symbolic links])
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/self", 0, 0x6051b0) = -40 (wanted -40); "NULL" (wanted "NULL"); errno = ELOOP:40 [Too many levels of symbolic links] (wanted ELOOP:40 [Too many levels of symbolic links])
ok 9 - self referencing symbolic link -> ELOOP
expecting success:
realpath_mode-1 ENAMETOOLONG "${HOMER}/${NAMETOOLONG}/foo" existing NULL &&
realpath_mode-1 ENAMETOOLONG "${HOMER}/${NAMETOOLONG}" existing NULL
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/foo", 0, 0x6051b0) = -36 (wanted -36); "NULL" (wanted "NULL"); errno = ENAMETOOLONG:36 [File name too long] (wanted ENAMETOOLONG:36 [File name too long])
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/xxxxx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0x6051b0) = -36 (wanted -36); "NULL" (wanted "NULL"); errno = ENAMETOOLONG:36 [File name too long] (wanted ENAMETOOLONG:36 [File name too long])
ok 10 - too long file name -> ENAMETOOLONG
expecting success:
mkdir -p foo && touch foo/bak &&
realpath_mode-1 ENOTDIR "${HOMER}"/foo/bak/baz existing NULL
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/foo/bak/baz", 0, 0x6051b0) = -20 (wanted -20); "NULL" (wanted "NULL"); errno = ENOTDIR:20 [Not a directory] (wanted ENOTDIR:20 [Not a directory])
ok 11 - component not a directory -> ENOTDIR
expecting success:
mkdir -p foo && touch foo/bak && ln -sf bak foo/ban
realpath_mode-1 ENOTDIR "${HOMER}"/foo/ban/baz existing NULL
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/foo/ban/baz", 0, 0x6051b0) = -20 (wanted -20); "NULL" (wanted "NULL"); errno = ENOTDIR:20 [Not a directory] (wanted ENOTDIR:20 [Not a directory])
ok 12 - symlink component not pointing to a directory -> ENOTDIR
expecting success:
mkdir -p foo && touch foo/bak && ln -sf bak foo/ban
realpath_mode-1 ENOTDIR "${HOMER}"/foo/ban/baz "existing|nofollow" NULL
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/foo/ban/baz", 4, 0x6051b0) = -20 (wanted -20); "NULL" (wanted "NULL"); errno = ENOTDIR:20 [Not a directory] (wanted ENOTDIR:20 [Not a directory])
ok 13 - symlink component not pointing to a directory (NOFOLLOW) -> ENOTDIR
expecting success:
touch intermediate &&
realpath_mode-1 0 "$HOMER//./..//$HOME_BASE/intermediate" "existing" "$HOMER/intermediate"
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath//./..//trash directory.t0002-path-realpath/intermediate", 0, 0x6051b0) = 0 (wanted 0); "/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/intermediate" (wanted "/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/intermediate"); errno = Success:0 [Success] (wanted Success:0 [Success])
ok 14 - realpath ., .., intermediate // handling
expecting success:
touch non-directory-slash
realpath_mode-1 ENOTDIR "$HOMER/non-directory-slash/" "existing" NULL
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/non-directory-slash/", 0, 0x6051b0) = -20 (wanted -20); "NULL" (wanted "NULL"); errno = ENOTDIR:20 [Not a directory] (wanted ENOTDIR:20 [Not a directory])
ok 15 - realpath non-directory with trailing slash yields NULL
expecting success:
realpath_mode-1 ENOENT "$HOMER/missing-directory/.." "existing" NULL
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/missing-directory/..", 0, 0x6051b0) = -2 (wanted -2); "NULL" (wanted "NULL"); errno = ENOENT:2 [No such file or directory] (wanted ENOENT:2 [No such file or directory])
ok 16 - realpath missing directory yields NULL
expecting success:
touch dont-resolve-to-me &&
ln -sf dont-resolve-to-me dont-resolve-from-me &&
realpath_mode-1 0 "$HOMER"/dont-resolve-from-me "existing|nofollow" "$HOMER"/dont-resolve-from-me
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/dont-resolve-from-me", 4, 0x6051b0) = 0 (wanted 0); "/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/dont-resolve-from-me" (wanted "/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/dont-resolve-from-me"); errno = Success:0 [Success] (wanted Success:0 [Success])
ok 17 - symlinks not resolved with RPATH_NOFOLLOW
expecting success:
touch resolve-to-me &&
ln -sf resolve-to-me resolve-from-me &&
realpath_mode-1 0 "$HOMER/resolve-from-me" "existing" "$HOMER/resolve-to-me"
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/resolve-from-me", 0, 0x6051b0) = 0 (wanted 0); "/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/resolve-to-me" (wanted "/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/resolve-to-me"); errno = Success:0 [Success] (wanted Success:0 [Success])
ok 18 - symlinks to a file can be resolved
expecting success:
mkdir -p resolve-to-this-dir
ln -sf resolve-to-this-dir resolve-from-this-link-to-this-dir &&
ln -sf resolve-from-this-link-to-this-dir resolve-from-this-link-to-that-link &&
realpath_mode-1 0 "$HOMER/resolve-from-this-link-to-that-link" "existing" "$HOMER"/resolve-to-this-dir
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/resolve-from-this-link-to-that-link", 0, 0x6051b0) = 0 (wanted 0); "/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/resolve-to-this-dir" (wanted "/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/resolve-to-this-dir"); errno = Success:0 [Success] (wanted Success:0 [Success])
ok 19 - symlinks to a directory can be resolved
expecting success:
rm -f file-dont-exist &&
ln -sf file-dont-exist resolve-to-dont-exist-file &&
realpath_mode-1 ENOENT "$HOMER/resolve-to-dont-exist-file" "existing" NULL
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/resolve-to-dont-exist-file", 0, 0x6051b0) = -2 (wanted -2); "NULL" (wanted "NULL"); errno = ENOENT:2 [No such file or directory] (wanted ENOENT:2 [No such file or directory])
ok 20 - symlink to a non-existing file yields NULL
expecting success:
touch resolve-to-this-non-dir &&
ln -sf resolve-to-this-non-dir resolve-from-this-link-to-this-non-dir &&
realpath_mode-1 ENOTDIR "$HOMER/resolve-to-this-non-dir/" existing NULL
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/resolve-to-this-non-dir/", 0, 0x6051b0) = -20 (wanted -20); "NULL" (wanted "NULL"); errno = ENOTDIR:20 [Not a directory] (wanted ENOTDIR:20 [Not a directory])
ok 21 - non-directory symlink with a trailing slash yields NULL
expecting success:
rm -fr resolve-to-no-such-dir-in-the-sky
ln -sf resolve-to-no-such-dir-in-the-sky resolve-from-this-link-to-no-such-dir-in-the-sky
realpath_mode-1 ENOENT "$HOMER/resolve-from-this-link-to-no-such-dir-in-the-sky/.." existing NULL
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/resolve-from-this-link-to-no-such-dir-in-the-sky/..", 0, 0x6051b0) = -2 (wanted -2); "NULL" (wanted "NULL"); errno = ENOENT:2 [No such file or directory] (wanted ENOENT:2 [No such file or directory])
ok 22 - missing directory via symlink yields NULL
expecting success:
rm -f alternate-file-dont-exist &&
realpath_mode-1 0 "$HOMER/alternate-file-dont-exist" "nolast" "$HOMER/alternate-file-dont-exist" &&
realpath_mode-1 0 "$TRASH_DIRECTORY/alternate-file-dont-exist" "nolast" "$HOMER/alternate-file-dont-exist"
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/alternate-file-dont-exist", 1, 0x6051b0) = 0 (wanted 0); "/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/alternate-file-dont-exist" (wanted "/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/alternate-file-dont-exist"); errno = Success:0 [Success] (wanted Success:0 [Success])
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/alternate-file-dont-exist", 1, 0x6051b0) = 0 (wanted 0); "/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/alternate-file-dont-exist" (wanted "/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/alternate-file-dont-exist"); errno = Success:0 [Success] (wanted Success:0 [Success])
ok 23 - alternate modes can resolve basenames
expecting success:
rm -f resolve-to-alternate-file-dont-exist &&
ln -sf resolve-to-alternate-file-dont-exist resolve-from-this-link-to-alternate-file-dont-exist &&
realpath_mode-1 0 "$HOMER/resolve-from-this-link-to-alternate-file-dont-exist" "nolast" "$HOMER/resolve-to-alternate-file-dont-exist" &&
realpath_mode-1 0 "$TRASH_DIRECTORY/resolve-from-this-link-to-alternate-file-dont-exist" "nolast" "$HOMER/resolve-to-alternate-file-dont-exist"
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/resolve-from-this-link-to-alternate-file-dont-exist", 1, 0x6051b0) = 0 (wanted 0); "/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/resolve-to-alternate-file-dont-exist" (wanted "/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/resolve-to-alternate-file-dont-exist"); errno = Success:0 [Success] (wanted Success:0 [Success])
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/resolve-from-this-link-to-alternate-file-dont-exist", 1, 0x6051b0) = 0 (wanted 0); "/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/resolve-to-alternate-file-dont-exist" (wanted "/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/resolve-to-alternate-file-dont-exist"); errno = Success:0 [Success] (wanted Success:0 [Success])
ok 24 - alternate modes can resolve symlink basenames
expecting success:
rm -fr dir-dont-exist
realpath_mode-1 ENOENT "$HOMER/dir-dont-exist/nofile" nolast NULL
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/dir-dont-exist/nofile", 1, 0x6051b0) = -2 (wanted -2); "NULL" (wanted "NULL"); errno = ENOENT:2 [No such file or directory] (wanted ENOENT:2 [No such file or directory])
ok 25 - alternate modes can handle missing dirnames
expecting success:
mkdir -p possible-loop-dir &&
ln -sf possible-loop-dir point-to-possible-loop-dir &&
ln -sf point-to-possible-loop-dir point-to-possible-loop-link &&
touch possible-loop-dir/file &&
ln -sf ../point-to-possible-loop-dir/file possible-loop-dir/link &&
realpath_mode-1 0 "$HOMER/point-to-possible-loop-dir/link" existing "$HOMER"/possible-loop-dir/file
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/point-to-possible-loop-dir/link", 0, 0x6051b0) = 0 (wanted 0); "/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/possible-loop-dir/file" (wanted "/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/possible-loop-dir/file"); errno = Success:0 [Success] (wanted Success:0 [Success])
ok 26 - possible loop bug
expecting success:
ln -sf //.//../.. leading-slash-link &&
stat_inode / > inode-slash-one &&
stat_inode // > inode-slash-two &&
if test_cmp inode-slash-one inode-slash-two; then
realpath_mode-1 0 //. existing / &&
realpath_mode-1 0 "$HOMER"/leading-slash-link existing /
else
realpath_mode-1 0 //. existing // &&
realpath_mode-1 0 "$HOMER"/leading-slash-link existing //
fi
PASS: realpath_mode("//.", 0, 0x6051b0) = 0 (wanted 0); "/" (wanted "/"); errno = Success:0 [Success] (wanted Success:0 [Success])
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/leading-slash-link", 0, 0x6051b0) = 0 (wanted 0); "/" (wanted "/"); errno = Success:0 [Success] (wanted Success:0 [Success])
ok 27 - leading // is honoured correctly
expecting success:
mkdir -p this-dir-has-no-file &&
mkdir -p this-dir-has-a-link &&
ln -sf ../this-dir-has-no-file this-dir-has-a-link/link &&
realpath_mode-1 0 "$HOMER"/this-dir-has-a-link/link/no-file "nolast" "$HOMER"/this-dir-has-no-file/no-file
PASS: realpath_mode("/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/this-dir-has-a-link/link/no-file", 1, 0x6051b0) = 0 (wanted 0); "/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/this-dir-has-no-file/no-file" (wanted "/tmp/sydbox-tests-1000/trash directory.t0002-path-realpath/this-dir-has-no-file/no-file"); errno = Success:0 [Success] (wanted Success:0 [Success])
ok 28 - non existing file under directory symlink
# passed all 28 test(s)
1..28
*** t0003-core-basic.sh ***
expecting success:
sydbox --help &&
sydbox --version &&
sydfmt --help &&
sydfmt --version
sydbox-1.0.7 -- ptrace based sandbox
usage: sydbox [-hv] [-c pathspec...] [-m magic...] [-E var=val...] {command [arg...]}
-h -- Show usage and exit
-v -- Show version and exit
-c pathspec -- path spec to the configuration file, may be repeated
-m magic -- run a magic command during init, may be repeated
-E var=val -- put var=val in the environment for command, may be repeated
-E var -- remove var from the environment for command, may be repeated
Hey you, out there beyond the wall,
Breaking bottles in the hall,
Can you help me?
Send bug reports to "alip@exherbo.org"
Attaching poems encourages consideration tremendously.
sydbox-1.0.7 (pinktrace-0.9.3)
Options: seccomp:yes ipv6:yes netlink:yes
sydfmt-1.0.7 -- sydbox magic command formatter
usage: sydfmt [-hv]
sydfmt exec [--] {command [arg...]}
-h -- Show usage and exit
-v -- Show version and exit
Hey you, out there on the road,
Always doing what you're told,
Can you help me?
Send bug reports to "alip@exherbo.org"
Attaching poems encourages consideration tremendously.
sydfmt-1.0.7
ok 1 - compatible long options with sydbox-0
expecting success:
sydbox -- syd-true
ok 2 - return success if tracee returns success [seize=0 seccomp:0]
expecting success:
sydbox -- syd-true
ok 3 - return success if tracee returns success [seize=0 seccomp:1]
expecting success:
sydbox -- syd-true
ok 4 - return success if tracee returns success [seize=1 seccomp:0]
expecting success:
sydbox -- syd-true
ok 5 - return success if tracee returns success [seize=1 seccomp:1]
expecting success:
sydbox -- syd-true-static
ok 6 - return success if tracee returns success (STATIC) [seize=0 seccomp:0]
expecting success:
sydbox -- syd-true-static
ok 7 - return success if tracee returns success (STATIC) [seize=0 seccomp:1]
expecting success:
sydbox -- syd-true-static
ok 8 - return success if tracee returns success (STATIC) [seize=1 seccomp:0]
expecting success:
sydbox -- syd-true-static
ok 9 - return success if tracee returns success (STATIC) [seize=1 seccomp:1]
expecting success:
sydbox -- syd-true-fork 256
ok 10 - return success if initial tracee returns success (FORK) [seize=0 seccomp:0]
expecting success:
sydbox -- syd-true-fork 256
ok 11 - return success if initial tracee returns success (FORK) [seize=0 seccomp:1]
expecting success:
sydbox -- syd-true-fork 256
ok 12 - return success if initial tracee returns success (FORK) [seize=1 seccomp:0]
expecting success:
sydbox -- syd-true-fork 256
ok 13 - return success if initial tracee returns success (FORK) [seize=1 seccomp:1]
expecting success:
sydbox -- syd-true-fork-static 256
ok 14 - return success if initial tracee returns success (STATIC|FORK) [seize=0 seccomp:0]
expecting success:
sydbox -- syd-true-fork-static 256
ok 15 - return success if initial tracee returns success (STATIC|FORK) [seize=0 seccomp:1]
expecting success:
sydbox -- syd-true-fork-static 256
ok 16 - return success if initial tracee returns success (STATIC|FORK) [seize=1 seccomp:0]
expecting success:
sydbox -- syd-true-fork-static 256
ok 17 - return success if initial tracee returns success (STATIC|FORK) [seize=1 seccomp:1]
expecting success:
sydbox -- syd-true-pthread 32
ok 18 - return success if initial tracee returns success (PTHREAD) [seize=0 seccomp:0]
expecting success:
sydbox -- syd-true-pthread 32
ok 19 - return success if initial tracee returns success (PTHREAD) [seize=0 seccomp:1]
expecting success:
sydbox -- syd-true-pthread 32
ok 20 - return success if initial tracee returns success (PTHREAD) [seize=1 seccomp:0]
expecting success:
sydbox -- syd-true-pthread 32
ok 21 - return success if initial tracee returns success (PTHREAD) [seize=1 seccomp:1]
expecting success:
test_expect_code 1 sydbox -- syd-false
ok 22 - return failure if tracee returns failure [seize=0 seccomp:0]
expecting success:
test_expect_code 1 sydbox -- syd-false
ok 23 - return failure if tracee returns failure [seize=0 seccomp:1]
expecting success:
test_expect_code 1 sydbox -- syd-false
ok 24 - return failure if tracee returns failure [seize=1 seccomp:0]
expecting success:
test_expect_code 1 sydbox -- syd-false
ok 25 - return failure if tracee returns failure [seize=1 seccomp:1]
expecting success:
test_expect_code 1 sydbox -- syd-false-static
ok 26 - return failure if tracee returns failure (STATIC) [seize=0 seccomp:0]
expecting success:
test_expect_code 1 sydbox -- syd-false-static
ok 27 - return failure if tracee returns failure (STATIC) [seize=0 seccomp:1]
expecting success:
test_expect_code 1 sydbox -- syd-false-static
ok 28 - return failure if tracee returns failure (STATIC) [seize=1 seccomp:0]
expecting success:
test_expect_code 1 sydbox -- syd-false-static
ok 29 - return failure if tracee returns failure (STATIC) [seize=1 seccomp:1]
expecting success:
test_expect_code 1 sydbox -- syd-false-fork 256
ok 30 - return failure if initial tracee returns failure (FORK) [seize=0 seccomp:0]
expecting success:
test_expect_code 1 sydbox -- syd-false-fork 256
ok 31 - return failure if initial tracee returns failure (FORK) [seize=0 seccomp:1]
expecting success:
test_expect_code 1 sydbox -- syd-false-fork 256
ok 32 - return failure if initial tracee returns failure (FORK) [seize=1 seccomp:0]
expecting success:
test_expect_code 1 sydbox -- syd-false-fork 256
ok 33 - return failure if initial tracee returns failure (FORK) [seize=1 seccomp:1]
expecting success:
test_expect_code 1 sydbox -- syd-false-fork-static 256
ok 34 - return failure if initial tracee returns failure (STATIC|FORK) [seize=0 seccomp:0]
expecting success:
test_expect_code 1 sydbox -- syd-false-fork-static 256
ok 35 - return failure if initial tracee returns failure (STATIC|FORK) [seize=0 seccomp:1]
expecting success:
test_expect_code 1 sydbox -- syd-false-fork-static 256
ok 36 - return failure if initial tracee returns failure (STATIC|FORK) [seize=1 seccomp:0]
expecting success:
test_expect_code 1 sydbox -- syd-false-fork-static 256
ok 37 - return failure if initial tracee returns failure (STATIC|FORK) [seize=1 seccomp:1]
expecting success:
test_expect_code 1 sydbox -- syd-false-pthread 32
ok 38 - return failure if initial tracee returns failure (PTHREAD) [seize=0 seccomp:0]
expecting success:
test_expect_code 1 sydbox -- syd-false-pthread 32
ok 39 - return failure if initial tracee returns failure (PTHREAD) [seize=0 seccomp:1]
expecting success:
test_expect_code 1 sydbox -- syd-false-pthread 32
ok 40 - return failure if initial tracee returns failure (PTHREAD) [seize=1 seccomp:0]
expecting success:
test_expect_code 1 sydbox -- syd-false-pthread 32
ok 41 - return failure if initial tracee returns failure (PTHREAD) [seize=1 seccomp:1]
expecting success:
test_expect_code 130 sydbox -- syd-abort 2 && # SIGINT
test_expect_code 131 sydbox -- syd-abort 3 && # SIGQUIT
test_expect_code 132 sydbox -- syd-abort 4 && # SIGILL
test_expect_code 134 sydbox -- syd-abort 6 && # SIGABRT
test_expect_code 136 sydbox -- syd-abort 8 && # SIGFPE
test_expect_code 139 sydbox -- syd-abort 11 && # SIGFPE
test_expect_code 141 sydbox -- syd-abort 13 && # SIGPIPE
test_expect_code 142 sydbox -- syd-abort 14 && # SIGALRM
test_expect_code 143 sydbox -- syd-abort 15 # SIGTERM
ok 42 - return 128 + $SIGNUM if tracee is terminated [seize=0 seccomp:0]
expecting success:
test_expect_code 130 sydbox -- syd-abort 2 && # SIGINT
test_expect_code 131 sydbox -- syd-abort 3 && # SIGQUIT
test_expect_code 132 sydbox -- syd-abort 4 && # SIGILL
test_expect_code 134 sydbox -- syd-abort 6 && # SIGABRT
test_expect_code 136 sydbox -- syd-abort 8 && # SIGFPE
test_expect_code 139 sydbox -- syd-abort 11 && # SIGFPE
test_expect_code 141 sydbox -- syd-abort 13 && # SIGPIPE
test_expect_code 142 sydbox -- syd-abort 14 && # SIGALRM
test_expect_code 143 sydbox -- syd-abort 15 # SIGTERM
ok 43 - return 128 + $SIGNUM if tracee is terminated [seize=0 seccomp:1]
expecting success:
test_expect_code 130 sydbox -- syd-abort 2 && # SIGINT
test_expect_code 131 sydbox -- syd-abort 3 && # SIGQUIT
test_expect_code 132 sydbox -- syd-abort 4 && # SIGILL
test_expect_code 134 sydbox -- syd-abort 6 && # SIGABRT
test_expect_code 136 sydbox -- syd-abort 8 && # SIGFPE
test_expect_code 139 sydbox -- syd-abort 11 && # SIGFPE
test_expect_code 141 sydbox -- syd-abort 13 && # SIGPIPE
test_expect_code 142 sydbox -- syd-abort 14 && # SIGALRM
test_expect_code 143 sydbox -- syd-abort 15 # SIGTERM
ok 44 - return 128 + $SIGNUM if tracee is terminated [seize=1 seccomp:0]
expecting success:
test_expect_code 130 sydbox -- syd-abort 2 && # SIGINT
test_expect_code 131 sydbox -- syd-abort 3 && # SIGQUIT
test_expect_code 132 sydbox -- syd-abort 4 && # SIGILL
test_expect_code 134 sydbox -- syd-abort 6 && # SIGABRT
test_expect_code 136 sydbox -- syd-abort 8 && # SIGFPE
test_expect_code 139 sydbox -- syd-abort 11 && # SIGFPE
test_expect_code 141 sydbox -- syd-abort 13 && # SIGPIPE
test_expect_code 142 sydbox -- syd-abort 14 && # SIGALRM
test_expect_code 143 sydbox -- syd-abort 15 # SIGTERM
ok 45 - return 128 + $SIGNUM if tracee is terminated [seize=1 seccomp:1]
expecting success:
test_expect_code 130 sydbox -- syd-abort-static 2 && # SIGINT
test_expect_code 131 sydbox -- syd-abort-static 3 && # SIGQUIT
test_expect_code 132 sydbox -- syd-abort-static 4 && # SIGILL
test_expect_code 134 sydbox -- syd-abort-static 6 && # SIGABRT
test_expect_code 136 sydbox -- syd-abort-static 8 && # SIGFPE
test_expect_code 139 sydbox -- syd-abort-static 11 && # SIGFPE
test_expect_code 141 sydbox -- syd-abort-static 13 && # SIGPIPE
test_expect_code 142 sydbox -- syd-abort-static 14 && # SIGALRM
test_expect_code 143 sydbox -- syd-abort-static 15 # SIGTERM
ok 46 - return 128 + $SIGNUM if tracee is terminated (STATIC) [seize=0 seccomp:0]
expecting success:
test_expect_code 130 sydbox -- syd-abort-static 2 && # SIGINT
test_expect_code 131 sydbox -- syd-abort-static 3 && # SIGQUIT
test_expect_code 132 sydbox -- syd-abort-static 4 && # SIGILL
test_expect_code 134 sydbox -- syd-abort-static 6 && # SIGABRT
test_expect_code 136 sydbox -- syd-abort-static 8 && # SIGFPE
test_expect_code 139 sydbox -- syd-abort-static 11 && # SIGFPE
test_expect_code 141 sydbox -- syd-abort-static 13 && # SIGPIPE
test_expect_code 142 sydbox -- syd-abort-static 14 && # SIGALRM
test_expect_code 143 sydbox -- syd-abort-static 15 # SIGTERM
ok 47 - return 128 + $SIGNUM if tracee is terminated (STATIC) [seize=0 seccomp:1]
expecting success:
test_expect_code 130 sydbox -- syd-abort-static 2 && # SIGINT
test_expect_code 131 sydbox -- syd-abort-static 3 && # SIGQUIT
test_expect_code 132 sydbox -- syd-abort-static 4 && # SIGILL
test_expect_code 134 sydbox -- syd-abort-static 6 && # SIGABRT
test_expect_code 136 sydbox -- syd-abort-static 8 && # SIGFPE
test_expect_code 139 sydbox -- syd-abort-static 11 && # SIGFPE
test_expect_code 141 sydbox -- syd-abort-static 13 && # SIGPIPE
test_expect_code 142 sydbox -- syd-abort-static 14 && # SIGALRM
test_expect_code 143 sydbox -- syd-abort-static 15 # SIGTERM
ok 48 - return 128 + $SIGNUM if tracee is terminated (STATIC) [seize=1 seccomp:0]
expecting success:
test_expect_code 130 sydbox -- syd-abort-static 2 && # SIGINT
test_expect_code 131 sydbox -- syd-abort-static 3 && # SIGQUIT
test_expect_code 132 sydbox -- syd-abort-static 4 && # SIGILL
test_expect_code 134 sydbox -- syd-abort-static 6 && # SIGABRT
test_expect_code 136 sydbox -- syd-abort-static 8 && # SIGFPE
test_expect_code 139 sydbox -- syd-abort-static 11 && # SIGFPE
test_expect_code 141 sydbox -- syd-abort-static 13 && # SIGPIPE
test_expect_code 142 sydbox -- syd-abort-static 14 && # SIGALRM
test_expect_code 143 sydbox -- syd-abort-static 15 # SIGTERM
ok 49 - return 128 + $SIGNUM if tracee is terminated (STATIC) [seize=1 seccomp:1]
expecting success:
test_expect_code 130 sydbox -- syd-abort-fork 256 2 && # SIGINT
test_expect_code 131 sydbox -- syd-abort-fork 256 3 && # SIGQUIT
test_expect_code 132 sydbox -- syd-abort-fork 256 4 && # SIGILL
test_expect_code 134 sydbox -- syd-abort-fork 256 6 && # SIGABRT
test_expect_code 136 sydbox -- syd-abort-fork 256 8 && # SIGFPE
test_expect_code 139 sydbox -- syd-abort-fork 256 11 && # SIGFPE
test_expect_code 141 sydbox -- syd-abort-fork 256 13 && # SIGPIPE
test_expect_code 142 sydbox -- syd-abort-fork 256 14 && # SIGALRM
test_expect_code 143 sydbox -- syd-abort-fork 256 15 # SIGTERM
ok 50 - return 128 + $SIGNUM if tracee is terminated (FORK) [seize=0 seccomp:0]
expecting success:
test_expect_code 130 sydbox -- syd-abort-fork 256 2 && # SIGINT
test_expect_code 131 sydbox -- syd-abort-fork 256 3 && # SIGQUIT
test_expect_code 132 sydbox -- syd-abort-fork 256 4 && # SIGILL
test_expect_code 134 sydbox -- syd-abort-fork 256 6 && # SIGABRT
test_expect_code 136 sydbox -- syd-abort-fork 256 8 && # SIGFPE
test_expect_code 139 sydbox -- syd-abort-fork 256 11 && # SIGFPE
test_expect_code 141 sydbox -- syd-abort-fork 256 13 && # SIGPIPE
test_expect_code 142 sydbox -- syd-abort-fork 256 14 && # SIGALRM
test_expect_code 143 sydbox -- syd-abort-fork 256 15 # SIGTERM
ok 51 - return 128 + $SIGNUM if tracee is terminated (FORK) [seize=0 seccomp:1]
expecting success:
test_expect_code 130 sydbox -- syd-abort-fork 256 2 && # SIGINT
test_expect_code 131 sydbox -- syd-abort-fork 256 3 && # SIGQUIT
test_expect_code 132 sydbox -- syd-abort-fork 256 4 && # SIGILL
test_expect_code 134 sydbox -- syd-abort-fork 256 6 && # SIGABRT
test_expect_code 136 sydbox -- syd-abort-fork 256 8 && # SIGFPE
test_expect_code 139 sydbox -- syd-abort-fork 256 11 && # SIGFPE
test_expect_code 141 sydbox -- syd-abort-fork 256 13 && # SIGPIPE
test_expect_code 142 sydbox -- syd-abort-fork 256 14 && # SIGALRM
test_expect_code 143 sydbox -- syd-abort-fork 256 15 # SIGTERM
ok 52 - return 128 + $SIGNUM if tracee is terminated (FORK) [seize=1 seccomp:0]
expecting success:
test_expect_code 130 sydbox -- syd-abort-fork 256 2 && # SIGINT
test_expect_code 131 sydbox -- syd-abort-fork 256 3 && # SIGQUIT
test_expect_code 132 sydbox -- syd-abort-fork 256 4 && # SIGILL
test_expect_code 134 sydbox -- syd-abort-fork 256 6 && # SIGABRT
test_expect_code 136 sydbox -- syd-abort-fork 256 8 && # SIGFPE
test_expect_code 139 sydbox -- syd-abort-fork 256 11 && # SIGFPE
test_expect_code 141 sydbox -- syd-abort-fork 256 13 && # SIGPIPE
test_expect_code 142 sydbox -- syd-abort-fork 256 14 && # SIGALRM
test_expect_code 143 sydbox -- syd-abort-fork 256 15 # SIGTERM
ok 53 - return 128 + $SIGNUM if tracee is terminated (FORK) [seize=1 seccomp:1]
expecting success:
test_expect_code 130 sydbox -- syd-abort-fork-static 256 2 && # SIGINT
test_expect_code 131 sydbox -- syd-abort-fork-static 256 3 && # SIGQUIT
test_expect_code 132 sydbox -- syd-abort-fork-static 256 4 && # SIGILL
test_expect_code 134 sydbox -- syd-abort-fork-static 256 6 && # SIGABRT
test_expect_code 136 sydbox -- syd-abort-fork-static 256 8 && # SIGFPE
test_expect_code 139 sydbox -- syd-abort-fork-static 256 11 && # SIGFPE
test_expect_code 141 sydbox -- syd-abort-fork-static 256 13 && # SIGPIPE
test_expect_code 142 sydbox -- syd-abort-fork-static 256 14 && # SIGALRM
test_expect_code 143 sydbox -- syd-abort-fork-static 256 15 # SIGTERM
ok 54 - return 128 + $SIGNUM if tracee is terminated (STATIC|FORK) [seize=0 seccomp:0]
expecting success:
test_expect_code 130 sydbox -- syd-abort-fork-static 256 2 && # SIGINT
test_expect_code 131 sydbox -- syd-abort-fork-static 256 3 && # SIGQUIT
test_expect_code 132 sydbox -- syd-abort-fork-static 256 4 && # SIGILL
test_expect_code 134 sydbox -- syd-abort-fork-static 256 6 && # SIGABRT
test_expect_code 136 sydbox -- syd-abort-fork-static 256 8 && # SIGFPE
test_expect_code 139 sydbox -- syd-abort-fork-static 256 11 && # SIGFPE
test_expect_code 141 sydbox -- syd-abort-fork-static 256 13 && # SIGPIPE
test_expect_code 142 sydbox -- syd-abort-fork-static 256 14 && # SIGALRM
test_expect_code 143 sydbox -- syd-abort-fork-static 256 15 # SIGTERM
ok 55 - return 128 + $SIGNUM if tracee is terminated (STATIC|FORK) [seize=0 seccomp:1]
expecting success:
test_expect_code 130 sydbox -- syd-abort-fork-static 256 2 && # SIGINT
test_expect_code 131 sydbox -- syd-abort-fork-static 256 3 && # SIGQUIT
test_expect_code 132 sydbox -- syd-abort-fork-static 256 4 && # SIGILL
test_expect_code 134 sydbox -- syd-abort-fork-static 256 6 && # SIGABRT
test_expect_code 136 sydbox -- syd-abort-fork-static 256 8 && # SIGFPE
test_expect_code 139 sydbox -- syd-abort-fork-static 256 11 && # SIGFPE
test_expect_code 141 sydbox -- syd-abort-fork-static 256 13 && # SIGPIPE
test_expect_code 142 sydbox -- syd-abort-fork-static 256 14 && # SIGALRM
test_expect_code 143 sydbox -- syd-abort-fork-static 256 15 # SIGTERM
ok 56 - return 128 + $SIGNUM if tracee is terminated (STATIC|FORK) [seize=1 seccomp:0]
expecting success:
test_expect_code 130 sydbox -- syd-abort-fork-static 256 2 && # SIGINT
test_expect_code 131 sydbox -- syd-abort-fork-static 256 3 && # SIGQUIT
test_expect_code 132 sydbox -- syd-abort-fork-static 256 4 && # SIGILL
test_expect_code 134 sydbox -- syd-abort-fork-static 256 6 && # SIGABRT
test_expect_code 136 sydbox -- syd-abort-fork-static 256 8 && # SIGFPE
test_expect_code 139 sydbox -- syd-abort-fork-static 256 11 && # SIGFPE
test_expect_code 141 sydbox -- syd-abort-fork-static 256 13 && # SIGPIPE
test_expect_code 142 sydbox -- syd-abort-fork-static 256 14 && # SIGALRM
test_expect_code 143 sydbox -- syd-abort-fork-static 256 15 # SIGTERM
ok 57 - return 128 + $SIGNUM if tracee is terminated (STATIC|FORK) [seize=1 seccomp:1]
skipping test: return 128 + $SIGNUM if tracee is terminated (PTHREAD) [seize=0 seccomp:0]
test_expect_code 130 sydbox -- syd-abort-pthread 8 2 && # SIGINT
test_expect_code 131 sydbox -- syd-abort-pthread 8 3 && # SIGQUIT
test_expect_code 132 sydbox -- syd-abort-pthread 8 4 && # SIGILL
test_expect_code 134 sydbox -- syd-abort-pthread 8 6 && # SIGABRT
test_expect_code 136 sydbox -- syd-abort-pthread 8 8 && # SIGFPE
test_expect_code 139 sydbox -- syd-abort-pthread 8 11 && # SIGFPE
test_expect_code 141 sydbox -- syd-abort-pthread 8 13 && # SIGPIPE
test_expect_code 142 sydbox -- syd-abort-pthread 8 14 && # SIGALRM
test_expect_code 143 sydbox -- syd-abort-pthread 8 15 # SIGTERM
ok 58 # skip return 128 + $SIGNUM if tracee is terminated (PTHREAD) [seize=0 seccomp:0] (missing FIXME)
skipping test: return 128 + $SIGNUM if tracee is terminated (PTHREAD) [seize=0 seccomp:1]
test_expect_code 130 sydbox -- syd-abort-pthread 8 2 && # SIGINT
test_expect_code 131 sydbox -- syd-abort-pthread 8 3 && # SIGQUIT
test_expect_code 132 sydbox -- syd-abort-pthread 8 4 && # SIGILL
test_expect_code 134 sydbox -- syd-abort-pthread 8 6 && # SIGABRT
test_expect_code 136 sydbox -- syd-abort-pthread 8 8 && # SIGFPE
test_expect_code 139 sydbox -- syd-abort-pthread 8 11 && # SIGFPE
test_expect_code 141 sydbox -- syd-abort-pthread 8 13 && # SIGPIPE
test_expect_code 142 sydbox -- syd-abort-pthread 8 14 && # SIGALRM
test_expect_code 143 sydbox -- syd-abort-pthread 8 15 # SIGTERM
ok 59 # skip return 128 + $SIGNUM if tracee is terminated (PTHREAD) [seize=0 seccomp:1] (missing FIXME of FIXME,PTRACE_SECCOMP)
skipping test: return 128 + $SIGNUM if tracee is terminated (PTHREAD) [seize=1 seccomp:0]
test_expect_code 130 sydbox -- syd-abort-pthread 8 2 && # SIGINT
test_expect_code 131 sydbox -- syd-abort-pthread 8 3 && # SIGQUIT
test_expect_code 132 sydbox -- syd-abort-pthread 8 4 && # SIGILL
test_expect_code 134 sydbox -- syd-abort-pthread 8 6 && # SIGABRT
test_expect_code 136 sydbox -- syd-abort-pthread 8 8 && # SIGFPE
test_expect_code 139 sydbox -- syd-abort-pthread 8 11 && # SIGFPE
test_expect_code 141 sydbox -- syd-abort-pthread 8 13 && # SIGPIPE
test_expect_code 142 sydbox -- syd-abort-pthread 8 14 && # SIGALRM
test_expect_code 143 sydbox -- syd-abort-pthread 8 15 # SIGTERM
ok 60 # skip return 128 + $SIGNUM if tracee is terminated (PTHREAD) [seize=1 seccomp:0] (missing FIXME of FIXME,PTRACE_SEIZE)
skipping test: return 128 + $SIGNUM if tracee is terminated (PTHREAD) [seize=1 seccomp:1]
test_expect_code 130 sydbox -- syd-abort-pthread 8 2 && # SIGINT
test_expect_code 131 sydbox -- syd-abort-pthread 8 3 && # SIGQUIT
test_expect_code 132 sydbox -- syd-abort-pthread 8 4 && # SIGILL
test_expect_code 134 sydbox -- syd-abort-pthread 8 6 && # SIGABRT
test_expect_code 136 sydbox -- syd-abort-pthread 8 8 && # SIGFPE
test_expect_code 139 sydbox -- syd-abort-pthread 8 11 && # SIGFPE
test_expect_code 141 sydbox -- syd-abort-pthread 8 13 && # SIGPIPE
test_expect_code 142 sydbox -- syd-abort-pthread 8 14 && # SIGALRM
test_expect_code 143 sydbox -- syd-abort-pthread 8 15 # SIGTERM
ok 61 # skip return 128 + $SIGNUM if tracee is terminated (PTHREAD) [seize=1 seccomp:1] (missing FIXME of FIXME,PTRACE_SEIZE,PTRACE_SECCOMP)
skipping test: return 128 + $SIGNUM if tracee is terminated (STATIC|PTHREAD) [seize=0 seccomp:0]
test_expect_code 130 sydbox -- syd-abort-pthread-static 8 2 && # SIGINT
test_expect_code 131 sydbox -- syd-abort-pthread-static 8 3 && # SIGQUIT
test_expect_code 132 sydbox -- syd-abort-pthread-static 8 4 && # SIGILL
test_expect_code 134 sydbox -- syd-abort-pthread-static 8 6 && # SIGABRT
test_expect_code 136 sydbox -- syd-abort-pthread-static 8 8 && # SIGFPE
test_expect_code 139 sydbox -- syd-abort-pthread-static 8 11 && # SIGFPE
test_expect_code 141 sydbox -- syd-abort-pthread-static 8 13 && # SIGPIPE
test_expect_code 142 sydbox -- syd-abort-pthread-static 8 14 && # SIGALRM
test_expect_code 143 sydbox -- syd-abort-pthread-static 8 15 # SIGTERM
ok 62 # skip return 128 + $SIGNUM if tracee is terminated (STATIC|PTHREAD) [seize=0 seccomp:0] (missing FIXME)
skipping test: return 128 + $SIGNUM if tracee is terminated (STATIC|PTHREAD) [seize=0 seccomp:1]
test_expect_code 130 sydbox -- syd-abort-pthread-static 8 2 && # SIGINT
test_expect_code 131 sydbox -- syd-abort-pthread-static 8 3 && # SIGQUIT
test_expect_code 132 sydbox -- syd-abort-pthread-static 8 4 && # SIGILL
test_expect_code 134 sydbox -- syd-abort-pthread-static 8 6 && # SIGABRT
test_expect_code 136 sydbox -- syd-abort-pthread-static 8 8 && # SIGFPE
test_expect_code 139 sydbox -- syd-abort-pthread-static 8 11 && # SIGFPE
test_expect_code 141 sydbox -- syd-abort-pthread-static 8 13 && # SIGPIPE
test_expect_code 142 sydbox -- syd-abort-pthread-static 8 14 && # SIGALRM
test_expect_code 143 sydbox -- syd-abort-pthread-static 8 15 # SIGTERM
ok 63 # skip return 128 + $SIGNUM if tracee is terminated (STATIC|PTHREAD) [seize=0 seccomp:1] (missing FIXME of FIXME,PTRACE_SECCOMP)
skipping test: return 128 + $SIGNUM if tracee is terminated (STATIC|PTHREAD) [seize=1 seccomp:0]
test_expect_code 130 sydbox -- syd-abort-pthread-static 8 2 && # SIGINT
test_expect_code 131 sydbox -- syd-abort-pthread-static 8 3 && # SIGQUIT
test_expect_code 132 sydbox -- syd-abort-pthread-static 8 4 && # SIGILL
test_expect_code 134 sydbox -- syd-abort-pthread-static 8 6 && # SIGABRT
test_expect_code 136 sydbox -- syd-abort-pthread-static 8 8 && # SIGFPE
test_expect_code 139 sydbox -- syd-abort-pthread-static 8 11 && # SIGFPE
test_expect_code 141 sydbox -- syd-abort-pthread-static 8 13 && # SIGPIPE
test_expect_code 142 sydbox -- syd-abort-pthread-static 8 14 && # SIGALRM
test_expect_code 143 sydbox -- syd-abort-pthread-static 8 15 # SIGTERM
ok 64 # skip return 128 + $SIGNUM if tracee is terminated (STATIC|PTHREAD) [seize=1 seccomp:0] (missing FIXME of FIXME,PTRACE_SEIZE)
skipping test: return 128 + $SIGNUM if tracee is terminated (STATIC|PTHREAD) [seize=1 seccomp:1]
test_expect_code 130 sydbox -- syd-abort-pthread-static 8 2 && # SIGINT
test_expect_code 131 sydbox -- syd-abort-pthread-static 8 3 && # SIGQUIT
test_expect_code 132 sydbox -- syd-abort-pthread-static 8 4 && # SIGILL
test_expect_code 134 sydbox -- syd-abort-pthread-static 8 6 && # SIGABRT
test_expect_code 136 sydbox -- syd-abort-pthread-static 8 8 && # SIGFPE
test_expect_code 139 sydbox -- syd-abort-pthread-static 8 11 && # SIGFPE
test_expect_code 141 sydbox -- syd-abort-pthread-static 8 13 && # SIGPIPE
test_expect_code 142 sydbox -- syd-abort-pthread-static 8 14 && # SIGALRM
test_expect_code 143 sydbox -- syd-abort-pthread-static 8 15 # SIGTERM
ok 65 # skip return 128 + $SIGNUM if tracee is terminated (STATIC|PTHREAD) [seize=1 seccomp:1] (missing FIXME of FIXME,PTRACE_SEIZE,PTRACE_SECCOMP)
expecting success:
sydbox -- sh -c "test -e /dev/sydbox" &&
sydbox -- sh -c "test -e /dev/sydbox/1" &&
test_expect_code 1 sydbox -- sh -c "test -e /dev/sydbox/0"
ok 66 - magic /dev/sydbox API is 1 [seize=0 seccomp:0]
expecting success:
sydbox -- sh -c "test -e /dev/sydbox" &&
sydbox -- sh -c "test -e /dev/sydbox/1" &&
test_expect_code 1 sydbox -- sh -c "test -e /dev/sydbox/0"
ok 67 - magic /dev/sydbox API is 1 [seize=0 seccomp:1]
expecting success:
sydbox -- sh -c "test -e /dev/sydbox" &&
sydbox -- sh -c "test -e /dev/sydbox/1" &&
test_expect_code 1 sydbox -- sh -c "test -e /dev/sydbox/0"
ok 68 - magic /dev/sydbox API is 1 [seize=1 seccomp:0]
expecting success:
sydbox -- sh -c "test -e /dev/sydbox" &&
sydbox -- sh -c "test -e /dev/sydbox/1" &&
test_expect_code 1 sydbox -- sh -c "test -e /dev/sydbox/0"
ok 69 - magic /dev/sydbox API is 1 [seize=1 seccomp:1]
expecting success:
sydbox -- sh <<-\EOF
test -e /dev/sydbox/core/sandbox/write"?"
test $? -eq 1 && exit 0
EOF &&
sydbox -- sh <<-\EOF
test -e /dev/sydbox/core/sandbox/write:deny &&
test -e /dev/sydbox/core/sandbox/write"?"
EOF
ok 70 - magic /dev/sydbox boolean checking works [seize=0 seccomp:0]
expecting success:
sydbox -- sh <<-\EOF
test -e /dev/sydbox/core/sandbox/write"?"
test $? -eq 1 && exit 0
EOF &&
sydbox -- sh <<-\EOF
test -e /dev/sydbox/core/sandbox/write:deny &&
test -e /dev/sydbox/core/sandbox/write"?"
EOF
ok 71 - magic /dev/sydbox boolean checking works [seize=0 seccomp:1]
expecting success:
sydbox -- sh <<-\EOF
test -e /dev/sydbox/core/sandbox/write"?"
test $? -eq 1 && exit 0
EOF &&
sydbox -- sh <<-\EOF
test -e /dev/sydbox/core/sandbox/write:deny &&
test -e /dev/sydbox/core/sandbox/write"?"
EOF
ok 72 - magic /dev/sydbox boolean checking works [seize=1 seccomp:0]
expecting success:
sydbox -- sh <<-\EOF
test -e /dev/sydbox/core/sandbox/write"?"
test $? -eq 1 && exit 0
EOF &&
sydbox -- sh <<-\EOF
test -e /dev/sydbox/core/sandbox/write:deny &&
test -e /dev/sydbox/core/sandbox/write"?"
EOF
ok 73 - magic /dev/sydbox boolean checking works [seize=1 seccomp:1]
expecting success:
sydbox -m core/sandbox/write:deny -- sh <<-\EOF
test -e /dev/sydbox/core/sandbox/write"?"
EOF
ok 74 - magic /dev/sydbox boolean checking works with -m switch [seize=0 seccomp:0]
expecting success:
sydbox -m core/sandbox/write:deny -- sh <<-\EOF
test -e /dev/sydbox/core/sandbox/write"?"
EOF
ok 75 - magic /dev/sydbox boolean checking works with -m switch [seize=0 seccomp:1]
expecting success:
sydbox -m core/sandbox/write:deny -- sh <<-\EOF
test -e /dev/sydbox/core/sandbox/write"?"
EOF
ok 76 - magic /dev/sydbox boolean checking works with -m switch [seize=1 seccomp:0]
expecting success:
sydbox -m core/sandbox/write:deny -- sh <<-\EOF
test -e /dev/sydbox/core/sandbox/write"?"
EOF
ok 77 - magic /dev/sydbox boolean checking works with -m switch [seize=1 seccomp:1]
expecting success:
pdir="$(unique_dir)" &&
mkdir "$pdir" &&
cdir="${pdir}/$(unique_dir)" &&
mkdir "$cdir" &&
sydbox \
-m core/sandbox/write:deny \
-m core/violation/raise_safe:0 \
syd-mkdir-p "$cdir"
not ok 78 - chdir() hook with EEXIST (mkdir -p) [RAISE_SAFE=0] [seize=0 seccomp:0]
#
# pdir="$(unique_dir)" &&
# mkdir "$pdir" &&
# cdir="${pdir}/$(unique_dir)" &&
# mkdir "$cdir" &&
# sydbox \
# -m core/sandbox/write:deny \
# -m core/violation/raise_safe:0 \
# syd-mkdir-p "$cdir"
#
expecting success:
pdir="$(unique_dir)" &&
mkdir "$pdir" &&
cdir="${pdir}/$(unique_dir)" &&
mkdir "$cdir" &&
sydbox \
-m core/sandbox/write:deny \
-m core/violation/raise_safe:0 \
syd-mkdir-p "$cdir"
not ok 79 - chdir() hook with EEXIST (mkdir -p) [RAISE_SAFE=0] [seize=0 seccomp:1]
#
# pdir="$(unique_dir)" &&
# mkdir "$pdir" &&
# cdir="${pdir}/$(unique_dir)" &&
# mkdir "$cdir" &&
# sydbox \
# -m core/sandbox/write:deny \
# -m core/violation/raise_safe:0 \
# syd-mkdir-p "$cdir"
#
expecting success:
pdir="$(unique_dir)" &&
mkdir "$pdir" &&
cdir="${pdir}/$(unique_dir)" &&
mkdir "$cdir" &&
sydbox \
-m core/sandbox/write:deny \
-m core/violation/raise_safe:0 \
syd-mkdir-p "$cdir"
not ok 80 - chdir() hook with EEXIST (mkdir -p) [RAISE_SAFE=0] [seize=1 seccomp:0]
#
# pdir="$(unique_dir)" &&
# mkdir "$pdir" &&
# cdir="${pdir}/$(unique_dir)" &&
# mkdir "$cdir" &&
# sydbox \
# -m core/sandbox/write:deny \
# -m core/violation/raise_safe:0 \
# syd-mkdir-p "$cdir"
#
expecting success:
pdir="$(unique_dir)" &&
mkdir "$pdir" &&
cdir="${pdir}/$(unique_dir)" &&
mkdir "$cdir" &&
sydbox \
-m core/sandbox/write:deny \
-m core/violation/raise_safe:0 \
syd-mkdir-p "$cdir"
not ok 81 - chdir() hook with EEXIST (mkdir -p) [RAISE_SAFE=0] [seize=1 seccomp:1]
#
# pdir="$(unique_dir)" &&
# mkdir "$pdir" &&
# cdir="${pdir}/$(unique_dir)" &&
# mkdir "$cdir" &&
# sydbox \
# -m core/sandbox/write:deny \
# -m core/violation/raise_safe:0 \
# syd-mkdir-p "$cdir"
#
expecting success:
pdir="$(unique_dir)" &&
mkdir "$pdir" &&
cdir="${pdir}/$(unique_dir)" &&
mkdir "$cdir" &&
test_must_violate sydbox \
-m core/sandbox/write:deny \
-m core/violation/raise_safe:1 \
syd-mkdir-p "$cdir"
not ok 82 - chdir() hook with EEXIST (mkdir -p) [RAISE_SAFE=1] [seize=0 seccomp:0]
#
# pdir="$(unique_dir)" &&
# mkdir "$pdir" &&
# cdir="${pdir}/$(unique_dir)" &&
# mkdir "$cdir" &&
# test_must_violate sydbox \
# -m core/sandbox/write:deny \
# -m core/violation/raise_safe:1 \
# syd-mkdir-p "$cdir"
#
expecting success:
pdir="$(unique_dir)" &&
mkdir "$pdir" &&
cdir="${pdir}/$(unique_dir)" &&
mkdir "$cdir" &&
test_must_violate sydbox \
-m core/sandbox/write:deny \
-m core/violation/raise_safe:1 \
syd-mkdir-p "$cdir"
not ok 83 - chdir() hook with EEXIST (mkdir -p) [RAISE_SAFE=1] [seize=0 seccomp:1]
#
# pdir="$(unique_dir)" &&
# mkdir "$pdir" &&
# cdir="${pdir}/$(unique_dir)" &&
# mkdir "$cdir" &&
# test_must_violate sydbox \
# -m core/sandbox/write:deny \
# -m core/violation/raise_safe:1 \
# syd-mkdir-p "$cdir"
#
expecting success:
pdir="$(unique_dir)" &&
mkdir "$pdir" &&
cdir="${pdir}/$(unique_dir)" &&
mkdir "$cdir" &&
test_must_violate sydbox \
-m core/sandbox/write:deny \
-m core/violation/raise_safe:1 \
syd-mkdir-p "$cdir"
not ok 84 - chdir() hook with EEXIST (mkdir -p) [RAISE_SAFE=1] [seize=1 seccomp:0]
#
# pdir="$(unique_dir)" &&
# mkdir "$pdir" &&
# cdir="${pdir}/$(unique_dir)" &&
# mkdir "$cdir" &&
# test_must_violate sydbox \
# -m core/sandbox/write:deny \
# -m core/violation/raise_safe:1 \
# syd-mkdir-p "$cdir"
#
expecting success:
pdir="$(unique_dir)" &&
mkdir "$pdir" &&
cdir="${pdir}/$(unique_dir)" &&
mkdir "$cdir" &&
test_must_violate sydbox \
-m core/sandbox/write:deny \
-m core/violation/raise_safe:1 \
syd-mkdir-p "$cdir"
not ok 85 - chdir() hook with EEXIST (mkdir -p) [RAISE_SAFE=1] [seize=1 seccomp:1]
#
# pdir="$(unique_dir)" &&
# mkdir "$pdir" &&
# cdir="${pdir}/$(unique_dir)" &&
# mkdir "$cdir" &&
# test_must_violate sydbox \
# -m core/sandbox/write:deny \
# -m core/violation/raise_safe:1 \
# syd-mkdir-p "$cdir"
#
expecting success:
pdir="$(unique_dir)" &&
mkdir "$pdir" &&
cdir="${pdir}/$(unique_dir)" &&
rm -fr "$cdir" &&
test_expect_code 1 sydbox \
-m core/sandbox/write:deny \
-m core/violation/raise_safe:0 \
syd-mkdir-p "$cdir"
ok 86 - chdir() hook with EPERM (mkdir -p) [RAISE_SAFE=0] [seize=0 seccomp:0]
expecting success:
pdir="$(unique_dir)" &&
mkdir "$pdir" &&
cdir="${pdir}/$(unique_dir)" &&
rm -fr "$cdir" &&
test_expect_code 1 sydbox \
-m core/sandbox/write:deny \
-m core/violation/raise_safe:0 \
syd-mkdir-p "$cdir"
ok 87 - chdir() hook with EPERM (mkdir -p) [RAISE_SAFE=0] [seize=0 seccomp:1]
expecting success:
pdir="$(unique_dir)" &&
mkdir "$pdir" &&
cdir="${pdir}/$(unique_dir)" &&
rm -fr "$cdir" &&
test_expect_code 1 sydbox \
-m core/sandbox/write:deny \
-m core/violation/raise_safe:0 \
syd-mkdir-p "$cdir"
ok 88 - chdir() hook with EPERM (mkdir -p) [RAISE_SAFE=0] [seize=1 seccomp:0]
expecting success:
pdir="$(unique_dir)" &&
mkdir "$pdir" &&
cdir="${pdir}/$(unique_dir)" &&
rm -fr "$cdir" &&
test_expect_code 1 sydbox \
-m core/sandbox/write:deny \
-m core/violation/raise_safe:0 \
syd-mkdir-p "$cdir"
ok 89 - chdir() hook with EPERM (mkdir -p) [RAISE_SAFE=0] [seize=1 seccomp:1]
expecting success:
pdir="$(unique_dir)" &&
mkdir "$pdir" &&
cdir="${pdir}/$(unique_dir)" &&
rm -fr "$cdir" &&
sydbox \
-m core/sandbox/write:deny \
-m whitelist/write+"$HOMER"/"${cdir}" \
-m core/violation/raise_safe:0 \
syd-mkdir-p "$cdir"
not ok 90 - chdir() hook with EPERM (mkdir -p) [RAISE_SAFE=0,WHITELIST] [seize=0 seccomp:0]
#
# pdir="$(unique_dir)" &&
# mkdir "$pdir" &&
# cdir="${pdir}/$(unique_dir)" &&
# rm -fr "$cdir" &&
# sydbox \
# -m core/sandbox/write:deny \
# -m whitelist/write+"$HOMER"/"${cdir}" \
# -m core/violation/raise_safe:0 \
# syd-mkdir-p "$cdir"
#
expecting success:
pdir="$(unique_dir)" &&
mkdir "$pdir" &&
cdir="${pdir}/$(unique_dir)" &&
rm -fr "$cdir" &&
sydbox \
-m core/sandbox/write:deny \
-m whitelist/write+"$HOMER"/"${cdir}" \
-m core/violation/raise_safe:0 \
syd-mkdir-p "$cdir"
not ok 91 - chdir() hook with EPERM (mkdir -p) [RAISE_SAFE=0,WHITELIST] [seize=0 seccomp:1]
#
# pdir="$(unique_dir)" &&
# mkdir "$pdir" &&
# cdir="${pdir}/$(unique_dir)" &&
# rm -fr "$cdir" &&
# sydbox \
# -m core/sandbox/write:deny \
# -m whitelist/write+"$HOMER"/"${cdir}" \
# -m core/violation/raise_safe:0 \
# syd-mkdir-p "$cdir"
#
expecting success:
pdir="$(unique_dir)" &&
mkdir "$pdir" &&
cdir="${pdir}/$(unique_dir)" &&
rm -fr "$cdir" &&
sydbox \
-m core/sandbox/write:deny \
-m whitelist/write+"$HOMER"/"${cdir}" \
-m core/violation/raise_safe:0 \
syd-mkdir-p "$cdir"
not ok 92 - chdir() hook with EPERM (mkdir -p) [RAISE_SAFE=0,WHITELIST] [seize=1 seccomp:0]
#
# pdir="$(unique_dir)" &&
# mkdir "$pdir" &&
# cdir="${pdir}/$(unique_dir)" &&
# rm -fr "$cdir" &&
# sydbox \
# -m core/sandbox/write:deny \
# -m whitelist/write+"$HOMER"/"${cdir}" \
# -m core/violation/raise_safe:0 \
# syd-mkdir-p "$cdir"
#
expecting success:
pdir="$(unique_dir)" &&
mkdir "$pdir" &&
cdir="${pdir}/$(unique_dir)" &&
rm -fr "$cdir" &&
sydbox \
-m core/sandbox/write:deny \
-m whitelist/write+"$HOMER"/"${cdir}" \
-m core/violation/raise_safe:0 \
syd-mkdir-p "$cdir"
not ok 93 - chdir() hook with EPERM (mkdir -p) [RAISE_SAFE=0,WHITELIST] [seize=1 seccomp:1]
#
# pdir="$(unique_dir)" &&
# mkdir "$pdir" &&
# cdir="${pdir}/$(unique_dir)" &&
# rm -fr "$cdir" &&
# sydbox \
# -m core/sandbox/write:deny \
# -m whitelist/write+"$HOMER"/"${cdir}" \
# -m core/violation/raise_safe:0 \
# syd-mkdir-p "$cdir"
#
# failed 12 among 93 test(s)
1..93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment