blob: 06d60766fda86c528004a5be74a2314cff4bf57d [file] [log] [blame]
Juraj Vijtiukf3939c92019-05-14 13:07:38 +02001#include <stdio.h>
2#include <stdlib.h>
3
4#include "libyang.h"
5
6int main(int argc, char **argv) {
Juraj Vijtiuk04f71272019-08-07 06:49:00 -04007 if (argc != 2) {
8 fprintf(stderr, "invalid usage\n");
9 exit(EXIT_FAILURE);
10 }
Juraj Vijtiukf3939c92019-05-14 13:07:38 +020011
12
Juraj Vijtiuk04f71272019-08-07 06:49:00 -040013 struct ly_ctx *ctx = NULL;
Juraj Vijtiukf3939c92019-05-14 13:07:38 +020014 LY_ERR err;
Juraj Vijtiuk04f71272019-08-07 06:49:00 -040015 while (__AFL_LOOP(100)) {
Juraj Vijtiukf3939c92019-05-14 13:07:38 +020016 err = ly_ctx_new(NULL, 0, &ctx);
17 if (err != LY_SUCCESS) {
18 fprintf(stderr, "Failed to create context\n");
19 exit(EXIT_FAILURE);
20 }
21
Juraj Vijtiuk04f71272019-08-07 06:49:00 -040022 lys_parse_path(ctx, argv[1], LYS_IN_YANG);
23 ly_ctx_destroy(ctx, NULL);
24 }
25
26 return 0;
Juraj Vijtiukf3939c92019-05-14 13:07:38 +020027}