Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add some syscalls and add stdin #131

Merged
merged 22 commits into from
Aug 11, 2020
Merged

add some syscalls and add stdin #131

merged 22 commits into from
Aug 11, 2020

Conversation

yukiiiteru
Copy link
Contributor

No description provided.

@coveralls
Copy link

coveralls commented Aug 7, 2020

Pull Request Test Coverage Report for Build 201287677

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 7 of 124 (5.65%) changed or added relevant lines in 9 files are covered.
  • 71 unchanged lines in 6 files lost coverage.
  • Overall coverage decreased (-0.4%) to 32.276%

Changes Missing Coverage Covered Lines Changed/Added Lines %
linux-object/src/error.rs 0 1 0.0%
linux-syscall/src/lib.rs 0 4 0.0%
linux-syscall/src/task.rs 0 5 0.0%
linux-object/src/fs/file.rs 0 6 0.0%
linux-syscall/src/misc.rs 0 21 0.0%
linux-object/src/fs/stdio.rs 4 36 11.11%
linux-syscall/src/file/poll.rs 0 48 0.0%
Files with Coverage Reduction New Missed Lines %
../../../../../usr/share/rust/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/bitflags-1.2.1/src/lib.rs 3 39.22%
../../../../../usr/share/rust/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/async-task-3.0.0/src/raw.rs 4 67.83%
../../../../../usr/share/rust/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/async-task-3.0.0/src/waker_fn.rs 4 80.95%
linux-syscall/src/misc.rs 10 18.18%
linux-object/src/fs/file.rs 18 55.15%
linux-syscall/src/task.rs 32 8.07%
Totals Coverage Status
Change from base Build 198552974: -0.4%
Covered Lines: 4092
Relevant Lines: 12678

💛 - Coveralls

@yukiiiteru
Copy link
Contributor Author

代码没通过 cargo clippy,下次注意qwq

Copy link
Member

@wangrunji0408 wangrunji0408 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

后续有修改直接 commit 到原分支 push 即可,force push 也可以,不需要另开新 PR 了。

linux-syscall/src/misc.rs Outdated Show resolved Hide resolved
linux-syscall/src/misc.rs Outdated Show resolved Hide resolved
linux-syscall/src/misc.rs Outdated Show resolved Hide resolved
linux-object/src/fs/stdio.rs Outdated Show resolved Hide resolved
@wangrunji0408 wangrunji0408 added the enhancement New feature or request label Aug 7, 2020
linux-syscall/src/task.rs Outdated Show resolved Hide resolved
@yukiiiteru yukiiiteru changed the title add sys_getrandom, add stdin without condvar add some syscalls and add stdin Aug 7, 2020
@yunwei37
Copy link
Contributor

yunwei37 commented Aug 7, 2020

Maybe you can help us add more document and unit test for these syscalls?

: )

@yukiiiteru
Copy link
Contributor Author

Maybe you can help us add more document and unit test for these syscalls?

: )

Of course, but my main work is software transportation. Therefore, I will add necessary documents for syscalls to pass the check of #[deny(missing_doc)].

BTW, what I've finished is, for example, sys_getrandom, sys_poll, sys_nanosleep. Maybe it's complex to write unit tests for them.

_(:з」∠)_

@wangrunji0408
Copy link
Member

I think unit test is only necessary for objects. Syscall layer can be tested in the loader crate.

@yunwei37
Copy link
Contributor

yunwei37 commented Aug 8, 2020

qwq....I just mean maybe we can write unit test in in the loader crate like this ? #132

@wangrunji0408
Copy link
Member

qwq....I just mean maybe we can write unit test in in the loader crate like this ? #132

Exactly!

linux-syscall/src/task.rs Outdated Show resolved Hide resolved
linux-syscall/src/misc.rs Outdated Show resolved Hide resolved
linux-loader/Cargo.toml Outdated Show resolved Hide resolved
linux-object/Cargo.toml Outdated Show resolved Hide resolved
linux-object/src/process.rs Outdated Show resolved Hide resolved
linux-syscall/src/file/poll.rs Outdated Show resolved Hide resolved
linux-syscall/src/file/poll.rs Outdated Show resolved Hide resolved
linux-syscall/src/file/poll.rs Outdated Show resolved Hide resolved
linux-syscall/src/file/poll.rs Outdated Show resolved Hide resolved
linux-syscall/src/file/poll.rs Show resolved Hide resolved
linux-object/src/process.rs Outdated Show resolved Hide resolved
linux-object/src/process.rs Outdated Show resolved Hide resolved
linux-syscall/src/misc.rs Outdated Show resolved Hide resolved
linux-syscall/src/misc.rs Outdated Show resolved Hide resolved
linux-syscall/src/misc.rs Outdated Show resolved Hide resolved
Copy link
Member

@wangrunji0408 wangrunji0408 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

辛苦辛苦了😂

@wangrunji0408 wangrunji0408 merged commit 2c6893e into rcore-os:master Aug 11, 2020
@yukiiiteru
Copy link
Contributor Author

rjgg 也辛苦了

我还是要认真读代码啊,尽量少出这种问题

现在 push 之前会习惯性用 cargo fmtcargo clippy 检查代码了,也算是有点进步x

zhangsn-19 pushed a commit to zhangsn-19/zCore that referenced this pull request Apr 23, 2022
* add sys_getrandom and sys_nanosleep

* add stdin

* fix sys_nanosleep

* update rcore-fs and add sys_poll

* add sys_prlimit64

* fix color problem of ls

* fix a problem of compiling zCore

* add gdbinit for make debug

* fix typo of flag

* Update linux-syscall/src/file/poll.rs

Co-authored-by: Runji Wang <[email protected]>

* Update linux-syscall/src/file/poll.rs

Co-authored-by: Runji Wang <[email protected]>

* remove comment

* remove pub at inner

* fix a problem of pointer

* fix arg of nanosleep

* Update linux-syscall/src/misc.rs

Co-authored-by: Runji Wang <[email protected]>

* remove pub

* fix a problem of null ptr in sys_prlimit

Co-authored-by: Runji Wang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants