Lines Matching +full:non +full:- +full:empty

32 atf_test_case empty
34 atf_set "descr" "Tests that creating an empty file and later" \
41 atf_check -s eq:0 -o empty -e empty touch a
42 eval $(stat -s a | sed -e 's|st_|ost_|g') || atf_fail "stat failed"
43 [ ${ost_birthtime} -eq ${ost_atime} ] || atf_fail "Incorrect atime"
44 [ ${ost_birthtime} -eq ${ost_ctime} ] || atf_fail "Incorrect ctime"
45 [ ${ost_birthtime} -eq ${ost_mtime} ] || atf_fail "Incorrect mtime"
48 atf_check -s eq:0 -o empty -e empty cat a
49 eval $(stat -s a) || atf_fail "stat failed"
50 [ ${st_atime} -gt ${ost_atime} ] || atf_fail "Incorrect atime"
51 [ ${st_ctime} -eq ${ost_ctime} ] || atf_fail "Incorrect ctime"
52 [ ${st_mtime} -eq ${ost_mtime} ] || atf_fail "Incorrect mtime"
57 eval $(stat -s a) || atf_fail "stat failed"
58 [ ${st_atime} -gt ${ost_atime} ] || atf_fail "Incorrect atime"
59 [ ${st_ctime} -gt ${ost_ctime} ] || atf_fail "Incorrect ctime"
60 [ ${st_mtime} -gt ${ost_mtime} ] || atf_fail "Incorrect mtime"
75 atf_check -s eq:0 -o empty -e empty truncate -s 8k a
76 eval $(stat -s a | sed -e 's|st_|ost_|g') || atf_fail "stat failed"
77 [ ${ost_birthtime} -eq ${ost_atime} ] || atf_fail "Incorrect atime"
78 [ ${ost_birthtime} -eq ${ost_ctime} ] || atf_fail "Incorrect ctime"
79 [ ${ost_birthtime} -eq ${ost_mtime} ] || atf_fail "Incorrect mtime"
82 atf_check -s eq:0 -o ignore -e empty cat a
83 eval $(stat -s a) || atf_fail "stat failed"
84 [ ${st_atime} -gt ${ost_atime} ] || atf_fail "Incorrect atime"
85 [ ${st_ctime} -eq ${ost_ctime} ] || atf_fail "Incorrect ctime"
86 [ ${st_mtime} -eq ${ost_mtime} ] || atf_fail "Incorrect mtime"
93 atf_set "descr" "Tests that creating a non-empty file and later" \
100 echo foo >b || atf_fail "Non-empty creation failed"
101 eval $(stat -s b | sed -e 's|st_|ost_|g') || atf_fail "stat failed"
104 atf_check -s eq:0 -o inline:"foo\n" -e empty cat b
105 eval $(stat -s b) || atf_fail "stat failed"
106 [ ${st_atime} -gt ${ost_atime} ] || atf_fail "Incorrect atime"
107 [ ${st_ctime} -eq ${ost_ctime} ] || atf_fail "Incorrect ctime"
108 [ ${st_mtime} -eq ${ost_mtime} ] || atf_fail "Incorrect mtime"
122 echo foo >c || atf_fail "Non-empty creation failed"
123 eval $(stat -s c | sed -e 's|st_|ost_|g') || atf_fail "stat failed"
126 atf_check -s eq:0 -o empty -e empty ln c d
127 eval $(stat -s c) || atf_fail "stat failed"
128 [ ${st_atime} -eq ${ost_atime} ] || atf_fail "Incorrect atime"
129 [ ${st_ctime} -gt ${ost_ctime} ] || atf_fail "Incorrect ctime"
130 [ ${st_mtime} -eq ${ost_mtime} ] || atf_fail "Incorrect mtime"
144 atf_check -s eq:0 -o empty -e empty mkdir e
146 eval $(stat -s e | sed -e 's|st_|dost_|g') || atf_fail "stat failed"
147 eval $(stat -s e/a | sed -e 's|st_|ost_|g') || atf_fail "stat failed"
149 atf_check -s eq:0 -o empty -e empty mv e/a e/b
150 eval $(stat -s e | sed -e 's|st_|dst_|g') || atf_fail "stat failed"
151 eval $(stat -s e/b) || atf_fail "stat failed"
152 [ ${st_atime} -eq ${ost_atime} ] || atf_fail "Incorrect atime"
153 [ ${st_ctime} -gt ${ost_ctime} ] || atf_fail "Incorrect ctime"
154 [ ${st_mtime} -eq ${ost_mtime} ] || atf_fail "Incorrect mtime"
155 [ ${dst_mtime} -gt ${dost_mtime} ] || atf_fail "Incorrect mtime"
164 atf_add_test_case empty