"regress_backup_other_file",
"regress_error_backup_abort",
"regress_metadata_support",
+ "regress_standard_error_backup",
NULL,
};
#endif
return bRC_Error;
}
}
- // if (listing != ListingNone){
- // DMSG0(ctx, DINFO, "Start Listing (4) ...\n");
- // if (send_startlisting(ctx) != bRC_OK){
- // backend.ctx->terminate(ctx);
- // return bRC_Error;
- // }
- // } else {
- // DMSG0(ctx, DINFO, "Start Estimate (4) ...\n");
- // if (send_startestimate(ctx) != bRC_OK){
- // backend.ctx->terminate(ctx);
- // return bRC_Error;
- // }
- // }
break;
case BACKEND_JOB_INFO_RESTORE:
/* Start Restore (4) */
rc = backend.ctx->read_data_fixed(ctx, io->buf, io->count);
if (rc < 0){
io->status = rc;
- io->io_errno = rc;
+ io->io_errno = EIO;
return bRC_Error;
}
io->status = rc;
sp->plugin_obj.object_size = plugin_obj_size;
continue;
}
+ if (scan_parameter_str(cmd, "PLUGINOBJ_COUNT:", param)){
+ uint32_t count = str_to_int64(param.c_str());
+ DMSG1(ctx, DDEBUG, "count: %lu\n", count);
+ sp->plugin_obj.count = count;
+ continue;
+ }
/* error in protocol */
DMSG(ctx, DERROR, "Protocol error, got unknown command: %s\n", cmd.c_str());
JMSG(ctx, M_FATAL, "Protocol error, got unknown command: %s\n", cmd.c_str());
bool regress_error_restore_stderr = false;
bool regress_backup_other_file = false;
bool regress_metadata_support = false;
+bool regress_standard_error_backup = false;
#define BUFLEN 4096
write_plugin('C', "DATA\n");
write_plugin('I', "TEST8Data");
+ if (regress_standard_error_backup)
+ {
+ // next file
+ snprintf(buf, BIGBUFLEN, "FNAME:%s/bucket/%d/standard-error-file\n", PLUGINPREFIX, mypid);
+ write_plugin('C', buf);
+ write_plugin('C', "STAT:F 1048576 200 200 100640 1\n");
+ write_plugin('C', "TSTAMP:1504271937 1504271937 1504271937\n");
+ signal_eod();
+ write_plugin('I', "TEST8-Error-Start");
+ /* here comes a file data contents */
+ write_plugin('E', "TEST8-Error: Standard IO Error goes Here");
+ // write_plugin('C', "DATA\n");
+ // write_plugin('D', "/* here comes a file data contents */");
+ // write_plugin('D', "/* here comes another file line */");
+ // write_plugin('D', "/* here comes another file line */");
+ // write_plugin('D', "/* here comes another file line */");
+ write_plugin('I', "TEST8-Error-End");
+ // signal_eod();
+ }
+
if (regress_backup_plugin_objects)
{
// test Plugin Objects interface
write_plugin('D', "/* here comes another file line */");
signal_eod();
+ if (regress_standard_error_backup)
+ {
+ // next file
+ snprintf(buf, BIGBUFLEN, "FNAME:%s/bucket/%d/standard-error-file2\n", PLUGINPREFIX, mypid);
+ write_plugin('C', buf);
+ write_plugin('C', "STAT:F 1048576 200 200 100640 1\n");
+ write_plugin('C', "TSTAMP:1504271937 1504271937 1504271937\n");
+ signal_eod();
+ write_plugin('I', "TEST8-Error-Start");
+ /* here comes a file data contents */
+ write_plugin('C', "DATA\n");
+ write_plugin('D', "/* here comes a file data contents */");
+ write_plugin('D', "/* here comes another file line */");
+ write_plugin('D', "/* here comes another file line */");
+ write_plugin('D', "/* here comes another file line */");
+ write_plugin('E', "TEST8-Error: Standard IO Error goes Here");
+ write_plugin('I', "TEST8-Error-End");
+ // signal_eod();
+ }
+
const int bigfileblock = 100000;
const int bigfilesize = bigfileblock * 5;
snprintf(buf, BIGBUFLEN, "FNAME:%s/bucket/%d/bigfile.raw\n", PLUGINPREFIX, mypid);
// "regress_error_restore_stderr",
// "regress_backup_plugin_objects",
// "regress_error_backup_abort",
+ // "regress_standard_error_backup",
if (strcmp(buf, "regress_error_plugin_params=1\n") == 0){
regress_error_plugin_params = true;
continue;
regress_metadata_support = true;
continue;
}
+ if (strcmp(buf, "regress_standard_error_backup=1\n") == 0){
+ regress_standard_error_backup = true;
+ continue;
+ }
if (sscanf(buf, "listing=%s\n", buf) == 1){
strcpy(listing, buf);
continue;