Control fault injection with config files instead of build flags
Bug: 27724259 Change-Id: I65bdefed10b3fb85fcb9e1147eaf0687d7d438f4
This commit is contained in:
+4
-2
@@ -17,16 +17,18 @@
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "ota_io.h"
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int main(int /* argc */, char** /* argv */) {
|
||||
int fd = open("testdata/test.file", O_RDWR);
|
||||
char buf[8];
|
||||
char *out = "321";
|
||||
const char* out = "321";
|
||||
int readv = ota_read(fd, buf, 4);
|
||||
printf("Read returned %d\n", readv);
|
||||
int writev = ota_write(fd, out, 4);
|
||||
printf("Write returned %d\n", writev);
|
||||
close(fd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user