-
Notifications
You must be signed in to change notification settings - Fork 65
Trying getting a new target working with LAVA #55
Copy link
Copy link
Closed
Description
Hi Everyone,
I have been trying getting a new target working with LAVA but i have the same error posted here #52.
I tried a simple Hello World in c to understand how LAVA works too and i followed the documentation 'how-to-lava' step by step however i got the error:
/usr/bin/python /home/ubuntu/lava/scripts/inject.py -t ptr_add,rel_write,malloc_off_by_one -m 50 -e 0 /home/ubuntu/lava/host.json hello_world
allowed bug types: [0, 2, 4]
Getting locked bugs directory...
Using dir /home/ubuntu/lava/target_injections/hello_world/bugs/0
Picking bugs to inject.
Selecting 50 bugs for injection of 0 available
Traceback (most recent call last):
File "/home/ubuntu/lava/scripts/inject.py", line 163, in <module>
(update_db, bug_list) = get_bug_list(args, db, allowed_bugtypes)
File "/home/ubuntu/lava/scripts/inject.py", line 52, in get_bug_list
assert available >= num_bugs_to_inject
AssertionError
That is the output of the /lava/target_injections/hello_world/logs/inject-1.log file.
The json file i created for the project is:
{
"name": "hello_world",
"db": "hello_world",
"preprocessed": true,
"dataflow": true,
"tarfile": "hello_world-pre.tar.gz",
"qcow": "wheezy_panda2.qcow2",
"snapshot": "root",
"expect_prompt": "root@debian-i386:~#",
"make": "make",
"clean": "make clean",
"install": "make install",
"command": "{install_dir}/bin/hello_world",
"main_file": [ "src/hello_world.c" ]
}
And the Makefile in according to /lava/target_injections/file/file-5.22/src/Makefile is :
all: hello_world
CFLAGS += -m32 -g -DHAVE_CONFIG_H -I. -I.. -gdwarf-2
LIBOBJ = \
hello_world-pre.o
.SECONDARY:
%-pre.c :
$(CC) $(CFLAGS) -include stdio.h -DHAVE_CONFIG_H -I. -I.. -E $< -o $@ $(shell echo "$@" | sed -e "s/-pre//")
sed -i '/^#/ d' $@
%.o : %.c
$(CC) $(CFLAGS) -c $< -fPIC -DPIC -o $@
hello_world : $(LIBOBJ)
$(CC) -g $(CFLAGS) -o $@ $^ -lz
preclean :
rm -f *-pre.c
rm -f *-pre.h
clean :
rm -f *.o \
rm -f *.so \
rm -f *.Tpo \
rm -f hello_world
Can you help me to fix and understand how to carry out it please ? I need some help thank you.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels