mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-02 22:43:17 +02:00
tests: Mock the mode_t variant of open
open has a second form with a mode_t argument. When mocking without this argument a caller trying to O_CREAT would have their mode_t argument discarded and a random stack variable would be used instead. BUG=b:187647884 BRANCH=None TEST=meson test Change-Id: I8c134e6d36a248d0f51985e389085a9e585fb83d Signed-off-by: Evan Benn <evanbenn@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/69263 Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:

committed by
Anastasia Klimchuk

parent
35243fdd7d
commit
67a393b88a
@ -28,9 +28,9 @@ struct pci_dev *__wrap_pcidev_init(const struct programmer_cfg *cfg, void *devs,
|
||||
uintptr_t __wrap_pcidev_readbar(void *dev, int bar);
|
||||
void __wrap_sio_write(uint16_t port, uint8_t reg, uint8_t data);
|
||||
uint8_t __wrap_sio_read(uint16_t port, uint8_t reg);
|
||||
int __wrap_open(const char *pathname, int flags);
|
||||
int __wrap_open64(const char *pathname, int flags);
|
||||
int __wrap___open64_2(const char *pathname, int flags);
|
||||
int __wrap_open(const char *pathname, int flags, ...);
|
||||
int __wrap_open64(const char *pathname, int flags, ...);
|
||||
int __wrap___open64_2(const char *pathname, int flags, ...);
|
||||
int __wrap_ioctl(int fd, unsigned long int request, ...);
|
||||
int __wrap_write(int fd, const void *buf, size_t sz);
|
||||
int __wrap_read(int fd, void *buf, size_t sz);
|
||||
|
Reference in New Issue
Block a user