diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-05-12 17:59:32 +0400 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-05-12 17:59:32 +0400 |
commit | e82cf339e476126e4016e417aee3c6eb52c702c9 (patch) | |
tree | af480d4552cb63fcf8ee28600986e9c16c7adb6a /testsuite/du | |
parent | a2215b98f7d65bc613b9c8f008d79672402c6a07 (diff) |
randomtest fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite/du')
-rw-r--r-- | testsuite/du/du-h-works | 6 | ||||
-rw-r--r-- | testsuite/du/du-k-works | 8 | ||||
-rw-r--r-- | testsuite/du/du-l-works | 10 | ||||
-rw-r--r-- | testsuite/du/du-m-works | 6 | ||||
-rw-r--r-- | testsuite/du/du-s-works | 4 | ||||
-rw-r--r-- | testsuite/du/du-works | 4 |
6 files changed, 20 insertions, 18 deletions
diff --git a/testsuite/du/du-h-works b/testsuite/du/du-h-works index a1b4b4905..c18433c29 100644 --- a/testsuite/du/du-h-works +++ b/testsuite/du/du-h-works @@ -1,6 +1,4 @@ # FEATURE: CONFIG_FEATURE_HUMAN_READABLE -d=/bin -du -h "$d" > logfile.gnu -busybox du -h "$d" > logfile.bb -cmp logfile.gnu logfile.bb +dd if=/dev/zero of=file bs=1M count=1 2>/dev/null +test x"`busybox du -h .`" = x"1.0M ." diff --git a/testsuite/du/du-k-works b/testsuite/du/du-k-works index 6c2c5d073..a52264945 100644 --- a/testsuite/du/du-k-works +++ b/testsuite/du/du-k-works @@ -1,4 +1,4 @@ -d=/bin -du -k "$d" > logfile.gnu -busybox du -k "$d" > logfile.bb -cmp logfile.gnu logfile.bb +dd if=/dev/zero of=file1 bs=1k count=64 2>/dev/null +dd if=/dev/zero of=file2 bs=1k count=16 2>/dev/null +test x"`busybox du -k .`" = x"80 ." \ + -o x"`busybox du -k .`" = x"88 ." \ diff --git a/testsuite/du/du-l-works b/testsuite/du/du-l-works index 64dcf8726..6b150e0dd 100644 --- a/testsuite/du/du-l-works +++ b/testsuite/du/du-l-works @@ -1,6 +1,8 @@ # FEATURE: CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K -d=/bin -du -l "$d" > logfile.gnu -busybox du -l "$d" > logfile.bb -cmp logfile.gnu logfile.bb +dd if=/dev/zero of=file1 bs=1k count=64 2>/dev/null +ln file1 file1.1 +dd if=/dev/zero of=file2 bs=1k count=16 2>/dev/null +test x"`busybox du -l .`" = x"144 ." \ + -o x"`busybox du -l .`" = x"148 ." \ + -o x"`busybox du -l .`" = x"152 ." \ diff --git a/testsuite/du/du-m-works b/testsuite/du/du-m-works index 6e733c016..9fa7437ac 100644 --- a/testsuite/du/du-m-works +++ b/testsuite/du/du-m-works @@ -1,6 +1,4 @@ # FEATURE: CONFIG_FEATURE_HUMAN_READABLE -d=/bin -du -m "$d" > logfile.gnu -busybox du -m "$d" > logfile.bb -cmp logfile.gnu logfile.bb +dd if=/dev/zero of=file bs=1M count=1 2>/dev/null +test x"`busybox du -m .`" = x"1 ." diff --git a/testsuite/du/du-s-works b/testsuite/du/du-s-works index 0c870ceb5..534432cb0 100644 --- a/testsuite/du/du-s-works +++ b/testsuite/du/du-s-works @@ -3,4 +3,6 @@ d=/bin du -s "$d" > logfile.gnu busybox du -s "$d" > logfile.bb -cmp logfile.gnu logfile.bb +cmp logfile.gnu logfile.bb && exit 0 +diff -u logfile.gnu logfile.bb +exit 1 diff --git a/testsuite/du/du-works b/testsuite/du/du-works index 4db684a9b..e320f1dd0 100644 --- a/testsuite/du/du-works +++ b/testsuite/du/du-works @@ -3,4 +3,6 @@ d=/bin du "$d" > logfile.gnu busybox du "$d" > logfile.bb -cmp logfile.gnu logfile.bb +cmp logfile.gnu logfile.bb && exit 0 +diff -u logfile.gnu logfile.bb +exit 1 |