On 06/14/2013 07:16 PM, Jan Stancek wrote:

I ran this on older kernel, which worked fine - it skipped the build.
Then I tried RHEL7 alpha, which has more recent kernel: 3.10.0-0.rc4,
but it failed:

# ./fw_load
cp: cannot stat ‘/lib/udev/rules.d/50-firmware.rules’: No such file or
directory
fw_load     1  TBROK  :  Failed to copy
'/lib/udev/rules.d/50-firmware.rules' to '/etc/udev/rules.d/' at
fw_load.c:164
fw_load     2  TBROK  :  Remaining cases broken
fw_load     0  TWARN  :  tst_rmdir: TESTDIR was NULL; no removal attempted

I'll see if I can find out what happened to 50-firmware.rules,
it could some side-effect of systemd.

Would it be better to change failed copy command to just TWARN, and
continue testing? After that, test will completed with udev failed
test-cases, or if udev has those rules in the other configuration files,
everything will be fine.
I'd go with TCONF or skip udev testcases if we can't be sure that udev is running
and properly configured.

I'm also missing firmware.sh, in new udev (now merged with systemd tree),
50-firmware.rules file depends on some compile switch. Even when enabled
the rule looks like this:
http://cgit.freedesktop.org/systemd/systemd/tree/rules/50-firmware.rules

firmware.sh appears to be converted to .c now:
http://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-firmware.
I see now, I think it is better to skip udev in the test entirely, because there is a tendency
in kernel community to disable user-mode helper firmware loading (udev). It is already guarded with
CONFIG_FW_LOADER_USER_HELPER option in firmware code: firmware: Make user-mode helper optional.
There is only one use of it: loading firmware from non-standard path. It might also go away as soon as
configuring paths support had been added to kernel.

Thanks,
Alexey