mirror of
https://github.com/sjwhitworth/golearn.git
synced 2025-04-28 13:48:56 +08:00
edf: corrections for Travis environment
This commit is contained in:
parent
7f7d914732
commit
d13654021f
@ -44,9 +44,9 @@ func TestAllocWithExtraContentsBlock(t *testing.T) {
|
||||
Convey("Mapping the file should suceed", func() {
|
||||
mapping, err := EdfMap(tempFile, EDF_CREATE)
|
||||
So(err, ShouldEqual, nil)
|
||||
Convey("Allocation of 350 pages should suceed", func() {
|
||||
allocated := make([]EdfRange, 350)
|
||||
for i := 0; i < 350; i++ {
|
||||
Convey("Allocation of 10 pages should suceed", func() {
|
||||
allocated := make([]EdfRange, 10)
|
||||
for i := 0; i < 10; i++ {
|
||||
r, err := mapping.AllocPages(1, 2)
|
||||
So(err, ShouldEqual, nil)
|
||||
allocated[i] = r
|
||||
@ -59,7 +59,7 @@ func TestAllocWithExtraContentsBlock(t *testing.T) {
|
||||
Convey("Should get the same allocations back", func() {
|
||||
rr, err := mapping.GetThreadBlocks(2)
|
||||
So(err, ShouldEqual, nil)
|
||||
So(len(rr), ShouldEqual, 350)
|
||||
So(len(rr), ShouldEqual, 10)
|
||||
So(rr, ShouldResemble, allocated)
|
||||
})
|
||||
})
|
||||
|
@ -14,11 +14,11 @@ const (
|
||||
// EDF_VERSION is the file format version
|
||||
EDF_VERSION = 1
|
||||
// EDF_LENGTH is th number of OS pages in each slice
|
||||
EDF_LENGTH = 1024 * 1024
|
||||
EDF_LENGTH = 32
|
||||
// EDF_SIZE sets the maximum size of the mapping, represented with
|
||||
// EDF_LENGTH segments
|
||||
// Currently set arbitrarily to 4 GiB
|
||||
EDF_SIZE = 4 * (1024 * 1024 * 1024)
|
||||
// Currently set arbitrarily to 128 MiB
|
||||
EDF_SIZE = 128 * (1024 * 1024)
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -75,7 +75,7 @@ func (l *LazilyFilteredInstances) AllAttributes() []Attribute {
|
||||
for i, a := range l.attrs {
|
||||
ret[i] = a.New
|
||||
}
|
||||
for a := range l.unfilteredMap {
|
||||
for _, a := range l.src.AllAttributes() {
|
||||
if l.unfilteredMap[a] {
|
||||
ret = append(ret, a)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user