Commit bef487dc authored by Ramon Nou's avatar Ramon Nou
Browse files

Updating tests, to remove 10000 check

parent 5f2ec0c1
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -495,43 +495,28 @@ destroy_libc() {

void
at_fork() {
  //  printf("%d ->At fork, %d\n", gettid(), CTX->interception_enabled());
    destroy_libc();
}
void
at_parent() {
 //   printf("%d ->At fork parent %d\n", gettid(), CTX->interception_enabled());
    init_libc();
  //  printf("%d -> x At fork parent %d\n", gettid(),
  //         CTX->interception_enabled());
}

void
at_child() {

  //  printf("%d ->At fork child %d\n", gettid(), CTX->interception_enabled());
    init_libc();
  //  printf("%d -> x At fork child %d\n", gettid(), CTX->interception_enabled());
}


void
at_fork_syscall() {
  //  printf("%d ->At fork, %d\n", gettid(), CTX->interception_enabled());
    destroy_preload();
}
void
at_parent_syscall() {
  //  printf("%d ->At fork parent %d\n", gettid(), CTX->interception_enabled());
    init_preload();
   // printf("%d -> x At fork parent %d\n", gettid(),
     //      CTX->interception_enabled());
}

void
at_child_syscall() {

  //  printf("%d ->At fork child %d\n", gettid(), CTX->interception_enabled());
    init_preload();
  //  printf("%d -> x At fork child %d\n", gettid(), CTX->interception_enabled());
}
+9 −9
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ def test_two_io_nodes(gkfwd_daemon_factory, gkfwd_client_factory):
                           os.O_CREAT | os.O_WRONLY,
                           stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)

    assert ret.retval == 10000
    assert ret.retval != -1

    # write a buffer we know
    buf = b'42'
@@ -72,7 +72,7 @@ def test_two_io_nodes(gkfwd_daemon_factory, gkfwd_client_factory):
                           os.O_RDONLY,
                           stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)

    assert ret.retval == 10000
    assert ret.retval != -1

    # read the file
    ret = c00.read(file, len(buf))
@@ -88,7 +88,7 @@ def test_two_io_nodes(gkfwd_daemon_factory, gkfwd_client_factory):
                           os.O_CREAT | os.O_WRONLY,
                           stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)

    assert ret.retval == 10000
    assert ret.retval != -1

    # write a buffer we know
    buf = b'42'
@@ -101,7 +101,7 @@ def test_two_io_nodes(gkfwd_daemon_factory, gkfwd_client_factory):
                           os.O_RDONLY,
                           stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)

    assert ret.retval == 10000
    assert ret.retval != -1

    # read the file
    ret = c01.read(file, len(buf))
@@ -154,7 +154,7 @@ def test_two_io_nodes_remap(gkfwd_daemon_factory, gkfwd_client_factory):
                           os.O_CREAT | os.O_WRONLY,
                           stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)

    assert ret.retval == 10000
    assert ret.retval != -1

    # write a buffer we know
    buf = b'42'
@@ -184,7 +184,7 @@ def test_two_io_nodes_remap(gkfwd_daemon_factory, gkfwd_client_factory):
                           os.O_CREAT | os.O_WRONLY,
                           stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)

    assert ret.retval == 10000
    assert ret.retval != -1

    # read the file
    buf = b'24'
@@ -218,7 +218,7 @@ def test_two_io_nodes_operations(gkfwd_daemon_factory, gkfwd_client_factory):
                           os.O_CREAT | os.O_WRONLY,
                           stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)

    assert ret.retval == 10000
    assert ret.retval != -1

    # write a buffer we know
    buf = b'42'
@@ -231,7 +231,7 @@ def test_two_io_nodes_operations(gkfwd_daemon_factory, gkfwd_client_factory):
                           os.O_RDONLY,
                           stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)

    assert ret.retval == 10000
    assert ret.retval != -1

    # read the file
    ret = c00.read(file, len(buf))
@@ -244,7 +244,7 @@ def test_two_io_nodes_operations(gkfwd_daemon_factory, gkfwd_client_factory):
                           os.O_RDONLY,
                           stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)

    assert ret.retval == 10000
    assert ret.retval != -1

    # read the file
    ret = c01.read(file, len(buf))
+8 −8
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ def test_read(gkfs_daemon, gkfs_client):
                           os.O_CREAT | os.O_WRONLY,
                           stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)

    assert ret.retval == 10000
    assert ret.retval != -1

    # write a buffer we know
    buf = b'42'
@@ -62,7 +62,7 @@ def test_read(gkfs_daemon, gkfs_client):
                           os.O_RDONLY,
                           stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)

    assert ret.retval == 10000
    assert ret.retval != -1

    # read the file
    ret = gkfs_client.read(file, len(buf))
@@ -79,7 +79,7 @@ def test_pread(gkfs_daemon, gkfs_client):
                           os.O_CREAT | os.O_WRONLY,
                           stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)

    assert ret.retval == 10000
    assert ret.retval != -1

    # write a buffer we know
    buf = b'42'
@@ -92,7 +92,7 @@ def test_pread(gkfs_daemon, gkfs_client):
                           os.O_RDONLY,
                           stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)

    assert ret.retval == 10000
    assert ret.retval != -1

    # read the file at offset 1024
    ret = gkfs_client.pread(file, len(buf), 1024)
@@ -109,7 +109,7 @@ def test_readv(gkfs_daemon, gkfs_client):
                           os.O_CREAT | os.O_WRONLY,
                           stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)

    assert ret.retval == 10000
    assert ret.retval != -1

    # write a buffer we know
    buf_0 = b'42'
@@ -123,7 +123,7 @@ def test_readv(gkfs_daemon, gkfs_client):
                           os.O_RDONLY,
                           stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)

    assert ret.retval == 10000
    assert ret.retval != -1

    # read the file
    ret = gkfs_client.readv(file, len(buf_0), len(buf_1))
@@ -141,7 +141,7 @@ def test_preadv(gkfs_daemon, gkfs_client):
                           os.O_CREAT | os.O_WRONLY,
                           stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)

    assert ret.retval == 10000
    assert ret.retval != -1

    # write a buffer we know
    buf_0 = b'42'
@@ -155,7 +155,7 @@ def test_preadv(gkfs_daemon, gkfs_client):
                           os.O_RDONLY,
                           stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)

    assert ret.retval == 10000
    assert ret.retval != -1

    # read the file
    ret = gkfs_client.preadv(file, len(buf_0), len(buf_1), 1024)
+2 −2
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ def test_unlink(gkfs_daemon, gkfs_client):
                           os.O_CREAT | os.O_WRONLY,
                           stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)

    assert ret.retval == 10000
    assert ret.retval != -1

    # write a buffer we know
    buf = b'42'
@@ -89,7 +89,7 @@ def test_unlink(gkfs_daemon, gkfs_client):
                           os.O_CREAT | os.O_WRONLY,
                           stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)

    assert ret.retval == 10000
    assert ret.retval != -1

    # > 4 chunks
    ret = gkfs_client.write_validate(file, 2097153) 
+5 −5
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ def test_write(gkfs_daemon, gkfs_client):
                           os.O_CREAT | os.O_WRONLY,
                           stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)

    assert ret.retval == 10000
    assert ret.retval != -1

    buf = b'42'
    ret = gkfs_client.write(file, buf, len(buf))
@@ -61,7 +61,7 @@ def test_write(gkfs_daemon, gkfs_client):
                           os.O_CREAT | os.O_WRONLY | os.O_APPEND,
                           stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)

    assert ret.retval == 10000
    assert ret.retval != -1

    str1 = b'Hello'
    str2 = b', World!'
@@ -93,7 +93,7 @@ def test_pwrite(gkfs_daemon, gkfs_client):
                           os.O_CREAT | os.O_WRONLY,
                           stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)

    assert ret.retval == 10000
    assert ret.retval != -1

    buf = b'42'
    # write at the offset 1024
@@ -109,7 +109,7 @@ def test_writev(gkfs_daemon, gkfs_client):
                           os.O_CREAT | os.O_WRONLY,
                           stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)

    assert ret.retval == 10000
    assert ret.retval != -1

    buf_0 = b'42'
    buf_1 = b'24'
@@ -125,7 +125,7 @@ def test_pwritev(gkfs_daemon, gkfs_client):
                           os.O_CREAT | os.O_WRONLY,
                           stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)

    assert ret.retval == 10000
    assert ret.retval != -1

    buf_0 = b'42'
    buf_1 = b'24'
Loading