aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHeinrich Schuchardt2019-06-05 22:50:42 +0200
committerHeinrich Schuchardt2019-06-10 23:06:19 +0200
commit1e37be5e20f42bbffcb633a268d46c038846a603 (patch)
tree39e7d7a3505078151bc6e73773bd2b2577e6b849 /lib
parent7eaa900e56b28350d954eac20b14c3adb6da2570 (diff)
efi_selftest: correct event group test
If any member of the event group is signaled, all members must be set to signaled and their notification functions have to be queued. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_selftest/efi_selftest_event_groups.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/efi_selftest/efi_selftest_event_groups.c b/lib/efi_selftest/efi_selftest_event_groups.c
index 5a7980c5d0b..6dcde50648b 100644
--- a/lib/efi_selftest/efi_selftest_event_groups.c
+++ b/lib/efi_selftest/efi_selftest_event_groups.c
@@ -80,12 +80,11 @@ static int execute(void)
return EFI_ST_FAILURE;
}
for (j = 0; j < GROUP_SIZE; ++j) {
- if (counter[j] != i) {
+ if (counter[j] != 2 * i + 1) {
efi_st_printf("i %u, j %u, count %u\n",
(unsigned int)i, (unsigned int)j,
(unsigned int)counter[j]);
- efi_st_error(
- "Notification function was called\n");
+ efi_st_error("Notification function was not called\n");
return EFI_ST_FAILURE;
}
/* Clear signaled state */
@@ -94,7 +93,7 @@ static int execute(void)
efi_st_error("Event was not signaled\n");
return EFI_ST_FAILURE;
}
- if (counter[j] != i) {
+ if (counter[j] != 2 * i + 1) {
efi_st_printf("i %u, j %u, count %u\n",
(unsigned int)i, (unsigned int)j,
(unsigned int)counter[j]);
@@ -109,7 +108,7 @@ static int execute(void)
"Signaled state not cleared\n");
return EFI_ST_FAILURE;
}
- if (counter[j] != i + 1) {
+ if (counter[j] != 2 * i + 2) {
efi_st_printf("i %u, j %u, count %u\n",
(unsigned int)i, (unsigned int)j,
(unsigned int)counter[j]);