Skip to content

Commit

Permalink
Use -v for verifier
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsamaroo committed Feb 27, 2021
1 parent 26ad009 commit 459a393
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test_framework/test_verifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def check_datafile(filename):
memfile.flush()
cmd.extend(['-m', memfile.name])

cmd.extend(['-V', '-'])
cmd.extend(['-v', '-'])

vm = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE)

Expand Down
8 changes: 4 additions & 4 deletions vm/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static void register_functions(struct ubpf_vm *vm);

static void usage(const char *name)
{
fprintf(stderr, "usage: %s [-h] [-j|--jit] [-V|--verify] [-m|--mem PATH] BINARY\n", name);
fprintf(stderr, "usage: %s [-h] [-j|--jit] [-v|--verify] [-m|--mem PATH] BINARY\n", name);
fprintf(stderr, "\nExecutes the eBPF code in BINARY and prints the result to stdout.\n");
fprintf(stderr, "If --mem is given then the specified file will be read and a pointer\nto its data passed in r1.\n");
fprintf(stderr, "If --jit is given then the JIT compiler will be used.\n");
Expand All @@ -50,7 +50,7 @@ int main(int argc, char **argv)
{ .name = "mem", .val = 'm', .has_arg=1 },
{ .name = "jit", .val = 'j' },
{ .name = "register-offset", .val = 'r', .has_arg=1 },
{ .name = "verify", .val = 'V' },
{ .name = "verify", .val = 'v' },
{ }
};

Expand All @@ -59,7 +59,7 @@ int main(int argc, char **argv)
bool verify = false;

int opt;
while ((opt = getopt_long(argc, argv, "hm:jr:V", longopts, NULL)) != -1) {
while ((opt = getopt_long(argc, argv, "hm:jr:v", longopts, NULL)) != -1) {
switch (opt) {
case 'm':
mem_filename = optarg;
Expand All @@ -70,7 +70,7 @@ int main(int argc, char **argv)
case 'r':
ubpf_set_register_offset(atoi(optarg));
break;
case 'V':
case 'v':
verify = true;
break;
case 'h':
Expand Down

0 comments on commit 459a393

Please sign in to comment.