diff --git a/src/common/libkvs/test/kvs_dir.c b/src/common/libkvs/test/kvs_dir.c index ece3f40ee8ed..cc51f5704d76 100644 --- a/src/common/libkvs/test/kvs_dir.c +++ b/src/common/libkvs/test/kvs_dir.c @@ -47,6 +47,12 @@ void test_empty (void) errno = 0; dir = kvsdir_create (NULL, NULL, "foo", "{\"data\":\"MQA=\",\"type\":\"FOO\",\"ver\":1}"); + ok (dir == NULL && errno == EINVAL, + "kvsdir_create with invalid treeobj fails with EINVAL"); + + errno = 0; + dir = kvsdir_create (NULL, NULL, "foo", + "{\"data\":\"MQA=\",\"type\":\"val\",\"ver\":1}"); ok (dir == NULL && errno == EINVAL, "kvsdir_create with non-dir treeobj fails with EINVAL");