diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/basic/gfapi/bug1291259.c | 9 | ||||
| -rw-r--r-- | tests/basic/gfapi/upcall-cache-invalidate.c | 7 | 
2 files changed, 14 insertions, 2 deletions
diff --git a/tests/basic/gfapi/bug1291259.c b/tests/basic/gfapi/bug1291259.c index 35f39938cb3..a0cd821a185 100644 --- a/tests/basic/gfapi/bug1291259.c +++ b/tests/basic/gfapi/bug1291259.c @@ -51,8 +51,6 @@ main (int argc, char *argv[])          unsigned char   globjhdl[GFAPI_HANDLE_LENGTH];          unsigned char   globjhdl2[GFAPI_HANDLE_LENGTH]; -        cbk.reason = 0; -          fprintf (stderr, "Starting libgfapi_fini\n");          if (argc != 3) {                  fprintf (stderr, "Invalid argument\n"); @@ -78,6 +76,13 @@ main (int argc, char *argv[])          ret = glfs_init (fs);          LOG_ERR("glfs_init", ret); +        /* This does not block, but enables caching of events. Real +         * applications like NFS-Ganesha run this in a thread before activity +         * on the fs (through this instance) happens. */ +        ret = glfs_h_poll_upcall(fs, &cbk); +        LOG_ERR ("glfs_h_poll_upcall", ret); +        cbk.reason = 0; +          fs2 = glfs_new (volname);          if (!fs) {                  fprintf (stderr, "glfs_new: returned NULL\n"); diff --git a/tests/basic/gfapi/upcall-cache-invalidate.c b/tests/basic/gfapi/upcall-cache-invalidate.c index cc2e6a0fe33..13cca69da89 100644 --- a/tests/basic/gfapi/upcall-cache-invalidate.c +++ b/tests/basic/gfapi/upcall-cache-invalidate.c @@ -68,6 +68,13 @@ main (int argc, char *argv[])          ret = glfs_init (fs);          LOG_ERR("glfs_init", ret); +        /* This does not block, but enables caching of events. Real +         * applications like NFS-Ganesha run this in a thread before activity +         * on the fs (through this instance) happens. */ +        ret = glfs_h_poll_upcall(fs_tmp, &cbk); +        LOG_ERR ("glfs_h_poll_upcall", ret); +        cbk.reason = 0; +          fs2 = glfs_new (volname);          if (!fs2) {                  fprintf (stderr, "glfs_new fs2: returned NULL\n");  | 
