Page MenuHomeFreeBSD

D28398.id83228.diff
No OneTemporary

D28398.id83228.diff

Index: usr.bin/du/tests/du_test.sh
===================================================================
--- usr.bin/du/tests/du_test.sh
+++ usr.bin/du/tests/du_test.sh
@@ -32,7 +32,10 @@
A_flag_body()
{
# XXX: compressed volumes?
- atf_check truncate -s 10g sparse.file
+ if ! truncate -s 10g sparse.file; then
+ atf_skip "Unable to create 10GB sparse file (running on tmpfs?)"
+ rm -f sparse.file
+ fi
atf_check -o inline:'1\tsparse.file\n' du -g sparse.file
atf_check -o inline:'10\tsparse.file\n' du -A -g sparse.file
}
@@ -106,7 +109,10 @@
atf_check truncate -s 1k A
atf_check truncate -s 1m B
atf_check truncate -s 1g C
- atf_check truncate -s 1t D
+ if ! truncate -s 1t D; then
+ atf_skip "Unable to create 1T sparse file (running on tmpfs?)"
+ rm -f A B C D
+ fi
atf_check -o inline:'1\tA\n1\tB\n1\tC\n1024\tD\n' du -Ag A B C D
}
@@ -120,7 +126,10 @@
atf_check truncate -s 1k A
atf_check truncate -s 1m B
atf_check truncate -s 1g C
- atf_check truncate -s 1t D
+ if ! truncate -s 1t D; then
+ atf_skip "Unable to create 1T sparse file (running on tmpfs?)"
+ rm -f A B C D
+ fi
atf_check -o inline:'1.0K\tA\n1.0M\tB\n1.0G\tC\n1.0T\tD\n' du -Ah A B C D
}

File Metadata

Mime Type
text/plain
Expires
Mon, Mar 23, 5:17 AM (10 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30162376
Default Alt Text
D28398.id83228.diff (1 KB)

Event Timeline