mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
![Josef Bacik](/assets/img/avatar_default.png)
This adds a basic test for bpf_override_return to verify it works. We override the main function for mounting a btrfs fs so it'll return -ENOMEM and then make sure that trying to mount a btrfs fs will fail. Acked-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
15 lines
263 B
Bash
Executable file
15 lines
263 B
Bash
Executable file
#!/bin/bash
|
|
|
|
rm -f testfile.img
|
|
dd if=/dev/zero of=testfile.img bs=1M seek=1000 count=1
|
|
DEVICE=$(losetup --show -f testfile.img)
|
|
mkfs.btrfs -f $DEVICE
|
|
mkdir tmpmnt
|
|
./tracex7 $DEVICE
|
|
if [ $? -eq 0 ]
|
|
then
|
|
echo "SUCCESS!"
|
|
else
|
|
echo "FAILED!"
|
|
fi
|
|
losetup -d $DEVICE
|