2010年6月1日 星期二
要記得errno的存在!!
compile總是出現warning
直說我的func_xxx不是prototype
突然看到密密麻麻的func param當中出現了一個很閃的字眼 errno
OMG....趕快改掉吧 XD
2010年5月27日 星期四
165反詐騙網站的daily report
可以順便search一下是不是已經出現在報表裡頭了
話說這幾天常常被同一支號碼煩
查了一下,竟然是最近被檢舉次數第一名的門號,還真有點準.....
報表網址:http://net165.erufa.com/outtext.php
2010年5月26日 星期三
Test harness/Test stubs/Test instrumentation的區別
* Test harness " a contrived code that executes the test cases which are invented to test the unit under test
* Test stubs " optional functions (or macros) created to replace functions (or macros) called from the unit under test (UUT) to abstract from the actual behaviors of the real functions.
* Test instrumentation " code plugged into the UUT to expose its behaviors normally not visible from the outside and to output "documentable" traces of execution.
參考文章:http://www.embedded.com/design/201805598
=================================================
In software testing, a test harness or automated test framework is a collection of software and test data configured to test a program unit by running it under varying conditions and monitoring its behavior and outputs.It has two main parts: the Test execution engine and the Test script repository.
DUT, UUT, SUT的區別
UUT: unit under test
SUT: system under test
Device under test (DUT), also known as unit under test (UUT), is a term commonly used to refer to a manufactured product undergoing testing.
System under test (SUT) refers to a system that is being tested for correct operation. The term is used mostly in software testing. The term SUT means also a stage of maturity of the software, because a system test is the successor of integration test in the testing cycle.
2010年5月20日 星期四
Word也可以用滑鼠放大縮小頁面比例
慣用了MAC的滑鼠放大縮小功能
在Word上也可以
很簡單,按著CTRL再滾動滑鼠滾輪就可以了
一個方向是比例放大
另一個方向是縮小,到後來是變成一個螢幕show出多張page
對我來說還蠻方便的
2010年5月7日 星期五
[MAC] 常常滑到Expose設定的四個角落怎辦?
[MAC] 如何快速關閉螢幕
2010年4月15日 星期四
Configuration of NFS Server and Client
Server端的部分有幾種選擇:
- pure Linux server
- Windows host with Cygwin
- Windows host with FreeNFS
(1)
pure Linux Server的部分大家應該都很熟悉
如果有點忘了也可以參考這邊
另外就是,有時候Linux server是共用的,你不見得擁有root權限
所以提供其他選擇讓大家參考
(2)
Cygwin也是很多人使用的環境
要架設NFS server你需要額外的packages
- Net :: nfs-server
- Libs :: sunrpc
- Admin :: cygrunsrv
接下來都回答yes,並提供user/passwd供windows services使用
接著cygwin會自動幫你install mountd/nfsd/portmap
上述動作都跑完之後,接著就是去修改/etc/exports來決定你想分享的目錄和權限
再來就是mountd/nfsd/portmap的使用,有兩種方式:
1. 從Windows的控制台->系統管理工具->服務
找到這三個,然後決定自動/手動/停用等選項
2. 從cygwin裡頭去下 /bin/cygrunsrv --stop/start/remove ....
Stop the services:
cygrunsrv --stop mountd
cygrunsrv --stop nfsd
cygrunsrv --stop portmap
Remove the services:
cygrunsrv --remove mountd最後就是記得把Windows防火牆針對這些app ports打開
cygrunsrv --remove nfsd
cygrunsrv --remove portmap
更多內容請參考: 文章一 文章二
(3)
最後來介紹最簡單的設定工具
直接下載sourceforge上的這個freenfs project來用
馬上執行馬上通,很適合不想被眾多設定搞得一頭霧水的朋友們使用
下載點: FreeNFS
=================================================
[NFS Client]
這邊client的部分主要針對embedded target board上的設定
主要要改的有三大部分:
- Kernel
- uClibc
- mount (or busybox)
首先,要使用NFS是需要kernel的幫忙的
所以在menuconfig中,先找到
(1.1)
Networking --->
Networking support
Networking options --->
TCP/IP networking
[*] IP: kernel level configuration (把底下DHCP和BOOTP都選起來,RARP選起來也safe)
(1.2)
File systems --->
Network File Systems --->
<*>NFS file system support
[*] Provide NFSv3 client support
然後底下
[*]Root file system on NFS (如果你要做的是nfsroot,這邊一定要記得選)
(1.3)
如果是uClinux,在General Setup --->
可以把Initramfs source file設成empfs
(2)
uClibc的部分要支援
Networking Support --->
[*] Remote Procedure Call(RPC) support
[*] Full RPC support
(3)
mount的部分要支援
[*]mount: support NFS mounts
-------------
mount NFS有兩種case
- mount any directory exported from nfs server
- mount nfsroot at kernel booting
mount -t nfs -o nolock 192.168.1.1:/pub /mnt/nfs
第二種需要傳入一些參數給kernel
方法也有兩種:
- 直接在kernel menuconfig去寫command string要為何
- 從u-boot下去設環境變數
+ uboot> setenv serverip 192.168.1.1
+ uboot> setenv bootargs root=/dev/nfs nfsroot=/tftpboot/rootfs ip=192.168.1.254:192.168.1.1::::eth0:off
參考網址:
uclinux-dist:nfs
[Buildroot] [PATCH] docs/howto: add howto for nfsroot
SkyEye: BootfromNFS
root_file_system_structure
======================================
[Buildroot]
要支持NFS,除了busybox的mount命令要支持NFS外,buildroot需要添加如下设置:
Toolchain----->[*]Enable RPC
Package Selection----->Networking----->[*]portmap
http://buildroot.busybox.net/buildroot.html
2010年3月10日 星期三
System Spec and Software Spec
What is the difference between a System Specification and a Software Specification?
Very often we find that companies do not understand the difference between a System specification and a Software Specification. Important issues are not defined up front and Mechanical, Electronic and Software designers do not really know what their requirements are.
The following is a high level list of requirements that should be addressed in a System Specification:
- Define the functions of the system
- Define the Hardware / Software Functional Partitioning
- Define the Performance Specification
- Define the Hardware / Software Performance Partitioning
- Define Safety Requirements
- Define the User Interface (A good user’s manual is often an overlooked part of the System specification. Many of our customers haven’t even considered that this is the right time to write the user’s manual.)
- Provide Installation Drawings/Instructions.
- Provide Interface Control Drawings (ICD’s, External I/O)
One job of the System specification is to define the full functionality of the system. In many systems we work on, some functionality is performed in hardware and some in software. It is the job of the System specification to define the full functionality and like the performance requirements, to set in motion the trade-offs and preliminary design studies to allocate these functions to the different disciplines (mechanical, electrical, software).
Another function of the System specification is to specify performance. For example, if the System is required to move a mechanism to a particular position accurate to a repeatability of ± 1 millimeter, that is a System’s requirement. Some portion of that repeatability specification will belong to the mechanical hardware, some to the servo amplifier and electronics and some to the software. It is the job of the System specification to provide that requirement and to set in motion the partitioning between mechanical hardware, electronics, and software. Very often the System specification will leave this partitioning until later when you learn more about the system and certain factors are traded off (For example, if we do this in software we would need to run the processor clock at 40 mHz. However, if we did this function in hardware, we could run the processor clock at 12 mHz). [This implies that a certain level of research or even prototyping and benchmarking needs to be done to create a System spec. I think it is useful to say that explicitly.]
However, for all practical purposes, most of the systems we are involved with in small to medium size companies, combine the software and the systems documents. This is done primarily because most of the complexity is in the software. When the hardware is used to meet a functional requirement, it often is something that the software wants to be well documented. Very often, the software is called upon to meet the system requirement with the hardware you have. Very often, there is not a systems department to drive the project and the software engineers become the systems engineers. For small projects, this is workable even if not ideal. In this case, the specification should make clear which requirements are software, which are hardware, and which are mechanical.
原文出處: How to write a software requirements specification