All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 72f4d929 authored by Charlie Jacobsen's avatar Charlie Jacobsen Committed by Vikram Narayanan

Two basic tests for caps.

parent 7f6512ec
......@@ -6,15 +6,38 @@
* Copyright: University of Utah
*/
#define LCD_FAIL(msg...) do{ LCD_ERR(msg); return -1; } while(0)
#define LCD_PASS() do{ return 0; } while(0)
static int test01(void)
{
return 0;
struct cspace *cspace;
if (lcd_mk_cspace(&cspace))
LCD_FAIL("mk cspace");
lcd_rm_cspace(cspace);
LCD_PASS();
}
static int test02(void)
{
struct cspace *cspace;
int ret;
if (lcd_mk_cspace(&cspace))
LCD_FAIL("mk cspace");
ret = lcd_lock_cspace(cspace);
if (ret)
LCD_FAIL("lock cspace returned %d", ret);
lcd_unlock_cspace(cspacse);
lcd_rm_cspace(cspace);
LCD_PASS();
}
static int api_tests(void)
{
if (test01())
return -1;
if (test02())
return -1;
LCD_MSG("all api tests passed!");
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment