summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/torture.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 07d568e879..3a250c1e14 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -4310,8 +4310,62 @@ BOOL torture_chkpath_test(int dummy)
return ret;
}
+static BOOL run_eatest(int dummy)
+{
+ static struct cli_state *cli;
+ const char *fname = "\\eatest.txt";
+ BOOL correct = True;
+ int fnum, i;
+
+ printf("starting eatest\n");
+
+ if (!torture_open_connection(&cli)) {
+ return False;
+ }
+
+ cli_unlink(cli, fname);
+ fnum = cli_nt_create_full(cli, fname, 0,
+ FIRST_DESIRED_ACCESS, FILE_ATTRIBUTE_ARCHIVE,
+ FILE_SHARE_NONE, FILE_OVERWRITE_IF,
+ 0x4044, 0);
+
+ if (fnum == -1) {
+ printf("open failed - %s\n", cli_errstr(cli));
+ return False;
+ }
+ for (i = 0; i < 10; i++) {
+ fstring ea_name, ea_val;
+ slprintf(ea_name, sizeof(ea_name), "EA_%d", i);
+ memset(ea_val, (char)i+1, i+1);
+ if (!cli_set_fnum_ea(cli, fnum, ea_name, ea_val, i+1)) {
+ printf("ea_set of name %s failed - %s\n", ea_name, cli_errstr(cli));
+ return False;
+ }
+ }
+
+ cli_close(cli, fnum);
+ for (i = 0; i < 10; i++) {
+ fstring ea_name, ea_val;
+
+ slprintf(ea_name, sizeof(ea_name), "EA_%d", i);
+ memset(ea_val, (char)i+1, i+1);
+ if (!cli_set_path_ea(cli, fname, ea_name, ea_val, i+1)) {
+ printf("ea_set of name %s failed - %s\n", ea_name, cli_errstr(cli));
+ return False;
+ }
+ }
+
+
+ cli_get_eas(cli, fname, NULL,NULL,NULL);
+
+ if (!torture_close_connection(cli)) {
+ correct = False;
+ }
+
+ return correct;
+}
static BOOL run_dirtest1(int dummy)
{
@@ -4650,6 +4704,7 @@ static struct {
{"IOCTL", torture_ioctl_test, 0},
{"CHKPATH", torture_chkpath_test, 0},
{"FDSESS", run_fdsesstest, 0},
+ { "EATEST", run_eatest, 0},
{NULL, NULL, 0}};