Unverified Commit 8563083d authored by Tommaso Tocci's avatar Tommaso Tocci
Browse files

wr_test: fix nonexisting file open test

Use special file name "nonexisting" for testing non existing file
parent 5eb75150
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -18,13 +18,14 @@ using namespace std;

int main(int argc, char* argv[]) {

    string p = "/tmp/mountdir/file"s;
    string mountdir = "/tmp/mountdir";
    string p = mountdir + "/file";
    char buffIn[] = "oops.";
    char *buffOut = new char[strlen(buffIn)];
    int fd;
    int ret;

    fd = open(p.c_str(), O_RDONLY);
    fd = open((mountdir + "/nonexisting").c_str(), O_RDONLY);
    if(fd >= 0 ){
        cerr << "ERROR: Succeeded on opening non-existing file" << endl;
        return -1;