2018-12-19 06:03:41

by William Breathitt Gray

[permalink] [raw]
Subject: [PATCH v6 0/8] Introduce the for_each_set_clump8 macro

Changes in v6:
- Fix typo in for_each_set_clump8 macro definition ('offset' should be
'start')
- Fix data type mismatch for format specifier of warning print
statements in __check_eq_clump8
- Fix typo in symbol suffix for definition of __check_eq_clump8
- Fix typo in parameter passed to expect_eq_clump8 (missing '&' for
clump argument)

While adding GPIO get_multiple/set_multiple callback support for various
drivers, I noticed a pattern of looping manifesting that would be useful
standardized as a macro.

This patchset introduces the for_each_set_clump8 macro and utilizes it
in several GPIO drivers. The for_each_set_clump macro8 facilitates a
for-loop syntax that iterates over a memory region entire groups of set
bits at a time.

For example, suppose you would like to iterate over a 32-bit integer 8
bits at a time, skipping over 8-bit groups with no set bit, where
XXXXXXXX represents the current 8-bit group:

Example: 10111110 00000000 11111111 00110011
First loop: 10111110 00000000 11111111 XXXXXXXX
Second loop: 10111110 00000000 XXXXXXXX 00110011
Third loop: XXXXXXXX 00000000 11111111 00110011

Each iteration of the loop returns the next 8-bit group that has at
least one set bit.

The for_each_set_clump8 macro has four parameters:

* start: set to the bit offset of the current clump
* clump: set to the current clump value
* bits: bitmap to search within
* size: bitmap size in number of bits

In this version of the patchset, the for_each_set_clump macro has been
reimplemented and simplified based on the suggestions provided by Rasmus
Villemoes and Andy Shevchenko in the version 4 submission.

In particular, the function of the for_each_set_clump macro has been
restricted to handle only 8-bit clumps; the drivers that use the
for_each_set_clump macro only handle 8-bit ports so a generic
for_each_set_clump implementation is not necessary. Thus, a solution for
odd-sized clumps (e.g. 3-bit, 7-bit, etc.) mismatching word boundaries
can be postponed until a driver appears that actually requires a generic
for_each_set_clump implementation.

In addition, the bitmap_get_value8 and bitmap_set_value8 functions are
introduced to get and set 8-bit values respectively. Their use is based
on the behavior suggested in the patchset version 4 review. Similarly,
the implementation of the find_next_clump function has been simplified
in order for the function to match the syntax and use of the
find_next_bit function.

William Breathitt Gray (8):
bitops: Introduce the for_each_set_clump8 macro
lib/test_bitmap.c: Add for_each_set_clump8 test cases
gpio: 104-dio-48e: Utilize for_each_set_clump8 macro
gpio: 104-idi-48: Utilize for_each_set_clump8 macro
gpio: gpio-mm: Utilize for_each_set_clump8 macro
gpio: ws16c48: Utilize for_each_set_clump8 macro
gpio: pci-idio-16: Utilize for_each_set_clump8 macro
gpio: pcie-idio-24: Utilize for_each_set_clump8 macro

drivers/gpio/gpio-104-dio-48e.c | 71 ++++++-------------
drivers/gpio/gpio-104-idi-48.c | 36 ++--------
drivers/gpio/gpio-gpio-mm.c | 71 ++++++-------------
drivers/gpio/gpio-pci-idio-16.c | 73 +++++++-------------
drivers/gpio/gpio-pcie-idio-24.c | 109 +++++++++++-------------------
drivers/gpio/gpio-ws16c48.c | 71 ++++++-------------
include/asm-generic/bitops/find.h | 14 ++++
include/linux/bitops.h | 5 ++
lib/find_bit.c | 63 +++++++++++++++++
lib/test_bitmap.c | 65 ++++++++++++++++++
10 files changed, 279 insertions(+), 299 deletions(-)

--
2.20.1



2018-12-19 06:03:14

by William Breathitt Gray

[permalink] [raw]
Subject: [PATCH v6 1/8] bitops: Introduce the for_each_set_clump8 macro

This macro iterates for each 8-bit group of bits (clump) with set bits,
within a bitmap memory region. For each iteration, "start" is set to the
bit offset of the found clump, while the respective clump value is
stored to the location pointed by "clump". Additionally, the
bitmap_get_value8 and bitmap_set_value8 functions are introduced to
respectively get and set an 8-bit value in a bitmap memory region.

Suggested-by: Andy Shevchenko <[email protected]>
Suggested-by: Rasmus Villemoes <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Andrew Morton <[email protected]>
Signed-off-by: William Breathitt Gray <[email protected]>
---
include/asm-generic/bitops/find.h | 14 +++++++
include/linux/bitops.h | 5 +++
lib/find_bit.c | 63 +++++++++++++++++++++++++++++++
3 files changed, 82 insertions(+)

diff --git a/include/asm-generic/bitops/find.h b/include/asm-generic/bitops/find.h
index 8a1ee10014de..457b93e6f5c9 100644
--- a/include/asm-generic/bitops/find.h
+++ b/include/asm-generic/bitops/find.h
@@ -80,4 +80,18 @@ extern unsigned long find_first_zero_bit(const unsigned long *addr,

#endif /* CONFIG_GENERIC_FIND_FIRST_BIT */

+unsigned int bitmap_get_value8(const unsigned long *const bitmap,
+ const unsigned int start);
+
+void bitmap_set_value8(unsigned long *const bitmap,
+ const unsigned long *const value,
+ const unsigned int start);
+
+unsigned int find_next_clump8(unsigned long *const clump,
+ const unsigned long *const addr,
+ unsigned int offset, const unsigned int size);
+
+#define find_first_clump8(clump, bits, size) \
+ find_next_clump8((clump), (bits), 0, (size))
+
#endif /*_ASM_GENERIC_BITOPS_FIND_H_ */
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index 705f7c442691..61c10f20079e 100644
--- a/include/linux/bitops.h
+++ b/include/linux/bitops.h
@@ -40,6 +40,11 @@ extern unsigned long __sw_hweight64(__u64 w);
(bit) < (size); \
(bit) = find_next_zero_bit((addr), (size), (bit) + 1))

+#define for_each_set_clump8(start, clump, bits, size) \
+ for ((start) = find_first_clump8(&(clump), (bits), (size)); \
+ (start) < (size); \
+ (start) = find_next_clump8(&(clump), (bits), (start) + 8, (size)))
+
static inline int get_bitmask_order(unsigned int count)
{
int order;
diff --git a/lib/find_bit.c b/lib/find_bit.c
index ee3df93ba69a..2e56d2b907bc 100644
--- a/lib/find_bit.c
+++ b/lib/find_bit.c
@@ -218,3 +218,66 @@ EXPORT_SYMBOL(find_next_bit_le);
#endif

#endif /* __BIG_ENDIAN */
+
+/**
+ * bitmap_get_value8 - get an 8-bit value within a memory region
+ * @bitmap: address to the bitmap memory region
+ * @start: bit offset of the 8-bit value
+ *
+ * Returns the 8-bit value located at the @start bit offset within the @bitmap
+ * memory region.
+ */
+unsigned int bitmap_get_value8(const unsigned long *const bitmap,
+ const unsigned int start)
+{
+ const size_t index = BIT_WORD(start);
+ const unsigned int offset = start % BITS_PER_LONG;
+
+ return (bitmap[index] >> offset) & 0xFF;
+}
+EXPORT_SYMBOL(bitmap_get_value8);
+
+/**
+ * bitmap_set_value8 - set an 8-bit value within a memory region
+ * @bitmap: address to the bitmap memory region
+ * @value: the 8-bit value
+ * @start: bit offset of the 8-bit value
+ */
+void bitmap_set_value8(unsigned long *const bitmap,
+ const unsigned long *const value,
+ const unsigned int start)
+{
+ const size_t index = BIT_WORD(start);
+ const unsigned int offset = start % BITS_PER_LONG;
+ const unsigned long mask = GENMASK(7, offset);
+
+ bitmap[index] &= ~mask;
+ bitmap[index] |= (*value << offset) & mask;
+}
+EXPORT_SYMBOL(bitmap_set_value8);
+
+/**
+ * find_next_clump8 - find next 8-bit clump with set bits in a memory region
+ * @clump: location to store copy of found clump
+ * @addr: address to base the search on
+ * @offset: bit offset at which to start searching
+ * @size: bitmap size in number of bits
+ *
+ * Returns the bit offset for the next set clump; the found clump value is
+ * copied to the location pointed by @clump. If no bits are set, returns @size.
+ */
+unsigned int find_next_clump8(unsigned long *const clump,
+ const unsigned long *const addr,
+ unsigned int offset, const unsigned int size)
+{
+ for (; offset < size; offset += 8) {
+ *clump = bitmap_get_value8(addr, offset);
+ if (!*clump)
+ continue;
+
+ return offset;
+ }
+
+ return size;
+}
+EXPORT_SYMBOL(find_next_clump8);
--
2.20.1


2018-12-19 06:04:02

by William Breathitt Gray

[permalink] [raw]
Subject: [PATCH v6 6/8] gpio: ws16c48: Utilize for_each_set_clump8 macro

Replace verbose implementation in get_multiple/set_multiple callbacks
with for_each_set_clump8 macro to simplify code and improve clarity.

Signed-off-by: William Breathitt Gray <[email protected]>
---
drivers/gpio/gpio-ws16c48.c | 71 ++++++++++---------------------------
1 file changed, 19 insertions(+), 52 deletions(-)

diff --git a/drivers/gpio/gpio-ws16c48.c b/drivers/gpio/gpio-ws16c48.c
index 5cf3697bfb15..b4c544d5da18 100644
--- a/drivers/gpio/gpio-ws16c48.c
+++ b/drivers/gpio/gpio-ws16c48.c
@@ -134,42 +134,19 @@ static int ws16c48_gpio_get_multiple(struct gpio_chip *chip,
unsigned long *mask, unsigned long *bits)
{
struct ws16c48_gpio *const ws16c48gpio = gpiochip_get_data(chip);
- const unsigned int gpio_reg_size = 8;
- size_t i;
- const size_t num_ports = chip->ngpio / gpio_reg_size;
- unsigned int bits_offset;
- size_t word_index;
- unsigned int word_offset;
- unsigned long word_mask;
- const unsigned long port_mask = GENMASK(gpio_reg_size - 1, 0);
+ unsigned int offset;
+ unsigned long gpio_mask;
+ unsigned int port_addr;
unsigned long port_state;

/* clear bits array to a clean slate */
bitmap_zero(bits, chip->ngpio);

- /* get bits are evaluated a gpio port register at a time */
- for (i = 0; i < num_ports; i++) {
- /* gpio offset in bits array */
- bits_offset = i * gpio_reg_size;
+ for_each_set_clump8(offset, gpio_mask, mask, chip->ngpio) {
+ port_addr = ws16c48gpio->base + offset / 8;
+ port_state = inb(port_addr) & gpio_mask;

- /* word index for bits array */
- word_index = BIT_WORD(bits_offset);
-
- /* gpio offset within current word of bits array */
- word_offset = bits_offset % BITS_PER_LONG;
-
- /* mask of get bits for current gpio within current word */
- word_mask = mask[word_index] & (port_mask << word_offset);
- if (!word_mask) {
- /* no get bits in this port so skip to next one */
- continue;
- }
-
- /* read bits from current gpio port */
- port_state = inb(ws16c48gpio->base + i);
-
- /* store acquired bits at respective bits array offset */
- bits[word_index] |= (port_state << word_offset) & word_mask;
+ bitmap_set_value8(bits, &port_state, offset);
}

return 0;
@@ -203,39 +180,29 @@ static void ws16c48_gpio_set_multiple(struct gpio_chip *chip,
unsigned long *mask, unsigned long *bits)
{
struct ws16c48_gpio *const ws16c48gpio = gpiochip_get_data(chip);
- unsigned int i;
- const unsigned int gpio_reg_size = 8;
- unsigned int port;
- unsigned int iomask;
+ unsigned int offset;
+ unsigned long gpio_mask;
+ size_t index;
+ unsigned int port_addr;
unsigned int bitmask;
unsigned long flags;

- /* set bits are evaluated a gpio register size at a time */
- for (i = 0; i < chip->ngpio; i += gpio_reg_size) {
- /* no more set bits in this mask word; skip to the next word */
- if (!mask[BIT_WORD(i)]) {
- i = (BIT_WORD(i) + 1) * BITS_PER_LONG - gpio_reg_size;
- continue;
- }
-
- port = i / gpio_reg_size;
+ for_each_set_clump8(offset, gpio_mask, mask, chip->ngpio) {
+ index = offset / 8;
+ port_addr = ws16c48gpio->base + index;

/* mask out GPIO configured for input */
- iomask = mask[BIT_WORD(i)] & ~ws16c48gpio->io_state[port];
- bitmask = iomask & bits[BIT_WORD(i)];
+ gpio_mask &= ~ws16c48gpio->io_state[index];
+ bitmask = bitmap_get_value8(bits, offset) & gpio_mask;

raw_spin_lock_irqsave(&ws16c48gpio->lock, flags);

/* update output state data and set device gpio register */
- ws16c48gpio->out_state[port] &= ~iomask;
- ws16c48gpio->out_state[port] |= bitmask;
- outb(ws16c48gpio->out_state[port], ws16c48gpio->base + port);
+ ws16c48gpio->out_state[index] &= ~gpio_mask;
+ ws16c48gpio->out_state[index] |= bitmask;
+ outb(ws16c48gpio->out_state[index], port_addr);

raw_spin_unlock_irqrestore(&ws16c48gpio->lock, flags);
-
- /* prepare for next gpio register set */
- mask[BIT_WORD(i)] >>= gpio_reg_size;
- bits[BIT_WORD(i)] >>= gpio_reg_size;
}
}

--
2.20.1


2018-12-19 06:04:07

by William Breathitt Gray

[permalink] [raw]
Subject: [PATCH v6 7/8] gpio: pci-idio-16: Utilize for_each_set_clump8 macro

Replace verbose implementation in get_multiple/set_multiple callbacks
with for_each_set_clump8 macro to simplify code and improve clarity.

Signed-off-by: William Breathitt Gray <[email protected]>
---
drivers/gpio/gpio-pci-idio-16.c | 73 ++++++++++++---------------------
1 file changed, 26 insertions(+), 47 deletions(-)

diff --git a/drivers/gpio/gpio-pci-idio-16.c b/drivers/gpio/gpio-pci-idio-16.c
index 6b7349783223..4eb89f8b5f9b 100644
--- a/drivers/gpio/gpio-pci-idio-16.c
+++ b/drivers/gpio/gpio-pci-idio-16.c
@@ -108,45 +108,23 @@ static int idio_16_gpio_get_multiple(struct gpio_chip *chip,
unsigned long *mask, unsigned long *bits)
{
struct idio_16_gpio *const idio16gpio = gpiochip_get_data(chip);
- size_t i;
- const unsigned int gpio_reg_size = 8;
- unsigned int bits_offset;
- size_t word_index;
- unsigned int word_offset;
- unsigned long word_mask;
- const unsigned long port_mask = GENMASK(gpio_reg_size - 1, 0);
- unsigned long port_state;
+ unsigned int offset;
+ unsigned long gpio_mask;
void __iomem *ports[] = {
&idio16gpio->reg->out0_7, &idio16gpio->reg->out8_15,
&idio16gpio->reg->in0_7, &idio16gpio->reg->in8_15,
};
+ void __iomem *port_addr;
+ unsigned long port_state;

/* clear bits array to a clean slate */
bitmap_zero(bits, chip->ngpio);

- /* get bits are evaluated a gpio port register at a time */
- for (i = 0; i < ARRAY_SIZE(ports); i++) {
- /* gpio offset in bits array */
- bits_offset = i * gpio_reg_size;
-
- /* word index for bits array */
- word_index = BIT_WORD(bits_offset);
-
- /* gpio offset within current word of bits array */
- word_offset = bits_offset % BITS_PER_LONG;
+ for_each_set_clump8(offset, gpio_mask, mask, ARRAY_SIZE(ports) * 8) {
+ port_addr = ports[offset / 8];
+ port_state = ioread8(port_addr) & gpio_mask;

- /* mask of get bits for current gpio within current word */
- word_mask = mask[word_index] & (port_mask << word_offset);
- if (!word_mask) {
- /* no get bits in this port so skip to next one */
- continue;
- }
-
- /* read bits from current gpio port */
- port_state = ioread8(ports[i]);
-
- /* store acquired bits at respective bits array offset */
- bits[word_index] |= (port_state << word_offset) & word_mask;
+ bitmap_set_value8(bits, &port_state, offset);
}

return 0;
@@ -186,30 +164,31 @@ static void idio_16_gpio_set_multiple(struct gpio_chip *chip,
unsigned long *mask, unsigned long *bits)
{
struct idio_16_gpio *const idio16gpio = gpiochip_get_data(chip);
+ unsigned int offset;
+ unsigned long gpio_mask;
+ void __iomem *ports[] = {
+ &idio16gpio->reg->out0_7, &idio16gpio->reg->out8_15,
+ };
+ size_t index;
+ void __iomem *port_addr;
+ unsigned int bitmask;
unsigned long flags;
unsigned int out_state;

- raw_spin_lock_irqsave(&idio16gpio->lock, flags);
+ for_each_set_clump8(offset, gpio_mask, mask, ARRAY_SIZE(ports) * 8) {
+ index = offset / 8;
+ port_addr = ports[index];

- /* process output lines 0-7 */
- if (*mask & 0xFF) {
- out_state = ioread8(&idio16gpio->reg->out0_7) & ~*mask;
- out_state |= *mask & *bits;
- iowrite8(out_state, &idio16gpio->reg->out0_7);
- }
+ bitmask = bitmap_get_value8(bits, offset) & gpio_mask;
+
+ raw_spin_lock_irqsave(&idio16gpio->lock, flags);

- /* shift to next output line word */
- *mask >>= 8;
+ out_state = ioread8(port_addr) & ~gpio_mask;
+ out_state |= bitmask;
+ iowrite8(out_state, port_addr);

- /* process output lines 8-15 */
- if (*mask & 0xFF) {
- *bits >>= 8;
- out_state = ioread8(&idio16gpio->reg->out8_15) & ~*mask;
- out_state |= *mask & *bits;
- iowrite8(out_state, &idio16gpio->reg->out8_15);
+ raw_spin_unlock_irqrestore(&idio16gpio->lock, flags);
}
-
- raw_spin_unlock_irqrestore(&idio16gpio->lock, flags);
}

static void idio_16_irq_ack(struct irq_data *data)
--
2.20.1


2018-12-19 06:04:12

by William Breathitt Gray

[permalink] [raw]
Subject: [PATCH v6 8/8] gpio: pcie-idio-24: Utilize for_each_set_clump8 macro

Replace verbose implementation in get_multiple/set_multiple callbacks
with for_each_set_clump8 macro to simplify code and improve clarity.

Signed-off-by: William Breathitt Gray <[email protected]>
---
drivers/gpio/gpio-pcie-idio-24.c | 109 ++++++++++++-------------------
1 file changed, 40 insertions(+), 69 deletions(-)

diff --git a/drivers/gpio/gpio-pcie-idio-24.c b/drivers/gpio/gpio-pcie-idio-24.c
index 52f1647a46fd..b1686b052633 100644
--- a/drivers/gpio/gpio-pcie-idio-24.c
+++ b/drivers/gpio/gpio-pcie-idio-24.c
@@ -198,52 +198,34 @@ static int idio_24_gpio_get_multiple(struct gpio_chip *chip,
unsigned long *mask, unsigned long *bits)
{
struct idio_24_gpio *const idio24gpio = gpiochip_get_data(chip);
- size_t i;
- const unsigned int gpio_reg_size = 8;
- unsigned int bits_offset;
- size_t word_index;
- unsigned int word_offset;
- unsigned long word_mask;
- const unsigned long port_mask = GENMASK(gpio_reg_size - 1, 0);
- unsigned long port_state;
+ unsigned int offset;
+ unsigned long gpio_mask;
void __iomem *ports[] = {
&idio24gpio->reg->out0_7, &idio24gpio->reg->out8_15,
&idio24gpio->reg->out16_23, &idio24gpio->reg->in0_7,
&idio24gpio->reg->in8_15, &idio24gpio->reg->in16_23,
};
+ size_t index;
+ unsigned long port_state;
const unsigned long out_mode_mask = BIT(1);

/* clear bits array to a clean slate */
bitmap_zero(bits, chip->ngpio);

- /* get bits are evaluated a gpio port register at a time */
- for (i = 0; i < ARRAY_SIZE(ports) + 1; i++) {
- /* gpio offset in bits array */
- bits_offset = i * gpio_reg_size;
-
- /* word index for bits array */
- word_index = BIT_WORD(bits_offset);
-
- /* gpio offset within current word of bits array */
- word_offset = bits_offset % BITS_PER_LONG;
-
- /* mask of get bits for current gpio within current word */
- word_mask = mask[word_index] & (port_mask << word_offset);
- if (!word_mask) {
- /* no get bits in this port so skip to next one */
- continue;
- }
+ for_each_set_clump8(offset, gpio_mask, mask, ARRAY_SIZE(ports) * 8) {
+ index = offset / 8;

/* read bits from current gpio port (port 6 is TTL GPIO) */
- if (i < 6)
- port_state = ioread8(ports[i]);
+ if (index < 6)
+ port_state = ioread8(ports[index]);
else if (ioread8(&idio24gpio->reg->ctl) & out_mode_mask)
port_state = ioread8(&idio24gpio->reg->ttl_out0_7);
else
port_state = ioread8(&idio24gpio->reg->ttl_in0_7);

- /* store acquired bits at respective bits array offset */
- bits[word_index] |= (port_state << word_offset) & word_mask;
+ port_state &= gpio_mask;
+
+ bitmap_set_value8(bits, &port_state, offset);
}

return 0;
@@ -294,59 +276,48 @@ static void idio_24_gpio_set_multiple(struct gpio_chip *chip,
unsigned long *mask, unsigned long *bits)
{
struct idio_24_gpio *const idio24gpio = gpiochip_get_data(chip);
- size_t i;
- unsigned long bits_offset;
+ unsigned int offset;
unsigned long gpio_mask;
- const unsigned int gpio_reg_size = 8;
- const unsigned long port_mask = GENMASK(gpio_reg_size, 0);
- unsigned long flags;
- unsigned int out_state;
void __iomem *ports[] = {
&idio24gpio->reg->out0_7, &idio24gpio->reg->out8_15,
&idio24gpio->reg->out16_23
};
+ size_t index;
+ unsigned int bitmask;
+ unsigned long flags;
+ unsigned int out_state;
const unsigned long out_mode_mask = BIT(1);
- const unsigned int ttl_offset = 48;
- const size_t ttl_i = BIT_WORD(ttl_offset);
- const unsigned int word_offset = ttl_offset % BITS_PER_LONG;
- const unsigned long ttl_mask = (mask[ttl_i] >> word_offset) & port_mask;
- const unsigned long ttl_bits = (bits[ttl_i] >> word_offset) & ttl_mask;
-
- /* set bits are processed a gpio port register at a time */
- for (i = 0; i < ARRAY_SIZE(ports); i++) {
- /* gpio offset in bits array */
- bits_offset = i * gpio_reg_size;
-
- /* check if any set bits for current port */
- gpio_mask = (*mask >> bits_offset) & port_mask;
- if (!gpio_mask) {
- /* no set bits for this port so move on to next port */
- continue;
- }

- raw_spin_lock_irqsave(&idio24gpio->lock, flags);
+ for_each_set_clump8(offset, gpio_mask, mask, ARRAY_SIZE(ports) * 8) {
+ index = offset / 8;

- /* process output lines */
- out_state = ioread8(ports[i]) & ~gpio_mask;
- out_state |= (*bits >> bits_offset) & gpio_mask;
- iowrite8(out_state, ports[i]);
+ bitmask = bitmap_get_value8(bits, offset) & gpio_mask;

- raw_spin_unlock_irqrestore(&idio24gpio->lock, flags);
- }
+ raw_spin_lock_irqsave(&idio24gpio->lock, flags);

- /* check if setting TTL lines and if they are in output mode */
- if (!ttl_mask || !(ioread8(&idio24gpio->reg->ctl) & out_mode_mask))
- return;
+ /* read bits from current gpio port (port 6 is TTL GPIO) */
+ if (index < 6) {
+ out_state = ioread8(ports[index]);
+ } else if (ioread8(&idio24gpio->reg->ctl) & out_mode_mask) {
+ out_state = ioread8(&idio24gpio->reg->ttl_out0_7);
+ } else {
+ /* skip TTL GPIO if set for input */
+ raw_spin_unlock_irqrestore(&idio24gpio->lock, flags);
+ continue;
+ }

- /* handle TTL output */
- raw_spin_lock_irqsave(&idio24gpio->lock, flags);
+ /* set requested bit states */
+ out_state &= ~gpio_mask;
+ out_state |= bitmask;

- /* process output lines */
- out_state = ioread8(&idio24gpio->reg->ttl_out0_7) & ~ttl_mask;
- out_state |= ttl_bits;
- iowrite8(out_state, &idio24gpio->reg->ttl_out0_7);
+ /* write bits for current gpio port (port 6 is TTL GPIO) */
+ if (index < 6)
+ iowrite8(out_state, ports[index]);
+ else
+ iowrite8(out_state, &idio24gpio->reg->ttl_out0_7);

- raw_spin_unlock_irqrestore(&idio24gpio->lock, flags);
+ raw_spin_unlock_irqrestore(&idio24gpio->lock, flags);
+ }
}

static void idio_24_irq_ack(struct irq_data *data)
--
2.20.1


2018-12-19 07:37:27

by William Breathitt Gray

[permalink] [raw]
Subject: [PATCH v6 2/8] lib/test_bitmap.c: Add for_each_set_clump8 test cases

The introduction of the for_each_set_clump8 macro warrants test cases to
verify the implementation. This patch adds test case checks for whether
an out-of-bounds clump index is returned, a zero clump is returned, or
the returned clump value differs from the expected clump value.

Cc: Andy Shevchenko <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Rasmus Villemoes <[email protected]>
Signed-off-by: William Breathitt Gray <[email protected]>
---
lib/test_bitmap.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)

diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c
index 6cd7d0740005..66ddb3fb98cb 100644
--- a/lib/test_bitmap.c
+++ b/lib/test_bitmap.c
@@ -88,6 +88,36 @@ __check_eq_u32_array(const char *srcfile, unsigned int line,
return true;
}

+static bool __init __check_eq_clump8(const char *srcfile, unsigned int line,
+ const unsigned int offset,
+ const unsigned int size,
+ const unsigned char *const clump_exp,
+ const unsigned long *const clump)
+{
+ unsigned long exp;
+
+ if (offset >= size) {
+ pr_warn("[%s:%u] bit offset for clump out-of-bounds: expected less than %u, got %u\n",
+ srcfile, line, size, offset);
+ return false;
+ }
+
+ exp = clump_exp[offset / 8];
+ if (!exp) {
+ pr_warn("[%s:%u] bit offset for zero clump: expected nonzero clump, got bit offset %u with clump value 0",
+ srcfile, line, offset);
+ return false;
+ }
+
+ if (*clump != exp) {
+ pr_warn("[%s:%u] expected clump value of 0x%lX, got clump value of 0x%lX",
+ srcfile, line, exp, *clump);
+ return false;
+ }
+
+ return true;
+}
+
#define __expect_eq(suffix, ...) \
({ \
int result = 0; \
@@ -104,6 +134,7 @@ __check_eq_u32_array(const char *srcfile, unsigned int line,
#define expect_eq_bitmap(...) __expect_eq(bitmap, ##__VA_ARGS__)
#define expect_eq_pbl(...) __expect_eq(pbl, ##__VA_ARGS__)
#define expect_eq_u32_array(...) __expect_eq(u32_array, ##__VA_ARGS__)
+#define expect_eq_clump8(...) __expect_eq(clump8, ##__VA_ARGS__)

static void __init test_zero_clear(void)
{
@@ -361,6 +392,39 @@ static void noinline __init test_mem_optimisations(void)
}
}

+static const unsigned char clump_exp[] __initconst = {
+ 0x01, /* 1 bit set */
+ 0x02, /* non-edge 1 bit set */
+ 0x00, /* zero bits set */
+ 0x28, /* 3 bits set across 4-bit boundary */
+ 0x28, /* Repeated clump */
+ 0x0F, /* 4 bits set */
+ 0xFF, /* all bits set */
+ 0x05, /* non-adjacent 2 bits set */
+};
+
+static void __init test_for_each_set_clump8(void)
+{
+#define CLUMP_EXP_NUMBITS 64
+ DECLARE_BITMAP(bits, CLUMP_EXP_NUMBITS);
+ unsigned int start;
+ unsigned long clump;
+
+ /* set bitmap to test case */
+ bitmap_zero(bits, CLUMP_EXP_NUMBITS);
+ bitmap_set(bits, 0, 1); /* 0x01 */
+ bitmap_set(bits, 8, 1); /* 0x02 */
+ bitmap_set(bits, 27, 3); /* 0x28 */
+ bitmap_set(bits, 35, 3); /* 0x28 */
+ bitmap_set(bits, 40, 4); /* 0x0F */
+ bitmap_set(bits, 48, 8); /* 0xFF */
+ bitmap_set(bits, 56, 1); /* 0x05 - part 1 */
+ bitmap_set(bits, 58, 1); /* 0x05 - part 2 */
+
+ for_each_set_clump8(start, clump, bits, CLUMP_EXP_NUMBITS)
+ expect_eq_clump8(start, CLUMP_EXP_NUMBITS, clump_exp, &clump);
+}
+
static int __init test_bitmap_init(void)
{
test_zero_clear();
@@ -369,6 +433,7 @@ static int __init test_bitmap_init(void)
test_bitmap_arr32();
test_bitmap_parselist();
test_mem_optimisations();
+ test_for_each_set_clump8();

if (failed_tests == 0)
pr_info("all %u tests passed\n", total_tests);
--
2.20.1


2018-12-19 07:38:13

by William Breathitt Gray

[permalink] [raw]
Subject: [PATCH v6 3/8] gpio: 104-dio-48e: Utilize for_each_set_clump8 macro

Replace verbose implementation in get_multiple/set_multiple callbacks
with for_each_set_clump8 macro to simplify code and improve clarity.

Signed-off-by: William Breathitt Gray <[email protected]>
---
drivers/gpio/gpio-104-dio-48e.c | 71 ++++++++++-----------------------
1 file changed, 20 insertions(+), 51 deletions(-)

diff --git a/drivers/gpio/gpio-104-dio-48e.c b/drivers/gpio/gpio-104-dio-48e.c
index 92c8f944bf64..b68c39f8aa23 100644
--- a/drivers/gpio/gpio-104-dio-48e.c
+++ b/drivers/gpio/gpio-104-dio-48e.c
@@ -183,46 +183,25 @@ static int dio48e_gpio_get(struct gpio_chip *chip, unsigned offset)
return !!(port_state & mask);
}

+static const size_t ports[] = { 0, 1, 2, 4, 5, 6 };
+
static int dio48e_gpio_get_multiple(struct gpio_chip *chip, unsigned long *mask,
unsigned long *bits)
{
struct dio48e_gpio *const dio48egpio = gpiochip_get_data(chip);
- size_t i;
- static const size_t ports[] = { 0, 1, 2, 4, 5, 6 };
- const unsigned int gpio_reg_size = 8;
- unsigned int bits_offset;
- size_t word_index;
- unsigned int word_offset;
- unsigned long word_mask;
- const unsigned long port_mask = GENMASK(gpio_reg_size - 1, 0);
+ unsigned int offset;
+ unsigned long gpio_mask;
+ unsigned int port_addr;
unsigned long port_state;

/* clear bits array to a clean slate */
bitmap_zero(bits, chip->ngpio);

- /* get bits are evaluated a gpio port register at a time */
- for (i = 0; i < ARRAY_SIZE(ports); i++) {
- /* gpio offset in bits array */
- bits_offset = i * gpio_reg_size;
-
- /* word index for bits array */
- word_index = BIT_WORD(bits_offset);
-
- /* gpio offset within current word of bits array */
- word_offset = bits_offset % BITS_PER_LONG;
-
- /* mask of get bits for current gpio within current word */
- word_mask = mask[word_index] & (port_mask << word_offset);
- if (!word_mask) {
- /* no get bits in this port so skip to next one */
- continue;
- }
-
- /* read bits from current gpio port */
- port_state = inb(dio48egpio->base + ports[i]);
+ for_each_set_clump8(offset, gpio_mask, mask, ARRAY_SIZE(ports) * 8) {
+ port_addr = dio48egpio->base + ports[offset / 8];
+ port_state = inb(port_addr) & gpio_mask;

- /* store acquired bits at respective bits array offset */
- bits[word_index] |= (port_state << word_offset) & word_mask;
+ bitmap_set_value8(bits, &port_state, offset);
}

return 0;
@@ -252,37 +231,27 @@ static void dio48e_gpio_set_multiple(struct gpio_chip *chip,
unsigned long *mask, unsigned long *bits)
{
struct dio48e_gpio *const dio48egpio = gpiochip_get_data(chip);
- unsigned int i;
- const unsigned int gpio_reg_size = 8;
- unsigned int port;
- unsigned int out_port;
+ unsigned int offset;
+ unsigned long gpio_mask;
+ size_t index;
+ unsigned int port_addr;
unsigned int bitmask;
unsigned long flags;

- /* set bits are evaluated a gpio register size at a time */
- for (i = 0; i < chip->ngpio; i += gpio_reg_size) {
- /* no more set bits in this mask word; skip to the next word */
- if (!mask[BIT_WORD(i)]) {
- i = (BIT_WORD(i) + 1) * BITS_PER_LONG - gpio_reg_size;
- continue;
- }
+ for_each_set_clump8(offset, gpio_mask, mask, ARRAY_SIZE(ports) * 8) {
+ index = offset / 8;
+ port_addr = dio48egpio->base + ports[index];

- port = i / gpio_reg_size;
- out_port = (port > 2) ? port + 1 : port;
- bitmask = mask[BIT_WORD(i)] & bits[BIT_WORD(i)];
+ bitmask = bitmap_get_value8(bits, offset) & gpio_mask;

raw_spin_lock_irqsave(&dio48egpio->lock, flags);

/* update output state data and set device gpio register */
- dio48egpio->out_state[port] &= ~mask[BIT_WORD(i)];
- dio48egpio->out_state[port] |= bitmask;
- outb(dio48egpio->out_state[port], dio48egpio->base + out_port);
+ dio48egpio->out_state[index] &= ~gpio_mask;
+ dio48egpio->out_state[index] |= bitmask;
+ outb(dio48egpio->out_state[index], port_addr);

raw_spin_unlock_irqrestore(&dio48egpio->lock, flags);
-
- /* prepare for next gpio register set */
- mask[BIT_WORD(i)] >>= gpio_reg_size;
- bits[BIT_WORD(i)] >>= gpio_reg_size;
}
}

--
2.20.1


2018-12-19 07:38:49

by William Breathitt Gray

[permalink] [raw]
Subject: [PATCH v6 5/8] gpio: gpio-mm: Utilize for_each_set_clump8 macro

Replace verbose implementation in get_multiple/set_multiple callbacks
with for_each_set_clump8 macro to simplify code and improve clarity.

Signed-off-by: William Breathitt Gray <[email protected]>
---
drivers/gpio/gpio-gpio-mm.c | 71 +++++++++++--------------------------
1 file changed, 20 insertions(+), 51 deletions(-)

diff --git a/drivers/gpio/gpio-gpio-mm.c b/drivers/gpio/gpio-gpio-mm.c
index 8c150fd68d9d..5647abe72376 100644
--- a/drivers/gpio/gpio-gpio-mm.c
+++ b/drivers/gpio/gpio-gpio-mm.c
@@ -172,46 +172,25 @@ static int gpiomm_gpio_get(struct gpio_chip *chip, unsigned int offset)
return !!(port_state & mask);
}

+static const size_t ports[] = { 0, 1, 2, 4, 5, 6 };
+
static int gpiomm_gpio_get_multiple(struct gpio_chip *chip, unsigned long *mask,
unsigned long *bits)
{
struct gpiomm_gpio *const gpiommgpio = gpiochip_get_data(chip);
- size_t i;
- static const size_t ports[] = { 0, 1, 2, 4, 5, 6 };
- const unsigned int gpio_reg_size = 8;
- unsigned int bits_offset;
- size_t word_index;
- unsigned int word_offset;
- unsigned long word_mask;
- const unsigned long port_mask = GENMASK(gpio_reg_size - 1, 0);
+ unsigned int offset;
+ unsigned long gpio_mask;
+ unsigned int port_addr;
unsigned long port_state;

/* clear bits array to a clean slate */
bitmap_zero(bits, chip->ngpio);

- /* get bits are evaluated a gpio port register at a time */
- for (i = 0; i < ARRAY_SIZE(ports); i++) {
- /* gpio offset in bits array */
- bits_offset = i * gpio_reg_size;
-
- /* word index for bits array */
- word_index = BIT_WORD(bits_offset);
-
- /* gpio offset within current word of bits array */
- word_offset = bits_offset % BITS_PER_LONG;
-
- /* mask of get bits for current gpio within current word */
- word_mask = mask[word_index] & (port_mask << word_offset);
- if (!word_mask) {
- /* no get bits in this port so skip to next one */
- continue;
- }
-
- /* read bits from current gpio port */
- port_state = inb(gpiommgpio->base + ports[i]);
+ for_each_set_clump8(offset, gpio_mask, mask, ARRAY_SIZE(ports) * 8) {
+ port_addr = gpiommgpio->base + ports[offset / 8];
+ port_state = inb(port_addr) & gpio_mask;

- /* store acquired bits at respective bits array offset */
- bits[word_index] |= (port_state << word_offset) & word_mask;
+ bitmap_set_value8(bits, &port_state, offset);
}

return 0;
@@ -242,37 +221,27 @@ static void gpiomm_gpio_set_multiple(struct gpio_chip *chip,
unsigned long *mask, unsigned long *bits)
{
struct gpiomm_gpio *const gpiommgpio = gpiochip_get_data(chip);
- unsigned int i;
- const unsigned int gpio_reg_size = 8;
- unsigned int port;
- unsigned int out_port;
+ unsigned int offset;
+ unsigned long gpio_mask;
+ size_t index;
+ unsigned int port_addr;
unsigned int bitmask;
unsigned long flags;

- /* set bits are evaluated a gpio register size at a time */
- for (i = 0; i < chip->ngpio; i += gpio_reg_size) {
- /* no more set bits in this mask word; skip to the next word */
- if (!mask[BIT_WORD(i)]) {
- i = (BIT_WORD(i) + 1) * BITS_PER_LONG - gpio_reg_size;
- continue;
- }
+ for_each_set_clump8(offset, gpio_mask, mask, ARRAY_SIZE(ports) * 8) {
+ index = offset / 8;
+ port_addr = gpiommgpio->base + ports[index];

- port = i / gpio_reg_size;
- out_port = (port > 2) ? port + 1 : port;
- bitmask = mask[BIT_WORD(i)] & bits[BIT_WORD(i)];
+ bitmask = bitmap_get_value8(bits, offset) & gpio_mask;

spin_lock_irqsave(&gpiommgpio->lock, flags);

/* update output state data and set device gpio register */
- gpiommgpio->out_state[port] &= ~mask[BIT_WORD(i)];
- gpiommgpio->out_state[port] |= bitmask;
- outb(gpiommgpio->out_state[port], gpiommgpio->base + out_port);
+ gpiommgpio->out_state[index] &= ~gpio_mask;
+ gpiommgpio->out_state[index] |= bitmask;
+ outb(gpiommgpio->out_state[index], port_addr);

spin_unlock_irqrestore(&gpiommgpio->lock, flags);
-
- /* prepare for next gpio register set */
- mask[BIT_WORD(i)] >>= gpio_reg_size;
- bits[BIT_WORD(i)] >>= gpio_reg_size;
}
}

--
2.20.1


2018-12-19 07:44:33

by William Breathitt Gray

[permalink] [raw]
Subject: [PATCH v6 4/8] gpio: 104-idi-48: Utilize for_each_set_clump8 macro

Replace verbose implementation in get_multiple/set_multiple callbacks
with for_each_set_clump8 macro to simplify code and improve clarity.

Signed-off-by: William Breathitt Gray <[email protected]>
---
drivers/gpio/gpio-104-idi-48.c | 36 +++++++---------------------------
1 file changed, 7 insertions(+), 29 deletions(-)

diff --git a/drivers/gpio/gpio-104-idi-48.c b/drivers/gpio/gpio-104-idi-48.c
index 88dc6f2449f6..fdf1b8b64cc4 100644
--- a/drivers/gpio/gpio-104-idi-48.c
+++ b/drivers/gpio/gpio-104-idi-48.c
@@ -93,42 +93,20 @@ static int idi_48_gpio_get_multiple(struct gpio_chip *chip, unsigned long *mask,
unsigned long *bits)
{
struct idi_48_gpio *const idi48gpio = gpiochip_get_data(chip);
- size_t i;
+ unsigned int offset;
+ unsigned long gpio_mask;
static const size_t ports[] = { 0, 1, 2, 4, 5, 6 };
- const unsigned int gpio_reg_size = 8;
- unsigned int bits_offset;
- size_t word_index;
- unsigned int word_offset;
- unsigned long word_mask;
- const unsigned long port_mask = GENMASK(gpio_reg_size - 1, 0);
+ unsigned int port_addr;
unsigned long port_state;

/* clear bits array to a clean slate */
bitmap_zero(bits, chip->ngpio);

- /* get bits are evaluated a gpio port register at a time */
- for (i = 0; i < ARRAY_SIZE(ports); i++) {
- /* gpio offset in bits array */
- bits_offset = i * gpio_reg_size;
+ for_each_set_clump8(offset, gpio_mask, mask, ARRAY_SIZE(ports) * 8) {
+ port_addr = idi48gpio->base + ports[offset / 8];
+ port_state = inb(port_addr) & gpio_mask;

- /* word index for bits array */
- word_index = BIT_WORD(bits_offset);
-
- /* gpio offset within current word of bits array */
- word_offset = bits_offset % BITS_PER_LONG;
-
- /* mask of get bits for current gpio within current word */
- word_mask = mask[word_index] & (port_mask << word_offset);
- if (!word_mask) {
- /* no get bits in this port so skip to next one */
- continue;
- }
-
- /* read bits from current gpio port */
- port_state = inb(idi48gpio->base + ports[i]);
-
- /* store acquired bits at respective bits array offset */
- bits[word_index] |= (port_state << word_offset) & word_mask;
+ bitmap_set_value8(bits, &port_state, offset);
}

return 0;
--
2.20.1


2019-01-02 09:19:37

by Chen, Rong A

[permalink] [raw]
Subject: [LKP] [lib/test_bitmap.c] 467e3fea0c: kernel_selftests.lib.bitmap.sh.fail

FYI, we noticed the following commit (built with gcc-7):

commit: 467e3fea0c6a920471f816b755166d1b907db91c ("[PATCH v6 2/8] lib/test_bitmap.c: Add for_each_set_clump8 test cases")
url: https://github.com/0day-ci/linux/commits/William-Breathitt-Gray/Introduce-the-for_each_set_clump8-macro/20181221-201922
base: https://git.kernel.org/cgit/linux/kernel/git/linusw/linux-gpio.git for-next

in testcase: kernel_selftests
with following parameters:

group: kselftests-01

test-description: The kernel contains a set of "self tests" under the tools/testing/selftests/ directory. These are intended to be small unit tests to exercise individual code paths in the kernel.
test-url: https://www.kernel.org/doc/Documentation/kselftest.txt


on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 4G

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):




KERNEL SELFTESTS: linux_headers_dir is /usr/src/linux-headers-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c
2018-12-30 22:36:56 ln -sf /usr/bin/clang-7 /usr/bin/clang
2018-12-30 22:36:56 ln -sf /usr/bin/llc-7 /usr/bin/llc

2018-12-30 22:36:56 chown lkp capabilities -R
2018-12-30 22:36:56 su lkp -c make run_tests -C capabilities 2>&1
make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/capabilities'
gcc -O2 -g -std=gnu99 -Wall test_execve.c -lcap-ng -lrt -ldl -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/capabilities/test_execve
gcc -O2 -g -std=gnu99 -Wall validate_cap.c -lcap-ng -lrt -ldl -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/capabilities/validate_cap
TAP version 13
selftests: capabilities: test_execve
========================================
# validate_cap:: Capabilities after execve were correct
# validate_cap:: Capabilities after execve were correct
# validate_cap:: Capabilities after execve were correct
# [RUN] +++ Tests with uid == 0 +++
# [NOTE] Using a user namespace for tests
# [RUN] Root => ep
ok 1 Passed
# Check cap_ambient manipulation rules
ok 2 PR_CAP_AMBIENT_RAISE failed on non-inheritable cap
ok 3 PR_CAP_AMBIENT_RAISE failed on non-permitted cap
ok 4 PR_CAP_AMBIENT_RAISE worked
ok 5 Basic manipulation appears to work
# [RUN] Root +i => eip
ok 6 Passed
# [RUN] UID 0 +ia => eipa
ok 7 Passed
ok 8 # skip SUID/SGID tests (needs privilege)
Pass 7 Fail 0 Xfail 0 Xpass 0 Skip 1 Error 0
1..8
# validate_cap:: Capabilities after execve were correct
# validate_cap:: Capabilities after execve were correct
# validate_cap:: Capabilities after execve were correct
# ==================================================
# [RUN] +++ Tests with uid != 0 +++
# [NOTE] Using a user namespace for tests
# [RUN] Non-root => no caps
ok 1 Passed
# Check cap_ambient manipulation rules
ok 2 PR_CAP_AMBIENT_RAISE failed on non-inheritable cap
ok 3 PR_CAP_AMBIENT_RAISE failed on non-permitted cap
ok 4 PR_CAP_AMBIENT_RAISE worked
ok 5 Basic manipulation appears to work
# [RUN] Non-root +i => i
ok 6 Passed
# [RUN] UID 1 +ia => eipa
ok 7 Passed
ok 8 # skip SUID/SGID tests (needs privilege)
Pass 7 Fail 0 Xfail 0 Xpass 0 Skip 1 Error 0
1..8
# ==================================================
ok 1..1 selftests: capabilities: test_execve [PASS]
make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/capabilities'
ignored_by_lkp cgroup test

2018-12-30 22:36:56 make run_tests -C cpu-hotplug
make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/cpu-hotplug'
TAP version 13
selftests: cpu-hotplug: cpu-on-off-test.sh
========================================
pid 1180's current affinity mask: 3
pid 1180's new affinity mask: 1
CPU online/offline summary:
Cpus in online state: 0-1
Cpus in offline state: 0
Limited scope test: one hotplug cpu
(leaves cpu in the original state):
online to offline to online: cpu 1
ok 1..1 selftests: cpu-hotplug: cpu-on-off-test.sh [PASS]
make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/cpu-hotplug'

2018-12-30 22:36:56 make run_tests -C cpufreq
make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/cpufreq'
TAP version 13
selftests: cpufreq: main.sh
========================================
pid 1244's current affinity mask: 3
pid 1244's new affinity mask: 1
not ok 1..1 selftests: cpufreq: main.sh [FAIL]
make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/cpufreq'
ignored_by_lkp efivarfs test: /sys/firmware/efi dir does not exist

2018-12-30 22:36:56 make run_tests -C exec
make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/exec'
gcc -Wall execveat.c -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/exec/execveat
cd /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/exec && ln -s -f execveat execveat.symlink
cp /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/exec/execveat /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/exec/execveat.denatured
chmod -x /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/exec/execveat.denatured
echo '#!/bin/sh' > /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/exec/script
echo 'exit $*' >> /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/exec/script
chmod +x /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/exec/script
mkdir -p /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/exec/subdir
TAP version 13
selftests: exec: execveat
========================================
/bin/sh: 0: Can't open /dev/fd/7/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/exec/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
Check success of execveat(4, '../execveat', 0)... [OK]
Check success of execveat(6, 'execveat', 0)... [OK]
Check success of execveat(8, 'execveat', 0)... [OK]
Check success of execveat(-100, '/usr/src/perf_selfte...ftests/exec/execveat', 0)... [OK]
Check success of execveat(99, '/usr/src/perf_selfte...ftests/exec/execveat', 0)... [OK]
Check success of execveat(10, '', 4096)... [OK]
Check success of execveat(19, '', 4096)... [OK]
Check success of execveat(11, '', 4096)... [OK]
Check success of execveat(16, '', 4096)... [OK]
Check success of execveat(16, '', 4096)... [OK]
Check success of execveat(17, '', 4096)... [OK]
Check failure of execveat(10, '', 0) with ENOENT... [OK]
Check failure of execveat(10, '(null)', 4096) with EFAULT... [OK]
Check success of execveat(6, 'execveat.symlink', 0)... [OK]
Check success of execveat(8, 'execveat.symlink', 0)... [OK]
Check success of execveat(-100, '/usr/src/perf_selfte...xec/execveat.symlink', 0)... [OK]
Check success of execveat(12, '', 4096)... [OK]
Check success of execveat(12, '', 4352)... [OK]
Check failure of execveat(6, 'execveat.symlink', 256) with ELOOP... [OK]
Check failure of execveat(8, 'execveat.symlink', 256) with ELOOP... [OK]
Check failure of execveat(-100, '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/exec/execveat.symlink', 256) with ELOOP... [OK]
Check success of execveat(4, '../script', 0)... [OK]
Check success of execveat(6, 'script', 0)... [OK]
Check success of execveat(8, 'script', 0)... [OK]
Check success of execveat(-100, '/usr/src/perf_selfte...elftests/exec/script', 0)... [OK]
Check success of execveat(15, '', 4096)... [OK]
Check success of execveat(15, '', 4352)... [OK]
Check failure of execveat(20, '', 4096) with ENOENT... [OK]
Check failure of execveat(9, 'script', 0) with ENOENT... [OK]
Check success of execveat(18, '', 4096)... [OK]
Check success of execveat(18, '', 4096)... [OK]
Check success of execveat(5, '../script', 0)... [OK]
Check success of execveat(5, 'script', 0)... [OK]
Check success of execveat(5, '../script', 0)... [OK]
Check failure of execveat(5, 'script', 0) with ENOENT... [OK]
Check failure of execveat(6, 'execveat', 65535) with EINVAL... [OK]
Check failure of execveat(6, 'no-such-file', 0) with ENOENT... [OK]
Check failure of execveat(8, 'no-such-file', 0) with ENOENT... [OK]
Check failure of execveat(-100, 'no-such-file', 0) with ENOENT... [OK]
Check failure of execveat(6, '', 4096) with EACCES... [OK]
Check failure of execveat(6, 'Makefile', 0) with EACCES... [OK]
Check failure of execveat(13, '', 4096) with EACCES... [OK]
Check failure of execveat(14, '', 4096) with EACCES... [OK]
Check failure of execveat(99, '', 4096) with EBADF... [OK]
Check failure of execveat(99, 'execveat', 0) with EBADF... [OK]
Check failure of execveat(10, 'execveat', 0) with ENOTDIR... [OK]
Invoke copy of 'execveat' via filename of length 4094:
Check success of execveat(21, '', 4096)... [OK]
Check success of execveat(7, 'usr/src/perf_selftes...yyyyyyyyyyyyyyyyyyyy', 0)... [OK]
Invoke copy of 'script' via filename of length 4094:
Check success of execveat(22, '', 4096)... [OK]
Check success of execveat(7, 'usr/src/perf_selftes...yyyyyyyyyyyyyyyyyyyy', 0)... [OK]
ok 1..1 selftests: exec: execveat [PASS]
make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/exec'
ignored_by_lkp filesystems test
2018-12-30 22:36:57 mv /lib/udev/rules.d/50-firmware.rules .
2018-12-30 22:36:57 /etc/init.d/udev restart
Restarting udev (via systemctl): udev.service.

2018-12-30 22:36:57 make run_tests -C firmware
make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/firmware'
TAP version 13
selftests: firmware: fw_run_tests.sh
========================================
-----------------------------------------------------
Running kernel configuration test 1 -- rare
Emulates:
CONFIG_FW_LOADER=y
CONFIG_FW_LOADER_USER_HELPER=n
CONFIG_FW_LOADER_USER_HELPER_FALLBACK=n
./fw_filesystem.sh: filesystem loading works
./fw_filesystem.sh: async filesystem loading works

Testing with the file present...
Batched request_firmware() try #1: OK
Batched request_firmware() try #2: OK
Batched request_firmware() try #3: OK
Batched request_firmware() try #4: OK
Batched request_firmware() try #5: OK
Batched request_firmware_direct() try #1: OK
Batched request_firmware_direct() try #2: OK
Batched request_firmware_direct() try #3: OK
Batched request_firmware_direct() try #4: OK
Batched request_firmware_direct() try #5: OK
Batched request_firmware_nowait(uevent=true) try #1: OK
Batched request_firmware_nowait(uevent=true) try #2: OK
Batched request_firmware_nowait(uevent=true) try #3: OK
Batched request_firmware_nowait(uevent=true) try #4: OK
Batched request_firmware_nowait(uevent=true) try #5: OK
Batched request_firmware_nowait(uevent=false) try #1: OK
Batched request_firmware_nowait(uevent=false) try #2: OK
Batched request_firmware_nowait(uevent=false) try #3: OK
Batched request_firmware_nowait(uevent=false) try #4: OK
Batched request_firmware_nowait(uevent=false) try #5: OK

Testing with the file missing...
Batched request_firmware() nofile try #1: OK
Batched request_firmware() nofile try #2: OK
Batched request_firmware() nofile try #3: OK
Batched request_firmware() nofile try #4: OK
Batched request_firmware() nofile try #5: OK
Batched request_firmware_direct() nofile try #1: OK
Batched request_firmware_direct() nofile try #2: OK
Batched request_firmware_direct() nofile try #3: OK
Batched request_firmware_direct() nofile try #4: OK
Batched request_firmware_direct() nofile try #5: OK
Batched request_firmware_nowait(uevent=true) nofile try #1: OK
Batched request_firmware_nowait(uevent=true) nofile try #2: OK
Batched request_firmware_nowait(uevent=true) nofile try #3: OK
Batched request_firmware_nowait(uevent=true) nofile try #4: OK
Batched request_firmware_nowait(uevent=true) nofile try #5: OK
Batched request_firmware_nowait(uevent=false) nofile try #1: OK
Batched request_firmware_nowait(uevent=false) nofile try #2: OK
Batched request_firmware_nowait(uevent=false) nofile try #3: OK
Batched request_firmware_nowait(uevent=false) nofile try #4: OK
Batched request_firmware_nowait(uevent=false) nofile try #5: OK
usermode helper disabled so ignoring test
not ok 1..1 selftests: firmware: fw_run_tests.sh [SKIP]
make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/firmware'
2018-12-30 22:37:38 mv 50-firmware.rules /lib/udev/rules.d/50-firmware.rules

2018-12-30 22:37:38 make run_tests -C ftrace
make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/ftrace'
TAP version 13
selftests: ftrace: ftracetest
========================================
./ftracetest: 163: [: Illegal number:
-e === Ftrace unit tests ===
-e -n [1] Basic trace file check
-e [PASS]
-e -n [2] Basic test for tracers
-e [PASS]
-e -n [3] Basic trace clock test
-e [PASS]
-e -n [4] Basic event tracing check
-e [PASS]
-e -n [5] Change the ringbuffer size
-e [PASS]
-e -n [6] Snapshot and tracing setting
-e [PASS]
-e -n [7] trace_pipe and trace_marker
-e [PASS]
-e -n [8] event tracing - enable/disable with event level files
-e [PASS]
-e -n [9] event tracing - restricts events based on pid
-e [PASS]
-e -n [10] event tracing - enable/disable with subsystem level files
-e [PASS]
-e -n [11] event tracing - enable/disable with top level files
-e [PASS]
-e -n [12] Test trace_printk from module
-e [UNRESOLVED]
-e -n [13] ftrace - function graph filters with stack tracer
-e [PASS]
-e -n [14] ftrace - function graph filters
-e [PASS]
-e -n [15] ftrace - function glob filters
-e [PASS]
-e -n [16] ftrace - function pid filters
-e [PASS]
-e -n [17] ftrace - stacktrace filter command
-e [PASS]
-e -n [18] ftrace - function trace with cpumask
-e [PASS]
-e -n [19] ftrace - test for function event triggers
-e [PASS]
-e -n [20] ftrace - function trace on module
-e [UNRESOLVED]
-e -n [21] ftrace - function profiling
-e [PASS]
-e -n [22] ftrace - function profiler with function tracing
-e [PASS]
-e -n [23] ftrace - test reading of set_ftrace_filter
-e [PASS]
-e -n [24] ftrace - Max stack tracer
-e [PASS]
-e -n [25] ftrace - test for function traceon/off triggers
-e [PASS]
-e -n [26] Test creation and deletion of trace instances while setting an event
-e [PASS]
-e -n [27] Test creation and deletion of trace instances
-e [PASS]
-e -n [28] Kprobe dynamic event - adding and removing
-e [PASS]
-e -n [29] Kprobe dynamic event - busy event check
-e [PASS]
-e -n [30] Kprobe dynamic event with arguments
-e [PASS]
-e -n [31] Kprobe event with comm arguments
-e [PASS]
-e -n [32] Kprobe event string type argument
-e [PASS]
-e -n [33] Kprobe event symbol argument
-e [PASS]
-e -n [34] Kprobe event argument syntax
-e [PASS]
-e -n [35] Kprobes event arguments with types
-e [PASS]
-e -n [36] Kprobe event auto/manual naming
-e [PASS]
-e -n [37] Kprobe dynamic event with function tracer
-e [PASS]
-e -n [38] Kprobe dynamic event - probing module
-e [UNRESOLVED]
-e -n [39] Kretprobe dynamic event with arguments
-e [PASS]
-e -n [40] Kretprobe dynamic event with maxactive
-e [PASS]
-e -n [41] Register/unregister many kprobe events
-e [PASS]
-e -n [42] Kprobe events - probe points
-e [PASS]
-e -n [43] Kprobe dynamic event - adding and removing
-e [PASS]
-e -n [44] test for the preemptirqsoff tracer
-e [UNSUPPORTED]
-e -n [45] Test wakeup tracer
-e [PASS]
-e -n [46] Test wakeup RT tracer
-e [PASS]
-e -n [47] event trigger - test extended error support
-e [PASS]
-e -n [48] event trigger - test field variable support
-e [PASS]
-e -n [49] event trigger - test inter-event combined histogram trigger
-e [PASS]
-e -n [50] event trigger - test multiple actions on hist trigger
-e [PASS]
-e -n [51] event trigger - test inter-event histogram trigger onmatch action
-e [PASS]
-e -n [52] event trigger - test inter-event histogram trigger onmatch-onmax action
-e [PASS]
-e -n [53] event trigger - test inter-event histogram trigger onmax action
-e [PASS]
-e -n [54] event trigger - test synthetic event create remove
-e [PASS]
-e -n [55] event trigger - test synthetic_events syntax parser
-e [PASS]
-e -n [56] event trigger - test event enable/disable trigger
-e [PASS]
-e -n [57] event trigger - test trigger filter
-e [PASS]
-e -n [58] event trigger - test histogram modifiers
-e [PASS]
-e -n [59] event trigger - test histogram trigger
-e [PASS]
-e -n [60] event trigger - test multiple histogram triggers
-e [PASS]
-e -n [61] event trigger - test snapshot-trigger
-e [PASS]
-e -n [62] event trigger - test stacktrace-trigger
-e [PASS]
-e -n [63] trace_marker trigger - test histogram trigger
-e [PASS]
-e -n [64] trace_marker trigger - test snapshot trigger
-e [PASS]
-e -n [65] trace_marker trigger - test histogram with synthetic event against kernel event
-e [PASS]
-e -n [66] trace_marker trigger - test histogram with synthetic event
-e [PASS]
-e -n [67] event trigger - test traceon/off trigger
-e [PASS]
-e -n [68] (instance) Basic test for tracers
-e [PASS]
-e -n [69] (instance) Basic trace clock test
-e [PASS]
-e -n [70] (instance) Change the ringbuffer size
-e [PASS]
-e -n [71] (instance) Snapshot and tracing setting
-e [PASS]
-e -n [72] (instance) trace_pipe and trace_marker
-e [PASS]
-e -n [73] (instance) event tracing - enable/disable with event level files
-e [PASS]
-e -n [74] (instance) event tracing - restricts events based on pid
-e [PASS]
-e -n [75] (instance) event tracing - enable/disable with subsystem level files
-e [PASS]
-e -n [76] (instance) ftrace - stacktrace filter command
-e [PASS]
-e -n [77] (instance) ftrace - test for function event triggers
-e [PASS]
-e -n [78] (instance) ftrace - test for function traceon/off triggers
-e [PASS]
-e -n [79] (instance) event trigger - test event enable/disable trigger
-e [PASS]
-e -n [80] (instance) event trigger - test trigger filter
-e [PASS]
-e -n [81] (instance) event trigger - test histogram modifiers
-e [PASS]
-e -n [82] (instance) event trigger - test histogram trigger
-e [PASS]
-e -n [83] (instance) event trigger - test multiple histogram triggers
-e [PASS]
-e -n [84] (instance) trace_marker trigger - test histogram trigger
-e [PASS]
-e -n [85] (instance) trace_marker trigger - test snapshot trigger
-e [PASS]


-e
-e # of passed: 81
-e # of failed: 0
-e # of unresolved: 3
-e # of untested: 0
-e # of unsupported: 1
-e # of xfailed: 0
-e # of undefined(test bug): 0
not ok 1..1 selftests: ftrace: ftracetest [FAIL]
make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/ftrace'

2018-12-30 22:39:59 make run_tests -C futex
make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/futex'
make[1]: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/futex/functional'
gcc -g -O2 -Wall -D_GNU_SOURCE -pthread -I../include -I../../ -pthread -lrt futex_wait_timeout.c ../include/futextest.h ../include/atomic.h ../include/logging.h -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/futex/functional/futex_wait_timeout
gcc -g -O2 -Wall -D_GNU_SOURCE -pthread -I../include -I../../ -pthread -lrt futex_wait_wouldblock.c ../include/futextest.h ../include/atomic.h ../include/logging.h -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/futex/functional/futex_wait_wouldblock
gcc -g -O2 -Wall -D_GNU_SOURCE -pthread -I../include -I../../ -pthread -lrt futex_requeue_pi.c ../include/futextest.h ../include/atomic.h ../include/logging.h -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/futex/functional/futex_requeue_pi
gcc -g -O2 -Wall -D_GNU_SOURCE -pthread -I../include -I../../ -pthread -lrt futex_requeue_pi_signal_restart.c ../include/futextest.h ../include/atomic.h ../include/logging.h -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/futex/functional/futex_requeue_pi_signal_restart
gcc -g -O2 -Wall -D_GNU_SOURCE -pthread -I../include -I../../ -pthread -lrt futex_requeue_pi_mismatched_ops.c ../include/futextest.h ../include/atomic.h ../include/logging.h -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/futex/functional/futex_requeue_pi_mismatched_ops
gcc -g -O2 -Wall -D_GNU_SOURCE -pthread -I../include -I../../ -pthread -lrt futex_wait_uninitialized_heap.c ../include/futextest.h ../include/atomic.h ../include/logging.h -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/futex/functional/futex_wait_uninitialized_heap
gcc -g -O2 -Wall -D_GNU_SOURCE -pthread -I../include -I../../ -pthread -lrt futex_wait_private_mapped_file.c ../include/futextest.h ../include/atomic.h ../include/logging.h -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/futex/functional/futex_wait_private_mapped_file
make[1]: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/futex/functional'
TAP version 13
selftests: futex: run.sh
========================================
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified

# futex_requeue_pi: Test requeue functionality
# Arguments: broadcast=0 locked=0 owner=0 timeout=0ns
ok 1 futex-requeue-pi
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1
# futex_requeue_pi: Test requeue functionality
# Arguments: broadcast=1 locked=0 owner=0 timeout=0ns
ok 1 futex-requeue-pi
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1
# futex_requeue_pi: Test requeue functionality
# Arguments: broadcast=1 locked=1 owner=0 timeout=0ns
ok 1 futex-requeue-pi
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1
# futex_requeue_pi: Test requeue functionality
# Arguments: broadcast=1 locked=0 owner=1 timeout=0ns
ok 1 futex-requeue-pi
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1
# futex_requeue_pi: Test requeue functionality
# Arguments: broadcast=0 locked=1 owner=0 timeout=0ns
ok 1 futex-requeue-pi
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1
# futex_requeue_pi: Test requeue functionality
# Arguments: broadcast=0 locked=0 owner=1 timeout=0ns
ok 1 futex-requeue-pi
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1
# futex_requeue_pi: Test requeue functionality
# Arguments: broadcast=1 locked=1 owner=0 timeout=5000ns
ok 1 futex-requeue-pi
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1
# futex_requeue_pi: Test requeue functionality
# Arguments: broadcast=0 locked=1 owner=0 timeout=5000ns
ok 1 futex-requeue-pi
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1
# futex_requeue_pi: Test requeue functionality
# Arguments: broadcast=1 locked=1 owner=0 timeout=500000ns
ok 1 futex-requeue-pi
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1
# futex_requeue_pi: Test requeue functionality
# Arguments: broadcast=0 locked=1 owner=0 timeout=500000ns
ok 1 futex-requeue-pi
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1
# futex_requeue_pi: Test requeue functionality
# Arguments: broadcast=1 locked=0 owner=0 timeout=5000ns
ok 1 futex-requeue-pi
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1
# futex_requeue_pi: Test requeue functionality
# Arguments: broadcast=0 locked=0 owner=0 timeout=5000ns
ok 1 futex-requeue-pi
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1
# futex_requeue_pi: Test requeue functionality
# Arguments: broadcast=1 locked=0 owner=0 timeout=500000ns
ok 1 futex-requeue-pi
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1
# futex_requeue_pi: Test requeue functionality
# Arguments: broadcast=0 locked=0 owner=0 timeout=500000ns
ok 1 futex-requeue-pi
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1
# futex_requeue_pi: Test requeue functionality
# Arguments: broadcast=1 locked=0 owner=1 timeout=5000ns
ok 1 futex-requeue-pi
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1
# futex_requeue_pi: Test requeue functionality
# Arguments: broadcast=0 locked=1 owner=0 timeout=5000ns
ok 1 futex-requeue-pi
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1
# futex_requeue_pi: Test requeue functionality
# Arguments: broadcast=1 locked=0 owner=1 timeout=500000ns
ok 1 futex-requeue-pi
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1
# futex_requeue_pi: Test requeue functionality
# Arguments: broadcast=0 locked=1 owner=0 timeout=500000ns
ok 1 futex-requeue-pi
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1
# futex_requeue_pi: Test requeue functionality
# Arguments: broadcast=1 locked=1 owner=0 timeout=2000000000ns
ok 1 futex-requeue-pi
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1
# futex_requeue_pi: Test requeue functionality
# Arguments: broadcast=0 locked=1 owner=0 timeout=2000000000ns
ok 1 futex-requeue-pi
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1

# futex_requeue_pi_mismatched_ops: Detect mismatched requeue_pi operations
ok 1 futex-requeue-pi-mismatched-ops
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1

# futex_requeue_pi_signal_restart: Test signal handling during requeue_pi
# Arguments: <none>
ok 1 futex-requeue-pi-signal-restart
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1

# futex_wait_timeout: Block on a futex and wait for timeout
# Arguments: timeout=100000ns
ok 1 futex-wait-timeout
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1

# futex_wait_wouldblock: Test the unexpected futex value in FUTEX_WAIT
ok 1 futex-wait-wouldblock
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1

# futex_wait_uninitialized_heap: Test the uninitialized futex value in FUTEX_WAIT
ok 1 futex-wait-uninitialized-heap
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1
# futex_wait_private_mapped_file: Test the futex value of private file mappings in FUTEX_WAIT
ok 1 futex-wait-private-mapped-file
Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..1
ok 1..1 selftests: futex: run.sh [PASS]
make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/futex'

2018-12-30 22:40:14 make run_tests -C gpio
make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/gpio'
make ARCH=x86 -C ../../../.. headers_install
make[1]: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c'
UPD include/generated/uapi/linux/version.h
HOSTCC scripts/basic/fixdep
WRAP arch/x86/include/generated/uapi/asm/bpf_perf_event.h
WRAP arch/x86/include/generated/uapi/asm/poll.h
SYSTBL arch/x86/include/generated/asm/syscalls_32.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_32.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_64.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_x32.h
HOSTCC arch/x86/tools/relocs_32.o
HOSTCC arch/x86/tools/relocs_64.o
HOSTCC arch/x86/tools/relocs_common.o
HOSTLD arch/x86/tools/relocs
HOSTCC scripts/unifdef
INSTALL usr/include/asm-generic/ (37 files)
INSTALL usr/include/drm/ (26 files)
INSTALL usr/include/linux/ (501 files)
INSTALL usr/include/linux/android/ (1 file)
INSTALL usr/include/linux/byteorder/ (2 files)
INSTALL usr/include/linux/caif/ (2 files)
INSTALL usr/include/linux/can/ (6 files)
INSTALL usr/include/linux/cifs/ (1 file)
INSTALL usr/include/linux/dvb/ (8 files)
INSTALL usr/include/linux/genwqe/ (1 file)
INSTALL usr/include/linux/hdlc/ (1 file)
INSTALL usr/include/linux/hsi/ (2 files)
INSTALL usr/include/linux/iio/ (2 files)
INSTALL usr/include/linux/isdn/ (1 file)
INSTALL usr/include/linux/mmc/ (1 file)
INSTALL usr/include/linux/netfilter/ (88 files)
INSTALL usr/include/linux/netfilter/ipset/ (4 files)
INSTALL usr/include/linux/netfilter_arp/ (2 files)
INSTALL usr/include/linux/netfilter_bridge/ (17 files)
INSTALL usr/include/linux/netfilter_ipv4/ (9 files)
INSTALL usr/include/linux/netfilter_ipv6/ (13 files)
INSTALL usr/include/linux/nfsd/ (5 files)
INSTALL usr/include/linux/raid/ (2 files)
INSTALL usr/include/linux/sched/ (1 file)
INSTALL usr/include/linux/spi/ (1 file)
INSTALL usr/include/linux/sunrpc/ (1 file)
INSTALL usr/include/linux/tc_act/ (15 files)
INSTALL usr/include/linux/tc_ematch/ (5 files)
INSTALL usr/include/linux/usb/ (13 files)
INSTALL usr/include/linux/wimax/ (1 file)
INSTALL usr/include/misc/ (2 files)
INSTALL usr/include/mtd/ (5 files)
INSTALL usr/include/rdma/ (25 files)
INSTALL usr/include/rdma/hfi/ (2 files)
INSTALL usr/include/scsi/ (5 files)
INSTALL usr/include/scsi/fc/ (4 files)
INSTALL usr/include/sound/ (16 files)
INSTALL usr/include/video/ (3 files)
INSTALL usr/include/xen/ (4 files)
INSTALL usr/include/asm/ (62 files)
make[1]: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c'
make OUTPUT=/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/gpio/ -C /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/gpio
make[1]: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/gpio'
mkdir -p /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/gpio/include/linux 2>&1 || true
ln -sf /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/gpio/../../include/uapi/linux/gpio.h /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/gpio/include/linux/gpio.h
make -f /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/build/Makefile.build dir=. obj=lsgpio
make[2]: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/gpio'
CC /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/gpio/lsgpio.o
CC /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/gpio/gpio-utils.o
LD /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/gpio/lsgpio-in.o
make[2]: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/gpio'
LINK /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/gpio/lsgpio
make -f /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/build/Makefile.build dir=. obj=gpio-hammer
make[2]: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/gpio'
CC /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/gpio/gpio-hammer.o
LD /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/gpio/gpio-hammer-in.o
make[2]: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/gpio'
LINK /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/gpio/gpio-hammer
make -f /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/build/Makefile.build dir=. obj=gpio-event-mon
make[2]: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/gpio'
CC /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/gpio/gpio-event-mon.o
LD /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/gpio/gpio-event-mon-in.o
make[2]: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/gpio'
LINK /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/gpio/gpio-event-mon
make[1]: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/gpio'
gcc -O2 -g -std=gnu99 -Wall -I../../../../usr/include/ gpio-mockup-chardev.c /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/gpio/gpio-utils.o -lmount -I/usr/include/libmount -o gpio-mockup-chardev
TAP version 13
selftests: gpio: gpio-mockup.sh
========================================
1. Test dynamic allocation of gpio successful means insert gpiochip and
manipulate gpio pin successful
GPIO gpio-mockup test with ranges: <-1,32>:
-1,32
gpio<gpio-mockup> test failed
Test gpiochip gpio-mockup: GPIO gpio-mockup test with ranges: <-1,32,-1,32>:
-1,32,-1,32
gpio<gpio-mockup> test failed
Test gpiochip gpio-mockup: GPIO gpio-mockup test with ranges: <-1,32,-1,32,-1,32>:
-1,32,-1,32,-1,32
gpio<gpio-mockup> test failed
Test gpiochip gpio-mockup: 3. Error test: successful means insert gpiochip failed
3.1 Test number of gpio overflow
GPIO gpio-mockup test with ranges: <-1,32,-1,1024>:
-1,32,-1,1024
Test gpiochip gpio-mockup: Invalid test successful
GPIO test PASS
ok 1..1 selftests: gpio: gpio-mockup.sh [PASS]
make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/gpio'
ia64 test: not in Makefile
2018-12-30 22:40:42 make TARGETS=ia64
make[1]: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/ia64'
Makefile:9: warning: overriding recipe for target 'clean'
../lib.mk:137: warning: ignoring old recipe for target 'clean'
gcc aliasing-test.c -o aliasing-test
make[1]: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/ia64'

2018-12-30 22:40:43 make run_tests -C ia64
make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/ia64'
Makefile:9: warning: overriding recipe for target 'clean'
../lib.mk:137: warning: ignoring old recipe for target 'clean'
TAP version 13
selftests: ia64: aliasing-test
========================================
PASS: /dev/mem 0x0-0xa0000 is readable
PASS: /dev/mem 0xa0000-0xc0000 is mappable
PASS: /dev/mem 0xc0000-0x100000 is readable
PASS: /dev/mem 0x0-0x100000 is mappable
PASS: /sys/devices/pci0000:00/0000:00:02.0/rom read 39422 bytes
PASS: /sys/devices/pci0000:00/0000:00:03.0/rom read 231422 bytes
PASS: /proc/bus/pci/00/00.0 0x0-0xa0000 not mappable
PASS: /proc/bus/pci/00/01.0 0x0-0xa0000 not mappable
PASS: /proc/bus/pci/00/01.1 0x0-0xa0000 not mappable
PASS: /proc/bus/pci/00/01.3 0x0-0xa0000 not mappable
PASS: /proc/bus/pci/00/02.0 0x0-0xa0000 not mappable
PASS: /proc/bus/pci/00/03.0 0x0-0xa0000 not mappable
PASS: /proc/bus/pci/00/04.0 0x0-0xa0000 not mappable
PASS: /proc/bus/pci/00/05.0 0x0-0xa0000 not mappable
PASS: /proc/bus/pci/00/06.0 0x0-0xa0000 not mappable
PASS: /proc/bus/pci/00/07.0 0x0-0xa0000 not mappable
PASS: /proc/bus/pci/00/08.0 0x0-0xa0000 not mappable
PASS: /proc/bus/pci/00/09.0 0x0-0xa0000 not mappable
PASS: /proc/bus/pci/00/0a.0 0x0-0xa0000 not mappable
PASS: /proc/bus/pci/00/0b.0 0x0-0xa0000 not mappable
PASS: /proc/bus/pci/00/00.0 0xa0000-0xc0000 not mappable
PASS: /proc/bus/pci/00/01.0 0xa0000-0xc0000 not mappable
PASS: /proc/bus/pci/00/01.1 0xa0000-0xc0000 not mappable
PASS: /proc/bus/pci/00/01.3 0xa0000-0xc0000 not mappable
PASS: /proc/bus/pci/00/02.0 0xa0000-0xc0000 not mappable
PASS: /proc/bus/pci/00/03.0 0xa0000-0xc0000 not mappable
PASS: /proc/bus/pci/00/04.0 0xa0000-0xc0000 not mappable
PASS: /proc/bus/pci/00/05.0 0xa0000-0xc0000 not mappable
PASS: /proc/bus/pci/00/06.0 0xa0000-0xc0000 not mappable
PASS: /proc/bus/pci/00/07.0 0xa0000-0xc0000 not mappable
PASS: /proc/bus/pci/00/08.0 0xa0000-0xc0000 not mappable
PASS: /proc/bus/pci/00/09.0 0xa0000-0xc0000 not mappable
PASS: /proc/bus/pci/00/0a.0 0xa0000-0xc0000 not mappable
PASS: /proc/bus/pci/00/0b.0 0xa0000-0xc0000 not mappable
PASS: /proc/bus/pci/00/00.0 0xc0000-0x100000 not mappable
PASS: /proc/bus/pci/00/01.0 0xc0000-0x100000 not mappable
PASS: /proc/bus/pci/00/01.1 0xc0000-0x100000 not mappable
PASS: /proc/bus/pci/00/01.3 0xc0000-0x100000 not mappable
PASS: /proc/bus/pci/00/02.0 0xc0000-0x100000 not mappable
PASS: /proc/bus/pci/00/03.0 0xc0000-0x100000 not mappable
PASS: /proc/bus/pci/00/04.0 0xc0000-0x100000 not mappable
PASS: /proc/bus/pci/00/05.0 0xc0000-0x100000 not mappable
PASS: /proc/bus/pci/00/06.0 0xc0000-0x100000 not mappable
PASS: /proc/bus/pci/00/07.0 0xc0000-0x100000 not mappable
PASS: /proc/bus/pci/00/08.0 0xc0000-0x100000 not mappable
PASS: /proc/bus/pci/00/09.0 0xc0000-0x100000 not mappable
PASS: /proc/bus/pci/00/0a.0 0xc0000-0x100000 not mappable
PASS: /proc/bus/pci/00/0b.0 0xc0000-0x100000 not mappable
PASS: /proc/bus/pci/00/00.0 0x0-0x100000 not mappable
PASS: /proc/bus/pci/00/01.0 0x0-0x100000 not mappable
PASS: /proc/bus/pci/00/01.1 0x0-0x100000 not mappable
PASS: /proc/bus/pci/00/01.3 0x0-0x100000 not mappable
PASS: /proc/bus/pci/00/02.0 0x0-0x100000 not mappable
PASS: /proc/bus/pci/00/03.0 0x0-0x100000 not mappable
PASS: /proc/bus/pci/00/04.0 0x0-0x100000 not mappable
PASS: /proc/bus/pci/00/05.0 0x0-0x100000 not mappable
PASS: /proc/bus/pci/00/06.0 0x0-0x100000 not mappable
PASS: /proc/bus/pci/00/07.0 0x0-0x100000 not mappable
PASS: /proc/bus/pci/00/08.0 0x0-0x100000 not mappable
PASS: /proc/bus/pci/00/09.0 0x0-0x100000 not mappable
PASS: /proc/bus/pci/00/0a.0 0x0-0x100000 not mappable
PASS: /proc/bus/pci/00/0b.0 0x0-0x100000 not mappable
ok 1..1 selftests: ia64: aliasing-test [PASS]
make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/ia64'

2018-12-30 22:40:45 make run_tests -C intel_pstate
make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/intel_pstate'
gcc -Wall -D_GNU_SOURCE msr.c -lm -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/intel_pstate/msr
gcc -Wall -D_GNU_SOURCE aperf.c -lm -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/intel_pstate/aperf
TAP version 13
selftests: intel_pstate: run.sh
========================================
cpupower: error while loading shared libraries: libcpupower.so.0: cannot open shared object file: No such file or directory
./run.sh: line 90: / 1000: syntax error: operand expected (error token is "/ 1000")
cpupower: error while loading shared libraries: libcpupower.so.0: cannot open shared object file: No such file or directory
./run.sh: line 92: / 1000: syntax error: operand expected (error token is "/ 1000")
========================================================================
The marketing frequency of the cpu is 0 MHz
The maximum frequency of the cpu is MHz
The minimum frequency of the cpu is MHz
Target Actual Difference MSR(0x199) max_perf_pct
ok 1..1 selftests: intel_pstate: run.sh [PASS]
make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/intel_pstate'

2018-12-30 22:40:46 make run_tests -C ipc
make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/ipc'
gcc -DCONFIG_X86_64 -D__x86_64__ -I../../../../usr/include/ msgque.c -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/ipc/msgque
msgque.c: In function ‘restore_queue’:
msgque.c:52:7: warning: implicit declaration of function ‘msgget’ [-Wimplicit-function-declaration]
id = msgget(msgque->key, msgque->mode | IPC_CREAT | IPC_EXCL);
^~~~~~
msgque.c:66:7: warning: implicit declaration of function ‘msgsnd’ [-Wimplicit-function-declaration]
if (msgsnd(msgque->msq_id, &msgque->messages[i].mtype,
^~~~~~
msgque.c:76:6: warning: implicit declaration of function ‘msgctl’ [-Wimplicit-function-declaration]
if (msgctl(id, IPC_RMID, 0))
^~~~~~
msgque.c: In function ‘check_and_destroy_queue’:
msgque.c:87:9: warning: implicit declaration of function ‘msgrcv’ [-Wimplicit-function-declaration]
ret = msgrcv(msgque->msq_id, &message.mtype, MAX_MSG_SIZE,
^~~~~~
msgque.c: In function ‘main’:
msgque.c:203:15: warning: implicit declaration of function ‘ftok’ [-Wimplicit-function-declaration]
msgque.key = ftok(argv[0], 822155650);
^~~~
TAP version 13
selftests: ipc: msgque
========================================
Pass 0 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..0
ok 1..1 selftests: ipc: msgque [PASS]
make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/ipc'

2018-12-30 22:40:46 make run_tests -C kcmp
make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kcmp'
gcc -I../../../../usr/include/ kcmp_test.c -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kcmp/kcmp_test
TAP version 13
selftests: kcmp: kcmp_test
========================================
pid1: 14051 pid2: 14052 FD: 1 FILES: 2 VM: 2 FS: 1 SIGHAND: 1 IO: 0 SYSVSEM: 0 INV: -1
PASS: 0 returned as expected
PASS: 0 returned as expected
PASS: 0 returned as expected
Pass 3 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..3
Pass 3 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..3
Pass 0 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
1..0
ok 1..1 selftests: kcmp: kcmp_test [PASS]
make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kcmp'
kmod test: not in Makefile
2018-12-30 22:40:46 make TARGETS=kmod
make[1]: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kmod'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kmod'

2018-12-30 22:40:46 make run_tests -C kmod
make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kmod'
TAP version 13
selftests: kmod: kmod.sh
========================================
Sun Dec 30 22:40:47 UTC 2018
Running test: kmod_test_0001 - run #0
kmod_test_0001_driver: OK! - loading kmod test
kmod_test_0001_driver: OK! - Return value: 256 (MODULE_NOT_FOUND), expected MODULE_NOT_FOUND
kmod_test_0001_fs: OK! - loading kmod test
kmod_test_0001_fs: OK! - Return value: -22 (-EINVAL), expected -EINVAL
Sun Dec 30 22:40:47 UTC 2018
Running test: kmod_test_0001 - run #1
kmod_test_0001_driver: OK! - loading kmod test
kmod_test_0001_driver: OK! - Return value: 256 (MODULE_NOT_FOUND), expected MODULE_NOT_FOUND
kmod_test_0001_fs: OK! - loading kmod test
kmod_test_0001_fs: OK! - Return value: -22 (-EINVAL), expected -EINVAL
Sun Dec 30 22:40:47 UTC 2018
Running test: kmod_test_0001 - run #2
kmod_test_0001_driver: OK! - loading kmod test
kmod_test_0001_driver: OK! - Return value: 256 (MODULE_NOT_FOUND), expected MODULE_NOT_FOUND
kmod_test_0001_fs: OK! - loading kmod test
kmod_test_0001_fs: OK! - Return value: -22 (-EINVAL), expected -EINVAL
Sun Dec 30 22:40:47 UTC 2018
Running test: kmod_test_0002 - run #0
kmod_test_0002_driver: OK! - loading kmod test
kmod_test_0002_driver: OK! - Return value: 256 (MODULE_NOT_FOUND), expected MODULE_NOT_FOUND
kmod_test_0002_fs: OK! - loading kmod test
kmod_test_0002_fs: OK! - Return value: -22 (-EINVAL), expected -EINVAL
Sun Dec 30 22:40:48 UTC 2018
Running test: kmod_test_0002 - run #1
kmod_test_0002_driver: OK! - loading kmod test
kmod_test_0002_driver: OK! - Return value: 256 (MODULE_NOT_FOUND), expected MODULE_NOT_FOUND
kmod_test_0002_fs: OK! - loading kmod test
kmod_test_0002_fs: OK! - Return value: -22 (-EINVAL), expected -EINVAL
Sun Dec 30 22:40:48 UTC 2018
Running test: kmod_test_0002 - run #2
kmod_test_0002_driver: OK! - loading kmod test
kmod_test_0002_driver: OK! - Return value: 256 (MODULE_NOT_FOUND), expected MODULE_NOT_FOUND
kmod_test_0002_fs: OK! - loading kmod test
kmod_test_0002_fs: OK! - Return value: -22 (-EINVAL), expected -EINVAL
Sun Dec 30 22:40:48 UTC 2018
Running test: kmod_test_0003 - run #0
kmod_test_0003: OK! - loading kmod test
kmod_test_0003: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:40:49 UTC 2018
Running test: kmod_test_0004 - run #0
kmod_test_0004: OK! - loading kmod test
kmod_test_0004: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:40:49 UTC 2018
Running test: kmod_test_0005 - run #0
kmod_test_0005: OK! - loading kmod test
kmod_test_0005: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:40:49 UTC 2018
Running test: kmod_test_0005 - run #1
kmod_test_0005: OK! - loading kmod test
kmod_test_0005: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:40:50 UTC 2018
Running test: kmod_test_0005 - run #2
kmod_test_0005: OK! - loading kmod test
kmod_test_0005: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:40:50 UTC 2018
Running test: kmod_test_0005 - run #3
kmod_test_0005: OK! - loading kmod test
kmod_test_0005: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:40:51 UTC 2018
Running test: kmod_test_0005 - run #4
kmod_test_0005: OK! - loading kmod test
kmod_test_0005: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:40:51 UTC 2018
Running test: kmod_test_0005 - run #5
kmod_test_0005: OK! - loading kmod test
kmod_test_0005: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:40:51 UTC 2018
Running test: kmod_test_0005 - run #6
kmod_test_0005: OK! - loading kmod test
kmod_test_0005: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:40:52 UTC 2018
Running test: kmod_test_0005 - run #7
kmod_test_0005: OK! - loading kmod test
kmod_test_0005: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:40:52 UTC 2018
Running test: kmod_test_0005 - run #8
kmod_test_0005: OK! - loading kmod test
kmod_test_0005: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:40:52 UTC 2018
Running test: kmod_test_0005 - run #9
kmod_test_0005: OK! - loading kmod test
kmod_test_0005: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:40:53 UTC 2018
Running test: kmod_test_0006 - run #0
kmod_test_0006: OK! - loading kmod test
kmod_test_0006: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:40:54 UTC 2018
Running test: kmod_test_0006 - run #1
kmod_test_0006: OK! - loading kmod test
kmod_test_0006: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:40:54 UTC 2018
Running test: kmod_test_0006 - run #2
kmod_test_0006: OK! - loading kmod test
kmod_test_0006: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:40:55 UTC 2018
Running test: kmod_test_0006 - run #3
kmod_test_0006: OK! - loading kmod test
kmod_test_0006: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:40:55 UTC 2018
Running test: kmod_test_0006 - run #4
kmod_test_0006: OK! - loading kmod test
kmod_test_0006: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:40:56 UTC 2018
Running test: kmod_test_0006 - run #5
kmod_test_0006: OK! - loading kmod test
kmod_test_0006: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:40:56 UTC 2018
Running test: kmod_test_0006 - run #6
kmod_test_0006: OK! - loading kmod test
kmod_test_0006: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:40:57 UTC 2018
Running test: kmod_test_0006 - run #7
kmod_test_0006: OK! - loading kmod test
kmod_test_0006: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:40:58 UTC 2018
Running test: kmod_test_0006 - run #8
kmod_test_0006: OK! - loading kmod test
kmod_test_0006: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:40:59 UTC 2018
Running test: kmod_test_0006 - run #9
kmod_test_0006: OK! - loading kmod test
kmod_test_0006: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:41:00 UTC 2018
Running test: kmod_test_0007 - run #0
kmod_test_0005: OK! - loading kmod test
kmod_test_0005: OK! - Return value: 0 (SUCCESS), expected SUCCESS
kmod_test_0006: OK! - loading kmod test
kmod_test_0006: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:41:01 UTC 2018
Running test: kmod_test_0007 - run #1
kmod_test_0005: OK! - loading kmod test
kmod_test_0005: OK! - Return value: 0 (SUCCESS), expected SUCCESS
kmod_test_0006: OK! - loading kmod test
kmod_test_0006: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:41:02 UTC 2018
Running test: kmod_test_0007 - run #2
kmod_test_0005: OK! - loading kmod test
kmod_test_0005: OK! - Return value: 0 (SUCCESS), expected SUCCESS
kmod_test_0006: OK! - loading kmod test
kmod_test_0006: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:41:03 UTC 2018
Running test: kmod_test_0007 - run #3
kmod_test_0005: OK! - loading kmod test
kmod_test_0005: OK! - Return value: 0 (SUCCESS), expected SUCCESS
kmod_test_0006: OK! - loading kmod test
kmod_test_0006: OK! - Return value: 0 (SUCCESS), expected SUCCESS
Sun Dec 30 22:41:04 UTC 2018
Running test: kmod_test_0007 - run #4
kmod_test_0005: OK! - loading kmod test
kmod_test_0005: OK! - Return value: 0 (SUCCESS), expected SUCCESS
kmod_test_0006: OK! - loading kmod test
kmod_test_0006: OK! - Return value: 0 (SUCCESS), expected SUCCESS
./kmod.sh: line 529: [[: 1 0002:3:1 0003:1:1 0004:1:1 0005:10:1 0006:10:1 0007:5:1 0008:150:1 0009:150:1: syntax error in expression (error token is "0002:3:1 0003:1:1 0004:1:1 0005:10:1 0006:10:1 0007:5:1 0008:150:1 0009:150:1")
./kmod.sh: line 529: [[: 1 0002:3:1 0003:1:1 0004:1:1 0005:10:1 0006:10:1 0007:5:1 0008:150:1 0009:150:1: syntax error in expression (error token is "0002:3:1 0003:1:1 0004:1:1 0005:10:1 0006:10:1 0007:5:1 0008:150:1 0009:150:1")
Test completed
ok 1..1 selftests: kmod: kmod.sh [PASS]
make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kmod'

2018-12-30 22:41:05 make run_tests -C kvm
make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm'
gcc -O2 -g -std=gnu99 -I../../../../tools/include -I../../../../usr/include/ -Iinclude -Ilib -Iinclude/x86_64 -I.. -c lib/assert.c -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/lib/assert.o
gcc -O2 -g -std=gnu99 -I../../../../tools/include -I../../../../usr/include/ -Iinclude -Ilib -Iinclude/x86_64 -I.. -c lib/elf.c -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/lib/elf.o
gcc -O2 -g -std=gnu99 -I../../../../tools/include -I../../../../usr/include/ -Iinclude -Ilib -Iinclude/x86_64 -I.. -c lib/io.c -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/lib/io.o
gcc -O2 -g -std=gnu99 -I../../../../tools/include -I../../../../usr/include/ -Iinclude -Ilib -Iinclude/x86_64 -I.. -c lib/kvm_util.c -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/lib/kvm_util.o
gcc -O2 -g -std=gnu99 -I../../../../tools/include -I../../../../usr/include/ -Iinclude -Ilib -Iinclude/x86_64 -I.. -c lib/ucall.c -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/lib/ucall.o
gcc -O2 -g -std=gnu99 -I../../../../tools/include -I../../../../usr/include/ -Iinclude -Ilib -Iinclude/x86_64 -I.. -c lib/sparsebit.c -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/lib/sparsebit.o
gcc -O2 -g -std=gnu99 -I../../../../tools/include -I../../../../usr/include/ -Iinclude -Ilib/x86_64 -Iinclude/x86_64 -I.. -c lib/x86_64/processor.c -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/lib/x86_64/processor.o
gcc -O2 -g -std=gnu99 -I../../../../tools/include -I../../../../usr/include/ -Iinclude -Ilib/x86_64 -Iinclude/x86_64 -I.. -c lib/x86_64/vmx.c -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/lib/x86_64/vmx.o
make ARCH=x86 -C ../../../.. headers_install
make[1]: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c'
make[1]: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c'
ar crs /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/libkvm.a /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/lib/assert.o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/lib/elf.o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/lib/io.o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/lib/kvm_util.o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/lib/ucall.o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/lib/sparsebit.o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/lib/x86_64/processor.o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/lib/x86_64/vmx.o
gcc -O2 -g -std=gnu99 -I../../../../tools/include -I../../../../usr/include/ -Iinclude -Ix86_64 -Iinclude/x86_64 -I.. -pthread x86_64/platform_info_test.c /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/libkvm.a -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/x86_64/platform_info_test
gcc -O2 -g -std=gnu99 -I../../../../tools/include -I../../../../usr/include/ -Iinclude -Ix86_64 -Iinclude/x86_64 -I.. -pthread x86_64/set_sregs_test.c /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/libkvm.a -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/x86_64/set_sregs_test
gcc -O2 -g -std=gnu99 -I../../../../tools/include -I../../../../usr/include/ -Iinclude -Ix86_64 -Iinclude/x86_64 -I.. -pthread x86_64/sync_regs_test.c /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/libkvm.a -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/x86_64/sync_regs_test
gcc -O2 -g -std=gnu99 -I../../../../tools/include -I../../../../usr/include/ -Iinclude -Ix86_64 -Iinclude/x86_64 -I.. -pthread x86_64/vmx_tsc_adjust_test.c /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/libkvm.a -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/x86_64/vmx_tsc_adjust_test
gcc -O2 -g -std=gnu99 -I../../../../tools/include -I../../../../usr/include/ -Iinclude -Ix86_64 -Iinclude/x86_64 -I.. -pthread x86_64/cr4_cpuid_sync_test.c /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/libkvm.a -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test
gcc -O2 -g -std=gnu99 -I../../../../tools/include -I../../../../usr/include/ -Iinclude -Ix86_64 -Iinclude/x86_64 -I.. -pthread x86_64/state_test.c /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/libkvm.a -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/x86_64/state_test
gcc -O2 -g -std=gnu99 -I../../../../tools/include -I../../../../usr/include/ -Iinclude -Ix86_64 -Iinclude/x86_64 -I.. -pthread x86_64/evmcs_test.c /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/libkvm.a -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/x86_64/evmcs_test
gcc -O2 -g -std=gnu99 -I../../../../tools/include -I../../../../usr/include/ -Iinclude -I. -Iinclude/x86_64 -I.. -pthread dirty_log_test.c /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/libkvm.a -o /usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm/dirty_log_test
TAP version 13
selftests: kvm: platform_info_test
========================================
not ok 1..1 selftests: kvm: platform_info_test [SKIP]
selftests: kvm: set_sregs_test
========================================
not ok 1..2 selftests: kvm: set_sregs_test [SKIP]
selftests: kvm: sync_regs_test
========================================
not ok 1..3 selftests: kvm: sync_regs_test [SKIP]
selftests: kvm: vmx_tsc_adjust_test
========================================
not ok 1..4 selftests: kvm: vmx_tsc_adjust_test [SKIP]
selftests: kvm: cr4_cpuid_sync_test
========================================
not ok 1..5 selftests: kvm: cr4_cpuid_sync_test [SKIP]
selftests: kvm: state_test
========================================
not ok 1..6 selftests: kvm: state_test [SKIP]
selftests: kvm: evmcs_test
========================================
not ok 1..7 selftests: kvm: evmcs_test [SKIP]
selftests: kvm: dirty_log_test
========================================
Test iterations: 32, interval: 10 (ms)
Testing guest mode: PA-bits:52, VA-bits:48, 4K pages
guest test mem offset: 0x40000000
not ok 1..8 selftests: kvm: dirty_log_test [SKIP]
make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/kvm'

2018-12-30 22:41:13 make run_tests -C lib
make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/lib'
TAP version 13
selftests: lib: printf.sh
========================================
printf: ok
ok 1..1 selftests: lib: printf.sh [PASS]
selftests: lib: bitmap.sh
========================================
bitmap: [FAIL]
not ok 1..2 selftests: lib: bitmap.sh [FAIL]
selftests: lib: prime_numbers.sh
========================================
prime_numbers: ok
ok 1..3 selftests: lib: prime_numbers.sh [PASS]
make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/lib'
locking test: not in Makefile
2018-12-30 22:41:13 make TARGETS=locking
make[1]: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/locking'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/locking'

2018-12-30 22:41:14 make run_tests -C locking
make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/locking'
TAP version 13
selftests: locking: ww_mutex.sh
========================================
locking/ww_mutex: ok
ok 1..1 selftests: locking: ww_mutex.sh [PASS]
make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.2-467e3fea0c6a920471f816b755166d1b907db91c/tools/testing/selftests/locking'



To reproduce:

git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
bin/lkp qemu -k <bzImage> job-script # job-script is attached in this email



Thanks,
Rong Chen


Attachments:
(No filename) (64.73 kB)
config-4.20.0-rc4-00101-g467e3fe (171.31 kB)
job-script (6.29 kB)
dmesg.xz (40.70 kB)
kernel_selftests (63.62 kB)
Download all attachments

2019-01-11 09:25:23

by Rasmus Villemoes

[permalink] [raw]
Subject: Re: [PATCH v6 1/8] bitops: Introduce the for_each_set_clump8 macro

On 19/12/2018 07.00, William Breathitt Gray wrote:
> +/**
> + * bitmap_set_value8 - set an 8-bit value within a memory region
> + * @bitmap: address to the bitmap memory region
> + * @value: the 8-bit value
> + * @start: bit offset of the 8-bit value
> + */
> +void bitmap_set_value8(unsigned long *const bitmap,
> + const unsigned long *const value,
> + const unsigned int start)
> +{
> + const size_t index = BIT_WORD(start);
> + const unsigned int offset = start % BITS_PER_LONG;
> + const unsigned long mask = GENMASK(7, offset);
> +
> + bitmap[index] &= ~mask;
> + bitmap[index] |= (*value << offset) & mask;
> +}

errh, why pass the value by reference? That seems rather odd. Also, if
anybody passes a value that doesn't fit in 8 bits, they get what they
deserve; IOW I don't see a reason for the masking in the last line, but
if its convenient for the users, keep it. In any case, please change the
type of value.

Rasmus

2019-01-11 11:04:26

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH v6 1/8] bitops: Introduce the for_each_set_clump8 macro

On Wed, Dec 19, 2018 at 7:00 AM William Breathitt Gray
<[email protected]> wrote:

> This macro iterates for each 8-bit group of bits (clump) with set bits,
> within a bitmap memory region. For each iteration, "start" is set to the
> bit offset of the found clump, while the respective clump value is
> stored to the location pointed by "clump". Additionally, the
> bitmap_get_value8 and bitmap_set_value8 functions are introduced to
> respectively get and set an 8-bit value in a bitmap memory region.
>
> Suggested-by: Andy Shevchenko <[email protected]>
> Suggested-by: Rasmus Villemoes <[email protected]>
> Cc: Arnd Bergmann <[email protected]>
> Cc: Andrew Morton <[email protected]>
> Signed-off-by: William Breathitt Gray <[email protected]>

I am still waiting for feedback from the core lib maintainers on this patch.
If I just get an ACK I can apply it to the GPIO tree, if noone else cares
I might just go in and apply it, but it feels slightly outside of my
jurisdiction.

Maybe people were just a bit stressed out around christmas?

What about looking at it now?

Yours,
Linus Walleij