Peter Xu ad37f24d57 bitmap: Add bitmap_copy_with_{src|dst}_offset()
These helpers copy the source bitmap to destination bitmap with a
shift either on the src or dst bitmap.

Meanwhile, we never have bitmap tests but we should.

This patch also introduces the initial test cases for utils/bitmap.c
but it only tests the newly introduced functions.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20190603065056.25211-5-peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>

---

Bitmap test used sizeof(unsigned long) instead of BITS_PER_LONG.
2019-07-15 15:39:02 +02:00
..
2017-07-24 12:42:55 +01:00
2016-06-07 18:19:23 +03:00
2017-10-16 20:57:13 +03:00
2016-10-26 08:29:01 -07:00
2019-02-22 09:42:13 +00:00
2018-09-26 08:55:54 -07:00
2019-04-18 22:18:59 +02:00
2019-02-05 16:50:21 +01:00
2018-01-16 14:54:50 +01:00
2018-08-23 18:46:25 +02:00
2016-02-23 12:43:05 +00:00
2018-08-24 20:26:37 +02:00
2016-09-15 15:32:22 +03:00
2018-12-20 10:29:08 +01:00
2017-01-24 23:26:52 +03:00