• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

paticcaa / pain / 17488410533

05 Sep 2025 08:47AM UTC coverage: 53.819% (-0.8%) from 54.596%
17488410533

push

github

ivanallen
register manusya to deva

Signed-off-by: allen <1007729991@qq.com>

1637 of 4154 branches covered (39.41%)

Branch coverage included in aggregate %.

108 of 140 new or added lines in 4 files covered. (77.14%)

2 existing lines in 1 file now uncovered.

1865 of 2353 relevant lines covered (79.26%)

401.18 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

36.23
/src/deva/container_op.cc
1
#include "deva/container_op.h"
2
#include <pain/base/types.h>
3
#include <boost/assert.hpp>
4
#include "pain/proto/deva_store.pb.h"
5
#include "deva/deva.h"
6
#include "deva/op.h"
7

8
namespace pain::deva {
9

10
template <OpType OpType, typename Request, typename Response>
11
OpPtr create(int32_t version, RsmPtr rsm) {
48✔
12
    Request request;
48!
13
    OpPtr op = nullptr;
47✔
14

15
    if constexpr (OpType < OpType::kMaxDevaOp) {
16
        op = new ContainerOp<Deva, Request, Response>(version, OpType, rsm, request, nullptr);
47!
17
    }
18
    return op;
96✔
19
}
48✔
20

21
#define BRANCH(name)                                                                                                   \
22
    case OpType::k##name:                                                                                              \
23
        return create<OpType::k##name, proto::deva::store::name##Request, proto::deva::store::name##Response>(version, \
24
                                                                                                              rsm);    \
25
        break;
26

27
OpPtr decode(int32_t version, OpType op_type, IOBuf* buf, RsmPtr rsm) {
47✔
28
    auto op = [](int32_t version, OpType op_type, RsmPtr rsm) -> OpPtr {
48✔
29
        switch (op_type) {
48!
30
            BRANCH(CreateFile)
23!
31
            BRANCH(CreateDir)
25!
32
            BRANCH(ReadDir)
×
33
            BRANCH(RemoveFile)
×
34
            BRANCH(SealFile)
×
35
            BRANCH(CreateChunk)
×
36
            BRANCH(CheckInChunk)
×
37
            BRANCH(SealChunk)
×
38
            BRANCH(SealAndNewChunk)
×
UNCOV
39
        default:
×
UNCOV
40
            BOOST_ASSERT_MSG(false, fmt::format("unknown op type: {}", op_type).c_str());
×
41
        }
42
        return nullptr;
×
43
    }(version, op_type, rsm);
47!
44
    op->decode(buf);
48!
45
    return op;
47✔
46
}
×
47

48
#undef BRANCH
49

50
} // namespace pain::deva
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc