Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107313349
D28398.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D28398.diff
View Options
diff --git a/usr.bin/du/tests/du_test.sh b/usr.bin/du/tests/du_test.sh
--- a/usr.bin/du/tests/du_test.sh
+++ b/usr.bin/du/tests/du_test.sh
@@ -24,6 +24,17 @@
#
# $FreeBSD$
+require_sparse_file_support()
+{
+ if ! getconf MIN_HOLE_SIZE "$(pwd)"; then
+ echo "getconf MIN_HOLE_SIZE $(pwd) failed; sparse files " \
+ "probably not supported by file system"
+ mount
+ atf_skip "Test's work directory does not support sparse files;" \
+ "try with a different TMPDIR?"
+ fi
+}
+
atf_test_case A_flag
A_flag_head()
{
@@ -31,6 +42,7 @@
}
A_flag_body()
{
+ require_sparse_file_support
# XXX: compressed volumes?
atf_check truncate -s 10g sparse.file
atf_check -o inline:'1\tsparse.file\n' du -g sparse.file
@@ -103,6 +115,7 @@
}
g_flag_body()
{
+ require_sparse_file_support
atf_check truncate -s 1k A
atf_check truncate -s 1m B
atf_check truncate -s 1g C
@@ -117,6 +130,7 @@
}
h_flag_body()
{
+ require_sparse_file_support
atf_check truncate -s 1k A
atf_check truncate -s 1m B
atf_check truncate -s 1g C
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 13, 9:36 AM (20 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15780332
Default Alt Text
D28398.diff (1 KB)
Attached To
Mode
D28398: du_test: Skip three tests if sparse files are not supported
Attached
Detach File
Event Timeline
Log In to Comment