Lines Matching refs:xsh
49 static struct xs_handle *xsh; variable
78 xs_rm(xsh, XBT_NULL, path); in call_test()
79 if ( !xs_write(xsh, XBT_NULL, path, "", 0) ) in call_test()
155 buf = xs_read(xsh, XBT_NULL, node, &len); in verify_node()
169 return xs_write(xsh, XBT_NULL, paths[0], write_buffers[0], par) ? 0 : errno; in test_read_init()
177 buf = xs_read(xsh, XBT_NULL, paths[0], &len); in test_read()
193 return xs_write(xsh, XBT_NULL, paths[0], write_buffers[0], par) ? 0 : errno; in test_write()
206 if ( !xs_write(xsh, XBT_NULL, paths[i], write_buffers[i], 1) ) in test_dir_init()
217 dir = xs_directory(xsh, XBT_NULL, path, &num); in test_dir()
231 dir = xs_directory(xsh, XBT_NULL, path, &num); in test_dir_deinit()
257 if ( xs_write(xsh, XBT_NULL, paths[i], write_buffers[i], 1) ) in test_rm_init()
265 if ( !xs_rm(xsh, XBT_NULL, path) ) in test_rm()
282 t = xs_transaction_start(xsh); in test_ta1()
285 if ( xs_transaction_end(xsh, t, par ? true : false) ) in test_ta1()
299 return xs_write(xsh, XBT_NULL, paths[0], write_buffers[0], 1) ? 0 : errno; in test_ta2_init()
312 t = xs_transaction_start(xsh); in test_ta2()
315 buf = xs_read(xsh, t, paths[0], &len); in test_ta2()
319 if ( !xs_write(xsh, t, paths[0], "b", 1) ) in test_ta2()
321 buf = xs_read(xsh, t, paths[0], &len); in test_ta2()
328 buf = xs_read(xsh, XBT_NULL, paths[0], &len); in test_ta2()
335 if ( xs_transaction_end(xsh, t, par ? true : false) ) in test_ta2()
346 xs_transaction_end(xsh, t, true); in test_ta2()
357 return xs_write(xsh, XBT_NULL, paths[0], write_buffers[0], 1) ? 0 : errno; in test_ta3_init()
367 t = xs_transaction_start(xsh); in test_ta3()
370 buf = xs_read(xsh, t, paths[0], &len); in test_ta3()
374 if ( !xs_write(xsh, XBT_NULL, paths[0], "b", 1) ) in test_ta3()
376 buf = xs_read(xsh, t, paths[0], &len); in test_ta3()
383 if ( !xs_write(xsh, t, paths[0], "c", 1) ) in test_ta3()
385 buf = xs_read(xsh, t, paths[0], &len); in test_ta3()
392 if ( xs_transaction_end(xsh, t, false) || errno != EAGAIN ) in test_ta3()
398 xs_transaction_end(xsh, t, true); in test_ta3()
429 xs_rm(xsh, XBT_NULL, path); in cleanup()
433 t = xs_transaction_start(xsh); in cleanup()
437 dir = xs_directory(xsh, t, TEST_PATH, &num); in cleanup()
439 xs_rm(xsh, t, TEST_PATH); in cleanup()
442 if ( xs_transaction_end(xsh, t, false) || errno != EAGAIN ) in cleanup()
493 xsh = xs_open(0); in main()
494 if ( !xsh ) in main()
521 xs_close(xsh); in main()