aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstore/testsuite/04rm.sh
blob: abadd6110a04aa5902af1167908d674ab86a38f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! /bin/sh

# Remove non-existant fails.
[ "`echo -e 'rm /test' | ./xs_test 2>&1`" = "FATAL: rm: No such file or directory" ]
[ "`echo -e 'rm /dir/test' | ./xs_test 2>&1`" = "FATAL: rm: No such file or directory" ]

# Create file and remove it
[ "`echo -e 'write /test excl contents' | ./xs_test 2>&1`" = "" ]
[ "`echo -e 'rm /test' | ./xs_test 2>&1`" = "" ]

# Create directory and remove it.
[ "`echo -e 'mkdir /dir' | ./xs_test 2>&1`" = "" ]
[ "`echo -e 'rm /dir' | ./xs_test 2>&1`" = "" ]

# Create directory, create file, remove all.
[ "`echo -e 'mkdir /dir' | ./xs_test 2>&1`" = "" ]
[ "`echo -e 'write /dir/test excl contents' | ./xs_test 2>&1`" = "" ]
[ "`echo -e 'rm /dir' | ./xs_test 2>&1`" = "" ]