`DATADIR` and `ABS_DATADIR` are compile flags defined in
./kbd/tests/Makefile.am. `DATADIR` is the relative directory of
kbd, i.e `./kbd/ptest/tests` whereas `ABS_DATADIR` is the full
directory path, i.e `/usr/lib/kbd/ptest/tests`. The latter has a
problem when building ptests for a 64-bit image, because the tests
folder is located at `/usr/lib64/kbd/ptest/tests` instead.
Therefore `ABS_DATADIR` is changed to `DATADIR`, also consistent with
what *every other* kbd test is doing.
The test searches DATADIR recursively for a file named `test0.map`,
but it finds the wrong file at
`/findfile/test_0/keymaps/test0.map`,
while it actually needs
`/findfile/test_0/keymaps/i386/qwerty/test0.map`.
Thus appending `/i386` to `dirpath` so that `libkbdfile-test08.c`
finds the right test file.
Signed-off-by: Matthew Zeng<Matthew.Zeng@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>