Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tpm2-software/tpm2-tss
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 89eaf2396f92e1b3d70016580d2cb9a2ad82c47a
Choose a base ref
..
head repository: tpm2-software/tpm2-tss
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2d1e858f3f06a255ab6ee41a6d1f116547fa71e9
Choose a head ref
Showing with 4 additions and 3 deletions.
  1. +4 −3 test/unit/tcti-spidev.c
7 changes: 4 additions & 3 deletions test/unit/tcti-spidev.c
Original file line number Diff line number Diff line change
@@ -84,10 +84,14 @@ int __wrap_gettimeofday (struct timeval *tv,
return 0;
}

int __real_open(const char *path, int flags);

#define FD_NO 5
int __wrap_open(const char *path, int flags)
{
assert_ptr_not_equal(path, NULL);
if (!!strncmp(path, "/dev/spidev", sizeof("/dev/spidev") - 1))
return __real_open(path, flags);
assert_int_equal(flags, O_RDWR);
return FD_NO;
}
@@ -165,9 +169,6 @@ int __wrap_ioctl(int fd, unsigned long request, struct spi_ioc_transfer *tr)
}

done:

//TODO: Check tr->cs_change in [ 1, 1, 0 ]
//TODO: Check tr->tx_buff, set tr->tx_buff, Check len in [ 0, X, 0 ]
return 0;
}