Hi!
On 11/27/2013 10:04 PM, [email protected] wrote:
Hi!
diff --git a/testcases/kernel/device-drivers/acpi/.gitignore
b/testcases/kernel/device-drivers/acpi/.gitignore
new file mode 100644
index 0000000..76fbdc8
--- /dev/null
+++ b/testcases/kernel/device-drivers/acpi/.gitignore
@@ -0,0 +1,8 @@
+/LtpAcpiCmds.ko
This is wrong and even if it wasn't the ltp_acpi_cmd.ko is covered by
the *.ko bellow.
Ah, yes, but it's .*.ko (it doesn't match ltp_apci_cmd.ko), so I still
have to add it with the right name.
+/ltp_acpi
+/*.mod.c
+/modules.order
+/.tmp_versions
+/.*.ko
+/.*.cmd
+/Module.symvers
...
+ while (i < TST_TOTAL) {
+
+ SAFE_FILE_PRINTF(cleanup, dev_tcase, "%d", i);
+ SAFE_FILE_SCANF(cleanup, dev_result, "%d", &res);
+
+ tst_resm(res, "Test-case '%d'", i);
+
+ /*
+ * trigger ACPI_TRAVERSE test-case while we can
+ * get valid next device description.
+ */
+ if (i == ACPI_TRAVERSE && next_acpi_str())
+ continue;
The same goes for the tst_resm() here.
I would write this part so that reading the sys_str file triggers
walking to next object with _STR argument, while writing to dev_tcase
will reset the walk to root and wrote a code as:
SAFE_FILE_PRINTF(cleanup, dev_tcase, "%d", i);
SAFE_FILE_SCANF(cleanup, dev_result, "%d", &res);
if (i == ACPI_TRAVERSE)
res = next_acpi_str();
tst_resm(...);
And the next_acpi_str() would loop on reading the dev_str while "null"
is returned. Or even better make the read returns zero size at the end,
(should be mapped to EOF in case of FILE*).
OK
Also I would be more carefull and rather sanitized the result value, i.e.
tst_resm(ret ? TFAIL : TPASS, "...");
If I do that way, next_acpi_str could also return TCONF (kernel version
lower than 3.7) and then we would get TFAIL in the test-case result.
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list