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
..
2018-09-25 15:50:15 +02:00
2018-10-02 18:47:55 +02:00
2019-05-29 06:29:07 +02:00
2019-03-11 17:17:01 -03:00
2019-02-07 15:49:08 +02:00
2016-02-04 17:01:04 +00:00
2018-12-20 10:29:08 +01:00
2016-02-04 17:01:04 +00:00
2019-04-18 22:18:59 +02:00
2018-08-24 20:26:37 +02:00
2018-06-29 12:32:10 +02:00