From bb00f97a82aea24bbf95de4dbd788d32bd34b427 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 9 Jun 2011 15:22:19 +1000 Subject: s3-selftest Add a test for 'message command' This also provides us a way to test that the -n option to smbclient works, as that becomes part of the filename. Andrew Bartlett --- selftest/target/Samba3.pm | 2 ++ source3/script/tests/test_smbclient_s3.sh | 48 +++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index 2f65be4ae3..595780aa14 100644 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -866,6 +866,8 @@ sub provision($$$$$$$) resolv:host file = $dns_host_file + message command = mv %s $shrdir/message.%m + # Begin extra options $extra_options # End extra options diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh index 0395f3e12c..60c3610ee8 100755 --- a/source3/script/tests/test_smbclient_s3.sh +++ b/source3/script/tests/test_smbclient_s3.sh @@ -218,6 +218,7 @@ EOF if [ $ret != 0 ] ; then echo "$out" echo "failed writing into read-only directory with error $ret" + false return fi @@ -235,6 +236,49 @@ EOF fi } + +# Test sending a message +test_message() +{ + tmpfile=$PREFIX/message_in.$$ + + cat > $tmpfile <