Attention is currently required from: Angel Pons, Anastasia Klimchuk.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/52684 )
Change subject: ene_lpc.c: Extract params check into a function
......................................................................
Patch Set 1: -Code-Review
(1 comment)
File ene_lpc.c:
https://review.coreboot.org/c/flashrom/+/52684/comment/e636ecf7_ab84fee0
PS1, Line 519: = NULL
> nit: initialisation is not necessary
heh, I knew I missed something :) it's not a nit IMHO, static analysis
tools could complain about it.
What I usually do to avoid such situations: declare it inline with the
code and `const`, e.g.
char *const p = extract_programmer_param("type");
This way it's clear that it can never be used unitialized.
--
To view, visit https://review.coreboot.org/c/flashrom/+/52684
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I7c3b6dea0edbc7547f0b307a0508c7d2b2a6d370
Gerrit-Change-Number: 52684
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Miklós Márton <martonmiklosqdev(a)gmail.com>
Gerrit-CC: Victor Ding <victording(a)google.com>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Tue, 27 Apr 2021 14:35:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: comment
Attention is currently required from: Anastasia Klimchuk.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/52604 )
Change subject: [RFC] tests: Abstract port I/O and factor mec1308 specifics out
......................................................................
Patch Set 1:
(2 comments)
File tests/init_shutdown.c:
https://review.coreboot.org/c/flashrom/+/52604/comment/cc11e331_0aa7f976
PS1, Line 63: .outb = mec1308_outb,
> I think, maybe I could get away with a default implementation of outx functions, and only customise […]
I'm actually not familiar with our port-i/o using programmer drivers. Without
looking into them, it could work or not. It boils down to what the return
value of an inb/inw/inl call would depend on. If it's more than the very last
outb/outw/outl, we would obviously have to cache more information than that.
Thinking really far ahead: For more than just testing initialization, e.g. test
flashing procedures as well, we may have to implement more sophisticated
state machines to mock the programmers. That would very likely need the
outb/outw/outl pointers and a private data structure.
tl;dr
I can imagine we may need all the pointers.
File tests/tests.c:
https://review.coreboot.org/c/flashrom/+/52604/comment/694b35dd_5b34c7da
PS1, Line 23: const struct io_mock *current_io = NULL;
> Do you think it would work if I try to swap this line with extern definition in io_mock. […]
I guess I'm just used to specify `extern` in header files because it has
some implications with incomplete types. We can also add `extern` here.
But I would keep the `= NULL` here because this compilation unit is where
it is consumed and the initialization actually matters.
A good rule to live by: Any global should be either declared `static` or
be used somewhere else. If something is not `static`, you have to expect
it to be referenced elsewhere.
Alternative: Make it `static` and add a setter function to be called from
the other compilation units.
--
To view, visit https://review.coreboot.org/c/flashrom/+/52604
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ia3a424478456a7c968b3c736ba371d755c494f30
Gerrit-Change-Number: 52604
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Tue, 27 Apr 2021 13:30:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Nicola Corna, Jack Rosenthal, Paul Menzel, Stefan Reinauer, David Hendricks, Daniel Campello, Arthur Heymans, Carl-Daniel Hailfinger.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/23021 )
Change subject: layout: Add -i <region>[:<file>] support
......................................................................
Patch Set 36: Code-Review+2
--
To view, visit https://review.coreboot.org/c/flashrom/+/23021
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ic5465659605d8431d931053967b40290195cfd99
Gerrit-Change-Number: 23021
Gerrit-PatchSet: 36
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Gerrit-Reviewer: Daniel Campello <campello(a)chromium.org>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Jack Rosenthal <jrosenth(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Nicola Corna <nicola(a)corna.info>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Reviewer: Sam McNally <sammc(a)google.com>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Nicola Corna <nicola(a)corna.info>
Gerrit-Attention: Jack Rosenthal <jrosenth(a)chromium.org>
Gerrit-Attention: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Attention: Daniel Campello <campello(a)chromium.org>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Attention: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Gerrit-Comment-Date: Tue, 27 Apr 2021 13:21:38 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Nico Huber has submitted this change. ( https://review.coreboot.org/c/flashrom/+/52499 )
Change subject: hwaccess.h: Split hwaccess.h and extract hwaccess_x86_io.h out of it
......................................................................
hwaccess.h: Split hwaccess.h and extract hwaccess_x86_io.h out of it
The change makes it possible to mock functions from hwaccess_x86_io.h
in tests by replacing this header with a different one when built
for a test environment. The rest of hwaccess.h is fine and works
for the test environment.
BUG=b:181803212
TEST=make clean && make CONFIG_EVERYTHING=yes VERSION=none
Build flashrom before and after this patch, flashrom binary
is the same (diff flashrom_before flashrom_after shows no diffs)
Change-Id: Idd04c7b36b24e9da339348a015df4f43a03744f7
Signed-off-by: Anastasia Klimchuk <aklm(a)chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/52499
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Nico Huber <nico.h(a)gmx.de>
---
M hwaccess.h
A hwaccess_x86_io.h
2 files changed, 157 insertions(+), 136 deletions(-)
Approvals:
build bot (Jenkins): Verified
Nico Huber: Looks good to me, approved
diff --git a/hwaccess.h b/hwaccess.h
index 5602c15..5097ac9 100644
--- a/hwaccess.h
+++ b/hwaccess.h
@@ -112,142 +112,7 @@
#if NEED_RAW_ACCESS == 1
#if IS_X86
-/* sys/io.h provides iopl(2) and x86 I/O port access functions (inb, outb etc).
- * It is included in glibc (thus available also on debian/kFreeBSD) but also in other libcs that mimic glibc,
- * e.g. musl and uclibc. Because we cannot detect the libc or existence of the header or of the instructions
- * themselves safely in here we use some heuristic below:
- * On Android we don't have the header file and no way for I/O port access at all. However, sys/glibc-syscalls.h
- * refers to an iopl implementation and we therefore include at least that one for now. On non-Android we assume
- * that a Linux system's libc has a suitable sys/io.h or (on non-Linux) we depend on glibc to offer it. */
-#if defined(__ANDROID__)
-#include <sys/glibc-syscalls.h>
-#elif defined(__linux__) || defined(__GLIBC__)
-#include <sys/io.h>
-#endif
-
-#define __FLASHROM_HAVE_OUTB__ 1
-
-/* for iopl and outb under Solaris */
-#if defined (__sun)
-#include <sys/sysi86.h>
-#include <sys/psw.h>
-#include <asm/sunddi.h>
-#endif
-
-/* Clarification about OUTB/OUTW/OUTL argument order:
- * OUT[BWL](val, port)
- */
-
-#if defined(__FreeBSD__) || defined(__DragonFly__)
- /* Note that Debian/kFreeBSD (FreeBSD kernel with glibc) has conflicting
- * out[bwl] definitions in machine/cpufunc.h and sys/io.h at least in some
- * versions. Use machine/cpufunc.h only for plain FreeBSD/DragonFlyBSD.
- */
- #include <sys/types.h>
- #include <machine/cpufunc.h>
- #define OUTB(x, y) do { u_int outb_tmp = (y); outb(outb_tmp, (x)); } while (0)
- #define OUTW(x, y) do { u_int outw_tmp = (y); outw(outw_tmp, (x)); } while (0)
- #define OUTL(x, y) do { u_int outl_tmp = (y); outl(outl_tmp, (x)); } while (0)
- #define INB(x) __extension__ ({ u_int inb_tmp = (x); inb(inb_tmp); })
- #define INW(x) __extension__ ({ u_int inw_tmp = (x); inw(inw_tmp); })
- #define INL(x) __extension__ ({ u_int inl_tmp = (x); inl(inl_tmp); })
-#else
-
-#if defined (__sun)
- /* Note different order for outb */
- #define OUTB(x,y) outb(y, x)
- #define OUTW(x,y) outw(y, x)
- #define OUTL(x,y) outl(y, x)
- #define INB inb
- #define INW inw
- #define INL inl
-#else
-
-#ifdef __DJGPP__
-
-#include <pc.h>
-
- #define OUTB(x,y) outportb(y, x)
- #define OUTW(x,y) outportw(y, x)
- #define OUTL(x,y) outportl(y, x)
-
- #define INB inportb
- #define INW inportw
- #define INL inportl
-
-#else
-
-#if defined(__MACH__) && defined(__APPLE__)
- /* Header is part of the DirectHW library. */
- #include <DirectHW/DirectHW.h>
-#endif
-
- /* This is the usual glibc interface. */
- #define OUTB outb
- #define OUTW outw
- #define OUTL outl
- #define INB inb
- #define INW inw
- #define INL inl
-#endif
-#endif
-#endif
-
-#if defined(__NetBSD__) || defined (__OpenBSD__)
- #if defined(__i386__) || defined(__x86_64__)
- #include <sys/types.h>
- #include <machine/sysarch.h>
- #if defined(__NetBSD__)
- #if defined(__i386__)
- #define iopl i386_iopl
- #elif defined(__x86_64__)
- #define iopl x86_64_iopl
- #endif
- #elif defined (__OpenBSD__)
- #if defined(__i386__)
- #define iopl i386_iopl
- #elif defined(__amd64__)
- #define iopl amd64_iopl
- #endif
- #endif
-
-static inline void outb(uint8_t value, uint16_t port)
-{
- __asm__ volatile ("outb %b0,%w1": :"a" (value), "Nd" (port));
-}
-
-static inline uint8_t inb(uint16_t port)
-{
- uint8_t value;
- __asm__ volatile ("inb %w1,%0":"=a" (value):"Nd" (port));
- return value;
-}
-
-static inline void outw(uint16_t value, uint16_t port)
-{
- __asm__ volatile ("outw %w0,%w1": :"a" (value), "Nd" (port));
-}
-
-static inline uint16_t inw(uint16_t port)
-{
- uint16_t value;
- __asm__ volatile ("inw %w1,%0":"=a" (value):"Nd" (port));
- return value;
-}
-
-static inline void outl(uint32_t value, uint16_t port)
-{
- __asm__ volatile ("outl %0,%w1": :"a" (value), "Nd" (port));
-}
-
-static inline uint32_t inl(uint16_t port)
-{
- uint32_t value;
- __asm__ volatile ("inl %1,%0":"=a" (value):"Nd" (port));
- return value;
-}
- #endif
-#endif
+#include "hwaccess_x86_io.h"
#if !(defined(__MACH__) && defined(__APPLE__)) && !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__DragonFly__) && !defined(__LIBPAYLOAD__)
typedef struct { uint32_t hi, lo; } msr_t;
diff --git a/hwaccess_x86_io.h b/hwaccess_x86_io.h
new file mode 100644
index 0000000..63692b8
--- /dev/null
+++ b/hwaccess_x86_io.h
@@ -0,0 +1,156 @@
+/*
+ * This file is part of the flashrom project.
+ *
+ * Copyright (C) 2009 Carl-Daniel Hailfinger
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __HWACCESS_X86_IO_H__
+#define __HWACCESS_X86_IO_H__ 1
+
+/* sys/io.h provides iopl(2) and x86 I/O port access functions (inb, outb etc).
+ * It is included in glibc (thus available also on debian/kFreeBSD) but also in other libcs that mimic glibc,
+ * e.g. musl and uclibc. Because we cannot detect the libc or existence of the header or of the instructions
+ * themselves safely in here we use some heuristic below:
+ * On Android we don't have the header file and no way for I/O port access at all. However, sys/glibc-syscalls.h
+ * refers to an iopl implementation and we therefore include at least that one for now. On non-Android we assume
+ * that a Linux system's libc has a suitable sys/io.h or (on non-Linux) we depend on glibc to offer it. */
+#if defined(__ANDROID__)
+#include <sys/glibc-syscalls.h>
+#elif defined(__linux__) || defined(__GLIBC__)
+#include <sys/io.h>
+#endif
+
+#define __FLASHROM_HAVE_OUTB__ 1
+
+/* for iopl and outb under Solaris */
+#if defined (__sun)
+#include <sys/sysi86.h>
+#include <sys/psw.h>
+#include <asm/sunddi.h>
+#endif
+
+/* Clarification about OUTB/OUTW/OUTL argument order:
+ * OUT[BWL](val, port)
+ */
+
+#if defined(__FreeBSD__) || defined(__DragonFly__)
+ /* Note that Debian/kFreeBSD (FreeBSD kernel with glibc) has conflicting
+ * out[bwl] definitions in machine/cpufunc.h and sys/io.h at least in some
+ * versions. Use machine/cpufunc.h only for plain FreeBSD/DragonFlyBSD.
+ */
+ #include <sys/types.h>
+ #include <machine/cpufunc.h>
+ #define OUTB(x, y) do { u_int outb_tmp = (y); outb(outb_tmp, (x)); } while (0)
+ #define OUTW(x, y) do { u_int outw_tmp = (y); outw(outw_tmp, (x)); } while (0)
+ #define OUTL(x, y) do { u_int outl_tmp = (y); outl(outl_tmp, (x)); } while (0)
+ #define INB(x) __extension__ ({ u_int inb_tmp = (x); inb(inb_tmp); })
+ #define INW(x) __extension__ ({ u_int inw_tmp = (x); inw(inw_tmp); })
+ #define INL(x) __extension__ ({ u_int inl_tmp = (x); inl(inl_tmp); })
+#else
+
+#if defined (__sun)
+ /* Note different order for outb */
+ #define OUTB(x,y) outb(y, x)
+ #define OUTW(x,y) outw(y, x)
+ #define OUTL(x,y) outl(y, x)
+ #define INB inb
+ #define INW inw
+ #define INL inl
+#else
+
+#ifdef __DJGPP__
+
+#include <pc.h>
+
+ #define OUTB(x,y) outportb(y, x)
+ #define OUTW(x,y) outportw(y, x)
+ #define OUTL(x,y) outportl(y, x)
+
+ #define INB inportb
+ #define INW inportw
+ #define INL inportl
+
+#else
+
+#if defined(__MACH__) && defined(__APPLE__)
+ /* Header is part of the DirectHW library. */
+ #include <DirectHW/DirectHW.h>
+#endif
+
+ /* This is the usual glibc interface. */
+ #define OUTB outb
+ #define OUTW outw
+ #define OUTL outl
+ #define INB inb
+ #define INW inw
+ #define INL inl
+#endif
+#endif
+#endif
+
+#if defined(__NetBSD__) || defined (__OpenBSD__)
+ #if defined(__i386__) || defined(__x86_64__)
+ #include <sys/types.h>
+ #include <machine/sysarch.h>
+ #if defined(__NetBSD__)
+ #if defined(__i386__)
+ #define iopl i386_iopl
+ #elif defined(__x86_64__)
+ #define iopl x86_64_iopl
+ #endif
+ #elif defined (__OpenBSD__)
+ #if defined(__i386__)
+ #define iopl i386_iopl
+ #elif defined(__amd64__)
+ #define iopl amd64_iopl
+ #endif
+ #endif
+
+static inline void outb(uint8_t value, uint16_t port)
+{
+ __asm__ volatile ("outb %b0,%w1": :"a" (value), "Nd" (port));
+}
+
+static inline uint8_t inb(uint16_t port)
+{
+ uint8_t value;
+ __asm__ volatile ("inb %w1,%0":"=a" (value):"Nd" (port));
+ return value;
+}
+
+static inline void outw(uint16_t value, uint16_t port)
+{
+ __asm__ volatile ("outw %w0,%w1": :"a" (value), "Nd" (port));
+}
+
+static inline uint16_t inw(uint16_t port)
+{
+ uint16_t value;
+ __asm__ volatile ("inw %w1,%0":"=a" (value):"Nd" (port));
+ return value;
+}
+
+static inline void outl(uint32_t value, uint16_t port)
+{
+ __asm__ volatile ("outl %0,%w1": :"a" (value), "Nd" (port));
+}
+
+static inline uint32_t inl(uint16_t port)
+{
+ uint32_t value;
+ __asm__ volatile ("inl %1,%0":"=a" (value):"Nd" (port));
+ return value;
+}
+ #endif
+#endif
+
+#endif /* __HWACCESS_X86_IO_H__ */
--
To view, visit https://review.coreboot.org/c/flashrom/+/52499
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Idd04c7b36b24e9da339348a015df4f43a03744f7
Gerrit-Change-Number: 52499
Gerrit-PatchSet: 7
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-MessageType: merged
Nico Huber has submitted this change. ( https://review.coreboot.org/c/flashrom/+/52497 )
Change subject: tests: Add unit test to run init/shutdown for dummyflasher.c
......................................................................
tests: Add unit test to run init/shutdown for dummyflasher.c
Introduce test to exercise that init and shutdown of drivers
correctly manage the drivers life-time state. We constrain
ourselves to dummyflasher in particular here as it does not need
any mocking.
BUG=b:181803212
TEST=builds and ninja test
Change-Id: I3c0ef73397f00c1db7aabb5f9f00cb43525af29c
Signed-off-by: Anastasia Klimchuk <aklm(a)chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/52497
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Nico Huber <nico.h(a)gmx.de>
---
A tests/init_shutdown.c
M tests/meson.build
M tests/tests.c
M tests/tests.h
4 files changed, 46 insertions(+), 0 deletions(-)
Approvals:
build bot (Jenkins): Verified
Nico Huber: Looks good to me, approved
diff --git a/tests/init_shutdown.c b/tests/init_shutdown.c
new file mode 100644
index 0000000..5226860
--- /dev/null
+++ b/tests/init_shutdown.c
@@ -0,0 +1,37 @@
+/*
+ * This file is part of the flashrom project.
+ *
+ * Copyright 2021 Google LLC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <include/test.h>
+#include <string.h>
+
+#include "programmer.h"
+
+static void run_lifecycle(void **state, enum programmer prog, const char *param)
+{
+ (void) state; /* unused */
+
+ printf("Testing programmer_init for programmer=%u ...\n", prog);
+ assert_int_equal(0, programmer_init(prog, strdup(param)));
+ printf("... programmer_init for programmer=%u successful\n", prog);
+
+ printf("Testing programmer_shutdown for programmer=%u ...\n", prog);
+ assert_int_equal(0, programmer_shutdown());
+ printf("... programmer_shutdown for programmer=%u successful\n", prog);
+}
+
+void dummy_init_and_shutdown_test_success(void **state)
+{
+ run_lifecycle(state, PROGRAMMER_DUMMY, "bus=parallel+lpc+fwh+spi");
+}
diff --git a/tests/meson.build b/tests/meson.build
index f0cb76d..815ea76 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -18,6 +18,7 @@
'helpers.c',
'flashrom.c',
'spi25.c',
+ 'init_shutdown.c',
]
mocks = [
diff --git a/tests/tests.c b/tests/tests.c
index 5be4216..1dc819e 100644
--- a/tests/tests.c
+++ b/tests/tests.c
@@ -68,5 +68,10 @@
};
ret |= cmocka_run_group_tests_name("spi25.c tests", spi25_tests, NULL, NULL);
+ const struct CMUnitTest init_shutdown_tests[] = {
+ cmocka_unit_test(dummy_init_and_shutdown_test_success),
+ };
+ ret |= cmocka_run_group_tests_name("init_shutdown.c tests", init_shutdown_tests, NULL, NULL);
+
return ret;
}
diff --git a/tests/tests.h b/tests/tests.h
index cb905fd..32fed0a 100644
--- a/tests/tests.h
+++ b/tests/tests.h
@@ -40,4 +40,7 @@
void probe_spi_at25f_test_success(void **state);
void probe_spi_st95_test_success(void **state); /* spi95.c */
+/* init_shutdown.c */
+void dummy_init_and_shutdown_test_success(void **state);
+
#endif /* TESTS_H */
--
To view, visit https://review.coreboot.org/c/flashrom/+/52497
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I3c0ef73397f00c1db7aabb5f9f00cb43525af29c
Gerrit-Change-Number: 52497
Gerrit-PatchSet: 7
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-MessageType: merged